Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] dynamic entity example code relationships with static entites?

Hi,

just to add to this question, i am looking to test some functionality in the reasonable near future, and just wondering if there is any work around
 to be able to use one Entity Manager for both statically and dynamically defined entities?

I would really like to be able to make joined queries between the two types of entities?


I am wondering if there is a way to generate the emf using emf = new EntityManagerFactoryImpl(setup, EclipseLinkJPATest.getEMFProperties());

however merge this or additionally load the static entites so that when using  the one em it has full knowledge of both static and dynamic entities?

or whether i can use :

List jarFileUrls = new ArrayList();
jarFileUrls.add(new URL("file:/XXXXXX-ejb.jar"));
puInfo.setJarFileUrls(jarFileUrls);

however i have tried and get many warnings when i try to test.. and it fails

[EL Warning]: 2008.07.31 14:58:16.965--The classLoader [null]: for PersistenceLoadProcessor [marktwo-ejbPU] failed to load class [entity.Unit]. Weaving has been disabled for this session. EclipseLink may be unable to get a spec mandated temporary class loader from the server, you may be able to use static weaving as an optional workaround.

And in a test case when i try to persist a static bean using the em that was from the dynamic emf:

java.lang.IllegalArgumentException: Object: entity.Unit@d54e44 is not a known entity type. 
(which is totally excepted)


is there a known way to add/load static classes to this dynamic em?

any help or advice would be massively appreciated,

thanks,

-lachlan


On 30/07/2008, at 3:35 PM, Lachlan Gregor wrote:


Hi,

I have been working with this example code more and am very interested ...

On 22/07/2008, at 6:42 AM, DOUGLAS.CLARKE@xxxxxxxxxx wrote:

We need to add an additional EclipseLink specific flag that will ensure that the XML metadata is trusted completely and the class is not inspected at all during bootstrapping. Once this fix is in place we should have a completely standard usage of the JPA EntityManager and EntityManagerFactory.

Doug

I was wondering if anyone could point me in a direction so that I could possibly look into to above stated issue further and see if i could contribute to the solution?

also if anyone could give any more background information to the issue would be great..


thanks,


-lachlan


Back to the top