Hi, I've committed a fix for the problem below, but I've hit a snag with njar :-(
I nearly got the <ejb-link>../products/product.jar#EJBProduct</ejb-link> working from the EJB2.0 spec. But when I use new URL(context, spec) the njar separator is removed. e.g. if the above link is referenced from njar:file:/longpath/someapp.ear^/some.jar you get njar:file:/longpath/someapp.ear/products/product.jar#EJBProduct instead of the required njar:file:/longpath/someapp.ear^/products/product.jar#EJBProduct I think I've got to implement parseURL() in the njar's handler. Is this the correct solution or does somebody know a better way of doing this? PS. There's a memory leak in the committed version, which I've already fixed and I've also got tests for <ejb-local-ref> now as well. Regards, Adrian > Bugs item #525412, was opened at 2002-03-04 07:47 > You can respond by visiting: > http://sourceforge.net/tracker/?func=detail&atid=37668 > &aid=525412&group_id=22866 > > >Category: JBossServer > Group: v3.0 Rabbit Hole > Status: Open > Resolution: None > Priority: 5 > Submitted By: Peter Luttrell (objec) > >Assigned to: Adrian Brock (ejort) > Summary: EAR Deployment Problem with <ejb-link> > > Initial Comment: > > According to the dtd for an ejb-jar, > (http://java.sun.com/dtd/ejb-jar_2_0.dtd), the value > of > the <ejb-link> element must be <omitted>. or in > another > ejb-jar file in the same J2EE application unit. > > I take this to mean that you can use the name of a > bean > in another ejb-jar within an ear. In my attached > example, the Titan.ear file contains 2 ejb jars: > CabinEJB.jar and TravelAgentEJB.jar. In the > deployment > descriptor for TravelAgentEJB, I have an > <ejb-link>CabinEJB</ejb-link>. "CabinEJB" is the name > of the entity bean within CabinEJB.jar. > > If I deploy this ear on JBoss3.0.0beta, deployment > fails because "CabinEJB" is not found. Based on my > intrepetation of the spec, I expect it to deploy > without a problem. > > Note that if I rearrange my deployment, such that > both > ejbs are in the same jar file with the same > deployment > descriptor, JBoss3.0.0beta deploys it perfectly. > > JBoss dist: JBoss3.0.0 + Tomcat 4.0.2 posted to > sourceforge on 2002-02-22 > OS: Redhat7.2 > jdk: 1.3.1 > > To run the sample, which illistrates the problem: > open > up the build script and set your jboss install dir, > then run the deploy-as-an-ear target. If you want to > see it work as an ejb jar run deploy-as-a-single-jar > target. > > Here's the first exception caused by this problem: > > <datestamp> ERROR [StatelessSessionContainer] > Exception > in service lifecycle operation: create > org.jboss.deployment.DeploymentException: Bean > CabinEJB > not found within this applicaion. > at > org.jboss.ejb.Container.setupEnvironment(Continer.java > 906) > > > Note that the sample code is from Richard > Monson-Haefel's book titled Enterprise JavaBeans. > > > ------------------------------------------------------ > --------------- > > >Comment By: Adrian Brock (ejort) > Date: 2002-03-16 20:36 > > Message: > Logged In: YES > user_id=9459 > > The ear (deployment) level list of containers has > been > lost during the modifications to include ejbs in sars > at any > level. > The ejb-link is only checking for containers in the > same jar. > > Regards, > Adrian > > ------------------------------------------------------ > --------------- > > You can respond by visiting: > http://sourceforge.net/tracker/?func=detail&atid=37668 > &aid=525412&group_id=22866 > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-dev > lopment _________________________________________________________ View thread online: http://main.jboss.org/thread.jsp?forum=66&thread=10112 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development