[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Sharing a class between 2 ears (classloader)

quaidbrown do-not-reply at jboss.com
Mon Jun 2 18:49:55 EDT 2008


Well, I was getting noclassdeffound errors. The problem was that the the jboss-app for the 2 ears had a different entry in the <jboss-app><loader-repository></loader-repository></jboss-app> tag.

By making those 2 entries identical, the classes loaded from the original ear were available to the other ear.

Now, the problem I'm facing is that the Entity bean I wanted to share is persisting to Ear1's defined datasource instead of Ear2's datasource. I imagine this is because when jboss starts up, it does some maping for entity beans so it can quickly write to the DB.

I'm not sure if I am going to be able to find a way to make it treat the Entity bean differently depending on which application is calling it. I may have to write some persistence code in Ear2 to make sure that it is writing the way I want it to, instead of just using EntityManager's persist method.

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

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



More information about the jboss-user mailing list