Hello,

I saw in the 2,4 release notes:

With the contextDataSource attribute you can use existing DataSource-Object fromservlet-context-scope (e.g. from struts-config.xml): you just have to add a "contextDataSource" property to dbforms-config.xml with the name of the scoped-Variable.

So would this be it

<dbconnection
contextDataSource="lds"
id="non-jndi_local"
name = "jdbc:mysql://localhost:3306/FluencyBuilder?useUnicode=true&amp;characterEncoding=Shift_JIS"
isJndi = "false"
conClass = "org.gjt.mm.mysql.Driver"
username = "xx"
password = "xx"
/>


Then in code...

DataSource local_ds = (DataSource) config.getServletContext().getAttribute("lds");

I tried that from an interceptor but couldn't get it to work (of course local_con = config.getConnection("non-jndi_local"); is what I really use in an interceptor but just wanted to tryit.

Let me know what works and I'll update the section on multiple database connections.
--
Shawn


Karma is immutable, so act accordingly!



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
DbForms Mailing List


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

Reply via email to