Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gyrex-dev] org.eclipse.gyrex.persistence

Hi Gunnar
Thanks for leading me to right direction. It was very helpful. Also i used gyrex Slor implementation and persistence injection tests as an example in some cases.
Definitely some simplicity will be helpful.
Also i found some issues in gyrex EclipseLinkRepositoryImpl.
Then external data source are set as  NON_JTA_DATASOURCE, EclipseLink doesn't shares connection for sub query's during entity read from database. then i user Apache DBCP data source implemetation it fails with "Metohd not supported" exception.
Then changed datasource type to JTA_DATASOURCE it starts behave in normal way (connections was shares for sub query's)

Actually i don't know is it gyrex issue or EclipseLink or may be in data source implementation ( after APache DBCP exception i switched to BoneCP version 0.8 ).



2013/3/20 Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx>
Hi Tomas,

Am 20.03.2013 10:31, schrieb Tomas Tamošaitis:

How to wire concrete DAO implementation and concrete RepositoryProvider
for concrete RuntimeContext.

This wiring is done through content types. Sorry for being short (I'm on a train).

1. define you domain api and DAO interfaces

2. create an implementation of the DAO
   (eg. using EclipseLink or whatever)

3. create a model + content type provider
   MyModelProvider
     extends ModelProvider
     implements IRepositoryContentTypeProvider
   - you need to call pass the DAO interface in the constructor
   - the interface is later retrieved using ctx.get(...)

4. register MyModelProvider as OSGi service RuntimeContextObjectProvider

5. create repository
   (via IRepositoryDefinitionManager)

6. associate repo with content type for context X
   (via DefaultRepositoryLookupStrategy)

7. call ctx.get(...)

I have a prototype in my head to simplify this. But for now that's basically the required steps.

Please ask on this list for additional info.


-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/
_______________________________________________
gyrex-dev mailing list
gyrex-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gyrex-dev


Back to the top