struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Van Wart <sc...@indosoft.com>
Subject Re: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application
Date Fri, 25 Aug 2006 20:13:16 GMT
Jimmy Emmanual wrote:
> 1. Bind datasource to a file system context
>
>    try {
>       Hashtable env = new Hashtable();
>       env.put(Context.INITIAL_CONTEXT_FACTORY,
> "com.sun.jndi.fscontext.RefFSContextFactory");
>       env.put(Context.PROVIDER_URL, "file:/C:/temp/jndi");
>
>   
Problem with that is, if your JNDI clients look up values in your 
provider by things like "java:/comp/env", binding them in the fscontext 
will fail on Windows :(.  "java:" (ending with a colon) isn't an 
appropriate filename on Windows.

- Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message