• Post Reply Bookmark Topic Watch Topic
  • New Topic

exception is thrown "mydb is not bound"(needs urgent help)  RSS feed

 
Atta Shah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We r three students and our final project is a BPM(Business peocess Management)system.

BPM is actually a workflow system(managing the business processes)and all the rules and constraints are applied from the Rule Management System.
we have started the implementation, and therefore we need some help related to the implementation.
We r using EJB2.0 with JBuilder9, JBoss3.2 as the application server and tomcate as the web server.

problem:
I want to create manual database connection using DataSource,
I am using mysql and database name is mydb.
I have done all the reqiured configration of mysql with Joss and it is working.
After getting the initial context, when i try to lookup the datasource, exception is thrown "mydb is not bound"
Initial context is correct because i have tried entity beans asd it works well.
code is
////////////////////////////
Hashtable contextValues = new Hashtable();
contextValues.put(Context.PROVIDER_URL, "jnp://loopback:1099");
contextValues.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
Context context = new InitialContext(contextValues);
context.lookup("java://mydb");

/////////////////////////////

Kindly help me if u find time,

Regards
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adn how did you define your datasource, in the XXX-ds.xml file you can define the JNDI name, and use that name as the lookup.

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!