• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting connection from stateless session bean in borland application server  RSS feed

Gaurav Chikara
Ranch Hand
Posts: 413
  • 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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!