There is no problem when the EJB jar is part of an EAR, since the list of URI's from the EAR will have one URI corresponding to the EJB jar. In case of standalone EJB jar, the idea is to have one URI pointing to the jar itself so that a URLArtifactProcessor for .jar files will introspect the EJB jar as a whole and gives back info on the EJBs defined in the EJB jar. If we intend to introspect the EJB jar by looking at the individual artifacts in the jar file, we may have to create a lot of processing code similar to an EJB deployer.
On Tue, Mar 17, 2009 at 1:25 AM, Raymond Feng <[email protected]> wrote: > Why cannot you just use the URI for the nesting EJB jar? > > For example, if we have dummy myApp.ear contains myEJB.jar: > > myApp.ear > +--- META-INF/appllication.xml > +--- myEJB.jar > +--- META-INF/ejb-jar.xml > +--- a/b/MyEJB.class > > For the SCA contribution representing myApp.ear, we can have two options: > > Option 1: One flat ontribution with a list of artifacts: > > Two are top-level artifacts: > 1. MEAT-INF/application.xml > 2. myEJB.jar > > Any nesting artifacts under myEJB.jar, the URIs would be: > 3. myEJB.jar!/META-INF/ejb-jar.xml > 4. myEJB.jar!/a/b/MyEJB.class > > Option 2: Allow the Contribution model to have nesting Contributions > > Then the Contribution will contain two artifacts: > 1. MEAT-INF/application.xml (An Artifact object) > 2. myEJB.jar (which is a Contribution object) > > Thanks, > Raymond > -------------------------------------------------- > From: "Vamsavardhana Reddy" <[email protected]> > Sent: Monday, March 16, 2009 4:48 AM > To: <[email protected]> > Subject: Jar contribution processing question: Using URI "" to correspond to > the jar itself > >> We have >> org.apache.tuscany.sca.contribution.processor.impl.JarContributionProcessor >> to construct a list of URI's to artifacts in the jar file. In case of >> EJB jar files, in addition to the artifacts in the jar, the jar file >> itself needs to be treated as an artifact since there are model >> elements that are derived from the jar as a whole. I intend to use the >> URI "" (empty string) to correspond to archive (right now, the empty >> string URI has no special meaning). I don't see any problem with doing >> so. Wanted to get others comments and inputs to see if I have missed >> out something. >> >> ++Vamsi > > -- Vamsi
