Hi Shawn,

I never used DbForms with JNDI as the interface to lookup JDBC datasources...
anyway... Have you tried a name value like:

"java:comp/env/jdbc/myDB"

??

The code is the classic:

Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(name);
con = ds.getConnection();

so "name" value (from dbforms connection config) is the full jndi lookup string used to retrieve a Datasource object.

If any look-up exception occurs (NamingException, exactly), the catch clause should log the exception:
":getConnection - cannot retrieve a connection from JNDI" + stacktrace.

Here are some samples + code working with Tomcat:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

What would the required parameters for a jndi connection in
dbforms-config.xml be?

I am using the following:

 <dbconnection
		name = "jdbc/try"
		isJndi = "true"
	/>

but get:

org.apache.jasper.JasperException: JDBC-Troubles:  was not able to
create connection using the following dbconnection: DbConnection =
id=null, name=jdbc/try, jndi=true, conClass=null, username=null,
default=false
is there a stack trace or a line number for DbForms code ??

I have jndi set up and working for other non-dbforms application in
other contexts but am confused by what should be in dbform-config.xml as
opposed to server.xml.  Yes I have the jdbc/try context in server.xml
I think you could use Tomcat:

- as JNDI server
- to register the datasource object.

Then DbForms should act as a simple client to Tomcat's JNDI interface. But as I said abone, I never tried those configs...

and yes I have <resource-ref> configured in web.xm

I guess I'll just start adding stuff and see where it takes me.

Happy Holidays everyone.  Here in Japan we work and the 24th and 25th.
The 24th, too ;^) Tomorrow... well, relax and some exercises on the guitar ... Sob, I had to start when I was 16 with those damned pieces of wood !! ;^)

Shawn
Regards,
Luca



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to