I'm not sure we support sharing classes in this way, as each web app will
most likely get it own classloader, so B won't be able to see the classes
from A.
You could package an EAR file like this:

MyApp.ear
+ MyBeans.jar <- put all EJBs in here
+ A.war
+ B.war
+ application.xml

and deploy that to the webapps directory.

or you could add the business interfaces for your session EJBs to B.war (I
guess you'll either need to use Global JNDI names, or you might have to
fiddle with <ejb-refs> in web.xml).

Would either of those work for you?

I'll have a look at the J2EE module dependencies issue in Eclipse. I don't
know if you're using our WTP adapter, if you are, we do the deployment by
getting WTP to build our jar or ear which we then deploy, so perhaps we have
a bug and we're missing something.

Jon

On Thu, Mar 19, 2009 at 3:52 PM, dojolava <[email protected]> wrote:

>
>
>
> Fred59 wrote:
> >
> > Hi all,
> >
> > I'm using OpenEJB 3.1.0 in Tomcat 5.5 on Unix environment.
> >
> > I have 2 web applications (A & B), A uses directly EJB beans and entities
> > in its classpath and B needs the same beans.
> > B is not packaged as an EJB jar, and at runtime, does'nt find the
> entities
> > defined in A.
> > Is the collapsed ear feature in 3.1.0 allows this kind of usage ? If yes,
> > is there anything special to do ?
> >
> > Thanks in advance for answers.
> >
> > Fred
> >
>
> Hi,
>
> I have the same problem. How can I get an OpenEJB project in Eclipse to
> work
> if my code is spread over several projects? In WebApp projects I can use
> "J2EE Module Dependencies" to include classes from other projects. Do I
> have
> to use "Link Source" or is there another way?
>
> Thanks,
> Mathis
>
> --
> View this message in context:
> http://www.nabble.com/Sharing-classpath-between-different-Web-app-tp22597641p22601991.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>

Reply via email to