you can do two things:
@Resource
  | private DataSource ds;
  | 
or
ejb-jar.xml:
  | <resource-ref>
  |     <description>DataSource</description>
  |     <res-ref-name>jdbc/MyDS</res-ref-name> 
  |     <res-type>javax.sql.DataSource</res-type>
  |     <res-auth>Container</res-auth>
  | </resource-ref>
  | 
  | jboss.xml:
  | <resource-ref>
  |    <res-ref-name>jdbc/MyDS</res-ref-name>
  |    <jndi-name>java:/MyDS</jndi-name>
  | </resource-ref>
  | 
  | your EJB code:
  | Context ctx = new InitialContext();
  | DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MyDS");
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084585#4084585

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084585
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to