ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Blanc <Sebastien.Bl...@alcatel.com>
Subject Re: putting multiple ejb in a jar
Date Fri, 21 Feb 2003 01:43:03 GMT
I'd say u do as u like to:
first ask urself if u wanna put these ejbs in the same jar or not. most of the
time u try to group ur EJBs per functionalities, otherwise u'll have to make
ejb-refs all over the place everytime u want to access a bean B from a bean A.
also it depends how u wanna distribute ur application: if u want a certain
functionality to be able to run in a separate server than the others (becoz of
load & perfs for instance) then u may want to put them in a seperate jar.
then there are few constraints on the EJB packaging itself that may lead u to
ur choice. u may want to have a look at the 2 following pointers. pbs with
dependencies may drive u to either lower dependencies or manage them (which is
not always easy)

 http://www.onjava.com/lpt/a/onjava/2001/06/26/ejb.html
 ftp://vadd1:yb29hmib@207.25.253.53/1/wsdd/pdf/gisell/UnderstandingWebSphereClassLoaders.pdf

as far as build.xml is concerned the way I work is that I have xdoclet
generating all the descriptors in one directory (in ur case u use ANT but does
not matter), all the bean classes in another one (could be the same as the
previous one), and I re-use the task for all functional packages for which I
need a jar with the XML import capacity.

i.e. think it's really up to u, but at least I wdn't put one bean per jar.

hope this will help.

seb.

Modha Kumar wrote:

> Hi
> I have a couple of session ejb's.
>
> when i had only one i used to use this to generate jar
>
> <target name="ejb-jar" depends="compile">
>         <delete dir="${build.fnol.dir}/META-INF"/>
>         <mkdir dir="${build.fnol.dir}/META-INF"/>
>         <copy file="${src.dir}/com/a/b/server/ejb-jar.xml"
> todir="${build.fnol.dir}/META-INF" />
>         <copy file="${src.dir}/com/a/b/server/jboss.xml"
> todir="${build.fnol.dir}/META-INF" />
>         <jar jarfile="${build.fnol.dir}/commandserver.jar">
>             <fileset dir="${build.classes.dir}">
>                          <include name="com/a/b/server/CommandServer.class"
> />
>                        <include
> name="com/a/b/server/CommandServerBean.class" />
>                        <include
> name="com/a/b/server/CommandServerHome.class" />
>                          <include
> name="com/a/b/exceptions/CommandException.class" />
>                          <include name="com/a/b/commandbeans/Command.class"
> />
>                          <include
> name="com/a/b/commandbeans/SearchPoliciesCommand.class" />
>             </fileset>
>             <fileset dir="${build.fnol.dir}">
>                 <include name="META-INF/ejb-jar.xml" />
>                 <include name="META-INF/jboss.xml" />
>             </fileset>
>         </jar>
>     </target>
>
> now i need to put 2 ejb's and this number will grow
> how do i manage build file
> 1. Do i create a new target for each session bean and create a new jar
> 2. Is there a better way.
>
> If you can please point me to any documentation that will be good too.
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message