You could use the resource-ref entry:

ejb-jar.xml:

<enterprise-beans>
  | 
  |     <session>
  |             <ejb-name>ABC</ejb-name>
  | ...   
  |          <resource-ref>
  |                 <res-ref-name>myDataSource</res-ref-name>
  |                 <res-type>javax.sql.DataSource</res-type>
  |             </resource-ref>
  | ...
  |             </session>
  | ...
  | 
  | ...
  | 
jboss.xml (for other servers, they would have their own deployment descriptor):


  | <enterprise-beans>
  |             
  |          <session>
  |             <ejb-name>ABC</ejb-name>
  | ...            
  |             <resource-ref>
  |                 <res-ref-name>myDataSource</res-ref-name>
  |                 <jndi-name>java:DefaultDS</jndi-name>
  |             </resource-ref>
  | ...            
  |          </session>
  | ...
  | 

EJB code:

@Resource (name="myDataSource")
  | private DataSource myDS;

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

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

Reply via email to