Hello,
I had the same problem, here is what I did:
- first create an ant property called app.name
- change your beans jndi-name to
jndi-name="${app.name}/ExampleBean", the local-jndi-name too if
exists.(I didn�t know the
existence of jndiSubstitution tag, if so I would used it)
- create another ant property called datasource.name so each
application will have a diferent datasource
I used this property in the jboss ant task(jboss 3.0.4 xdoclet
1.2b)
<jboss version="${jboss.version}"
xmlencoding="ISO-8859-1"
typemapping="${type.mapping}"
datasource="${datasource.name}"
destdir="${build.jar.dir}/META-INF"
validateXml="false"
/>
- create a diferent datasource for each application, it's name
must match the datasource.name property used
by the application
- generate a diferent ear depending on app.name
<ear jarfile="${build.deploy.dir}/${app.name}.ear">
<fileset includes="*.war,*.jar"
dir="${build.deploy.dir}"/>
</ear>
- You only have to put the ear on the deploy dir, jboss will
distinct each application bean thanks to the
jndi-name and will distinct each application datasource too.
Hope it help
-------------------------------------
Jordi Valldaura i Riqu�
CSI - Centre de Serveis Inform�tics
Enginyeria i Arquitectura La Salle
Universitat Ram�n Llull
-------------------------------------
-----Mensaje original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] En nombre de Ben
Litchfield
Enviado el: dimecres, 8 / gener / 2003 17:59
Para: [EMAIL PROTECTED]
Asunto: [Xdoclet-user] Same application deployed multiple times
I have a requirement of deploying the same application multiple times to
the same server. Of course each application talking to a different
database.
The problem that I have is that in the Session bean header I have
* @ejb.bean
* type="Stateless"
* name="ApplicationController"
* description="Session Bean for accessing user functions"
* jndi-name="org.kelut.users.userinfo.ApplicationControllerHome"
* transaction-type="Container"
* view-type="remote"
So when xdoclet runs the jndi name becomes
org.kelut.users.userinfo.ApplicationControllerHome, is there a way to
set a prefix for this through ANT or something so I can have different
JNDI names generated for each deployment.
I think an optimal solution would to be able to change the prefix in my
build.xml somehow.
Maybe something like
<ejbdoclet destdir="${gen.src.dir}" excludedtags="@version,@author"
ejbspec="2.0">
<packageSubstitution packages="entity.ejb" substituteWith="entity"/>
<jndiSubstitution jndiNames="org.kelut"
substituteWith="firstDeployment.org.kelut" /> ...
If there is an existing way to do this I would like to know that as
well. If people think this is a worthwhile I can add this as a feature
request.
Ben Litchfield
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user