-
1. Re: Session Bean and JDBC
p_d_austin Oct 27, 2001 6:50 AM (in response to nietsnie)try using java:/DefaultDS instead as JBoss binds datasources in the java:/ namespace.
Paul -
2. Re: Session Bean and JDBC
danch1 Oct 28, 2001 1:25 AM (in response to nietsnie)You really should map the database pool into the beans environment naming context using a resource reference in ejb-jar.xml and jboss.xml. This will allow you to do lookups at 'java:comp/env/jdbc/Whatever' and map that to 'java:/DefaultDS' for JBoss and 'jdbc/DefaultDS' with Orion - this way your code doesn't change, you simply provide different (container-specific) descriptors for different containers.
-
3. Re: Session Bean and JDBC
nietsnie Oct 28, 2001 11:35 AM (in response to nietsnie)awesome.
Thanks plenty. -
4. Re: Session Bean and JDBC
cdemyanovich Feb 26, 2002 4:09 PM (in response to nietsnie)My situation is similar to that of the person who started the thread. It differs, however, in that I want to be able to query a different database as circumstances dictate: for each subsidiary at which my component is deployed, the query and the datasource will vary. Declaring a resource reference in the ejb-jar.xml and jboss.xml deployment descriptors per subsidiary is not as dynamic a solution that I intended to create. Must I declare the resource reference, or is there a more dynamic way to accomplish my goal?
Thanks for your help,
Craig