views:

19

answers:

1

Seam 2.1 and JBoss 4.2.2

I have set up the first App to have the EJB in the EAR with a local interface.

the 2nd app can look up JDNI name "ear-name/ejbname/local" but fails with "NoClassDefFound".

Does the EJB .jar need to be outside of the EAR?

Is this a classloader visibility issue or Is this a JBoss version issue? or something else?

Thank you for your thoughts..

A: 

I cannot answer if it will work or not. However, I can tell you how we do this. We have created a @Webservice component that uses this EJB. And then we connect to the Webservice from our other application.

I blogged about this a while back. You can have a read if you are interested.

Shervin
Thank you I've read it.So it is possible that a Seam EAR can contain an EJB that no other web app can use. a Seam Ear can not use an external EJB with component names and all the niceness. Can it use an external EJB at all?I don't like writing/maintaining code twice.
Jim Ward
@Jim Ward: You don't have to write code twice. Where ever you have your EJB, you can create a new Webservice that exposes the api of the EJB. (Or even better, just upgrade your EJB to be a webservice also). That should also work.
Shervin