Esther,

I think the problem (now is how you're specifying the JNDI-based name to the 
'lookup()' method.  Here's some code I used for a BMP bean I wrote:

  |     private DataSource jdbcFactory;
  | 
  |     private Connection getConnection () throws Exception {
  |         InitialContext c = null;
  |         Connection conn = null;
  | 
  |         try {
  |             if (jdbcFactory == null) {
  |                 c = new InitialContext();
  |                 jdbcFactory = (DataSource) c.lookup
  |                   ("java:comp/env/jdbc/MySQL-esb");
  |             }
  |             conn = jdbcFactory.getConnection();
  |         } catch (Exception e) {
  |             throw e;
  |         }
  |         return conn;
  |     }
  | 
Try specifying the name as 'java:comp/env/jdbc/...' vs. 
'java:/comp/env/jdbc/...' and see what happens.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3859631


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to