This sounds very wrong to me that you deploy then copy a war file or that you define the datasource *after* the deployment.
Didn't you mean "package" instead of deploy ?
yes you are right, i have used the wrong wording. here is the correction
By now, for every targetsystem i do this:
1. edit jboss-bean.xml
2. package the app (run Ant build script)
3. copy the resulting war to the right system
But what i need is:
1. package the app (run Ant build script)
2. copy the war to all target systems
3. configure the right database into the app after deployment
define the datasource *after* the deployment.
Before using seam, i used a datasource provided by Tomcat.
i was used to specify my datasource in file context.xml in the META-INF Directory in my app.So i can edit /conf/Catalina/localhost/baz.xml after deployment.
But now i am using the microcontainer and can not make any use of a tomcat provided datasource. Am i right?
You need to use the JNDI tree of Tomcat for the datasource then (and keep JBoss JNDI for everything else)
The easiest way to do (if you are using one of the Seam example as skeleton) is to configure in:
those 2 keys:
to the tomcat JNDI values. Deleting those 2 keys should actually work just fine.
so i have to use embeddable ejb?
At the moment i use seam managed sessions as introduced with the example 'hibernate' (the derivate from the hotel booking example)
If i use embeddablke EJB as suggested, how to inject the transaction manager into a datasource provided by Tomcat?
from jboss-beans.xml: <property name="transactionManager"><inject bean="TransactionManager"/></property>
If there is no easy solution for my environment i have and will live with the little inconvinience to package my app once for every database. (Concrete: I have to write an anttask for changing the attribute connectionUrl in jboss-beans.xml inside a war and than deploy this war to tomcat. )