Hi

I tried using resource refernce to access connection pool and i get the 
exception saying table does not exist.


It works only if i do a lookup of the connection pool  directly(My 
database is my sql)

                                DataSource ds = (DataSource) ctx.lookup 
("java:/MysqlDS");
                                conn = ds.getConnection ();


I tried the following


                        DataSource ds = 
(DataSource)ctx.lookup("java:comp/env/jdbc/db");
        conn = ds.getConnection();
        ...
    
ejb-jar.xml
     <resource-ref>
        <res-ref-name>jdbc/db</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/db</res-ref-name>
           <resource-name>java:/MysqlDS</resource-name>
         </resource-ref>


And i get the error table does not exist

Any clues why

Also 

Context ctx = new InitialContext();
    int foo = ((Integer)ctx.lookup("java:comp/env/ejb/ejbname"));

does not work in JSP pages

It gives name not bound excecption





_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com

Participate in crazy auctions at http://auctions.rediff.com/auctions/





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to