[jboss-user] [EJB 3.0] - Re: Sharing EJB3 classes in a .jar creates

niclas.lindberg do-not-reply at jboss.com
Fri Oct 20 03:28:19 EDT 2006


Hi Al! Thanks again... unfortunally same error.

I moved persistence.xml into subsystem-shared.jar and registered it in application.xml as  and removed persisitence.xml from accountsystem.jar. 

Same Exception "Unknown Entity".

It simply doesn't seem to work if the EJB3 entities AND the persistence.xml AND the EntityManager(UnitName=xxx) is not defined in the same .jar.

Can it really be like that??

I think it would be great if you could reuse the same entities and persist them through different PersistenceContexts anywhere in the system...

My wish is simple...

I want each subsystem to be as independent as possible. In case of dependency I want to put all dependent classes in a shared.jar for each subsystem.jar to reference to to not get any classloading problems. (Classic approach)

Basiucally the dependent classes are: SessionBean interfaces,  Exceptions and DataObjects. The dataobjects are Ejb3 entities.

How do I package it to work?

My idea is that each subsystem put different aspects on the data.... So if I create one dataaccess subsystem and have all entity access go through there and define the whole domainmodel in that .jar I't becomes a mess when the system evolves... 

I would like each subsystem to handle its own datamodel with some systemwide dataclassess(Basically PKs with some systemwide attributes) available..

Thanks thanks thanks for your involvement so far!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979569#3979569

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979569



More information about the jboss-user mailing list