• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting connection from stateless session bean in borland application server

Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m using borland Application Server
which cretaes two xml files while deploying
and ejb-inprise.xml
It provides wizard for getting connection through entity beans
and makes the followin entries in
<url>jdbc dbc:Gaurav</url>
i changed this xml by adding
this----> <resource-ref>
is --><res-ref-name>jdbc/DataSource</res-ref-name>
the added---><jndi-name>DataSource</jndi-name>
code----> </resource-ref>

Now in any of the business method of my session bean (stateless)
I try to get a connection to the database
javax.sql.Datasource ds;
java.sql.Connection con = ds.getConnection
but i m not getting connection
if the same thing is done using BMP and entity bean wizard
then the same code gets you the connection for BMP as well as CMP beans
can anyone suggest me as to where i might be wrong
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic