Ejbjar optional task: how to build jar with multiple EJBs?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, September 26, 2001 06:20 AM

Is there a way to use Ejbjar task for JBoss to build a jar with containing more than one ejb? I have in my source tree several ejb in different subdirectories. For every ejb I have a deployment descriptor with name -ejb-jar.xml and -jboss-ejb-jar.xml. I want to merge all these descriptors in to one deployment descriptor for all the application in the build directory ( -ejb-jar.xml and -jboss-ejb-jar.xml>) and have all the classes in one jar file. Ejbjar task is building one jar file per ejb which is not very nice if you have a big number of EJBs in your application. Is there a way to use ejbjar to produce what I need. Or did somebody al   More>>

Is there a way to use Ejbjar task for JBoss to build a jar with
containing more than one ejb?

I have in my source tree several ejb in different subdirectories.
For every ejb I have a deployment descriptor with name -ejb-jar.xml
and -jboss-ejb-jar.xml.

I want to merge all these descriptors in to one deployment
descriptor for all the application in the build directory
( -ejb-jar.xml and -jboss-ejb-jar.xml>)
and have all the classes in one jar file.

Ejbjar task is building one jar file per ejb which is not very nice
if you have a big number of EJBs in your application.

Is there a way to use ejbjar to produce what I need. Or did
somebody already do some own task for this?

With kind regards,
Thomas Schwob,
Fortaleza, Brazil

   <<Less

Re: Ejbjar optional task: how to build jar with multiple EJBs?

Posted By:   Mark_Bice  
Posted On:   Thursday, January 10, 2002 03:27 PM

Thomas,


I have two separate ant targets to build either a single complete bean jar with the contents of all EJBs included from a single ejb-jar descriptor file (using the basejarname naming convention) OR to build individual bean jars using separate and individiual ejb-jar descriptors for each bean (using the ejb-name naming convention) and then unjar them all and re-jar them into the master (complete) bean jar. Unfortunately, I have to have a set of individually managed descriptor files for the latter target to work and a duplicate (much larger) pair of combined descriptor files for the former target that does it all in one shot.

I think the combine descriptor file using basejarname style would work for you if you have no need to distribute the individual beans separately from the combined master bean jar.


I'm looking for a way to combine the flexibility of a single combined set of descriptors with the utility of building only the bean that has changed. The combined descriptor method forces a ejbc re-compile of all beans when it detects a change to any single one.


My working environment is Weblogic 6.1, but I have designed the ant script to make similar targets for an eventual conversion to jboss. I just haven't got that far yet.


Mark

Re: Ejbjar optional task: how to build jar with multiple EJBs?

Posted By:   Luigi_Viggiano  
Posted On:   Wednesday, September 26, 2001 08:15 AM

Hello,

I'm not sure to have understood your problem (don't know what is the Ejbjar task). I use a single ejb-jar.xml (the standard EJB deployment descriptor) and a jboss.xml + jaws.xml that are container specific.

Following there's a shorter version of the jboss.xml running in the reality (in the real one I have 11 EJBs).


My jboss.xml looks like:






false



MyAppDB
java:/MyAppDB




Activity
MyApp/Activity
Standard CMP EntityBean

MyAppDB
MyAppDB
True


ejb/DAOSearch
MyApp/DAOSearch



DAOSearch
MyApp/DAOSearch
Standard Stateless SessionBean





If you need also the jaws.xml and the ejb-jar.xml I can show you.
About | Sitemap | Contact