Am trying to connect to db from BMP bean but getting this error:

14:16:08,140 INFO  [EJBDeployer] Deployed: file:/D:/Udvikling/JBoss/jboss-3.2.3/
  | jboss-3.2.3/server/default/deploy/OpenBroad-0.2.5_EJB.jar
  | 14:16:08,171 INFO  [MainDeployer] Deployed package: file:/D:/Udvikling/JBoss/jbo
  | ss-3.2.3/jboss-3.2.3/server/default/deploy/OpenBroad-0.2.5_EJB.jar
  | 14:16:24,765 ERROR [STDERR] javax.naming.NameNotFoundException: OpenBroadDB not
  | bound

this is my connection:

    public Connection getConnection()
  |     {
  |         Connection connection=null;
  |         try
  |         {
  |             Context initialContext = new InitialContext();
  |             DataSource ds = (DataSource) 
initialContext.lookup("java:comp/env/OpenBroadDB");
  |             connection = ds.getConnection();
  |         }
  |         catch (NamingException e)
  |         {
  |             e.printStackTrace();
  |         }
  |         catch (SQLException e)
  |         {
  |             e.printStackTrace();
  |         }
  |         return connection;
  |     }


and this is my descripter that I deploy :


<?xml version="1.0" ?>
  | 
  | <datasources>
  |   <local-tx-datasource>
  |     <jndi-name>OpenBroadDB</jndi-name>
  |     <connection-url>jdbc:mysql://localhost/openbroad</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>root</user-name>
  |     <password></password>
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>100</max-pool-size>
  |   </local-tx-datasource>
  | </datasources>


can someone plz tell me what am doing wrong?

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3824505#3824505";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3824505>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to