Home » Developer & Programmer » JDeveloper, Java & XML » Help with DataSource question
Help with DataSource question [message #132639] Mon, 15 August 2005 07:40
nyghtfall
Messages: 1
Registered: August 2005
Junior Member
I'm VERY new to JDeveloper although I've been with Java since 1.1.7. I have a typical Model-2 architecture (JSP-struts-databag) and have tried to understand using free form datasources here.

The following code:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("java:comp/env/jdbc/<connection>");
conn = ds.getConnection();

does not work - gives a NamingException and says jdbc/<connection> not found. I substituted the true connection name with <connection>. I've created the connection through the wizard and can run a successful test inside the wizard.

When I look at the connection's tab, I see the connection and hovering over it reveals:
jdev.cm:<connection>

Am I missing something here? Sorry if this seems self explanatory - just not used to platform yet.

[Updated on: Mon, 15 August 2005 07:41]

Report message to a moderator

Previous Topic: Using Jdeveloper 10 IDE
Next Topic: Reply Wanted
Goto Forum:
  


Current Time: Fri Mar 29 03:41:05 CDT 2024