-
1. Re: registering datasources
sebastien_petrucci Oct 9, 2002 1:23 PM (in response to ndtemporary)Hi,
First, you really should not use the JdbcOdbcDriver bridge !! I'm not even sure that JBoss could support it...
So find the JDBC driver for your DB and copy the jar(s)
in your $JBOSS_HOME/server/<'default' most probably>/lib.
Then check in the $JBOSS_HOME/docs/examples/jca and find the template that correspond to your DB.
Make a copy of that file, edit it (you have to set the connection properties, the JNDI name, ...) and copy this file in your deploy folder. You should then see a message on the JBOSS logs. That's it.
To access to datasource, then you just have to query JNDI (java:/<the jndi name you choose>).
Good luck,
Sebastien. -
2. Re: registering datasources
ndtemporary Oct 10, 2002 12:10 AM (in response to ndtemporary)hi!
thanks for the response.
i have some questions.
if u run the default configuration in JBoss,
is the hssql-service loaded up? (ie the hypersonic sql)?
if its jndi is java:/DefaultDS how do i look it?
when i look it up using
...
Context lContext = new InitialContext();
Object lObject = lContext.lookup("java:/DefaultDS");
...
the result is:
javax.naming.NameNotFoundException: DefaultDS not bound
in my ejb-jar.xml
i have added,
<resource-ref>
DataSource for the Hypersonic database
<res-ref-name>java:/DefaultDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
so how do i correctly look it up? thanks in advance!! -