In James, we use Excalibur/Cornerstone to define Excalibur-style
datasources... is there a way to expose these same datasources as J2EE style
datasource?
Said in code... assume the datasource gets configured in the conf file is
called "maildb". Now we get the Connection this way...
DataSourceSelector datasources =
(DataSourceSelector)componentManager.lookup( DataSourceSelector.ROLE );
DataSourceComponent datasource =
(DataSourceComponent)datasources.select("maildb");
Connection conn = datasource.getConnection();
I'd like to be able to do...
Context env = (Context) new InitialContext().lookup("java:comp/env");
DataSource source = (DataSource) env.lookup("jdbc/maildb");
Connection conn = source.getConnection();
I don't really know how the Context or InitialContext approach works, but it
doesn't seem like it would be that difficult.
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]