I am having trouble connecting to the Hypersonic database that comes with JBoss 3.2.1.
The exception is: java.naming.NameNotFoundException: defaultDS not bound.
Could someone tell me how I can make the connection work?
-----------------In the DAO class----------------------
DataSource ds;
InitialContext c = null;
c = new InitialContext();
this.ds = (DataSource)c.lookup("java:comp/env/jdbc/defaultDS");
---------------- in ejb-jar.xml -------------------
<session >
| <description><![CDATA[]]></description>
|
| <ejb-name>Test</ejb-name>
|
| <home>TestHome</home>
| <remote>Test</remote>
| <ejb-class>TestSession</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
|
| <resource-ref >
| <res-ref-name>jdbc/DefaultDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
|
| </session> ---------------- In jboss.xml ---------------
<session>
| <ejb-name>Test</ejb-name>
| <jndi-name>TestBean</jndi-name>
| <resource-ref>
| <res-ref-name>jdbc/DefaultDS</res-ref-name>
| <jndi-name>java:/DefaultDS</jndi-name>
| </resource-ref>
| </session>
anonymous wrote :
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834306#3834306
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834306
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user