Eric Carlson wrote:
> The same problem occurs when trying to access database resources.
> Is this a dumb way of going about it?
> Perhaps there is a smarter way for soap server managed classes to see
> jndi - can you pass in a ServletContext on construction somehow?
>
I don't understand why you're loading JNDI from Sun's filesystem
provider and then you're surprised that it doesn't load Resin's objects.
Just use new InitialContext() without changing providers. The default
provider will return Resin's configured objects, just like all our examples.
-- Scott
> Please ;-)
>
> On Fri, 06 Sep 2002 00:33:55 +0100, you wrote:
>
>
>>How is this done? I need it because I have set up an Apache SOAP
>>server as a resin webapp but it basically lets you expose the methods
>>of regular classes as remote methods. Those classes don't have servlet
>>contexts and are instantiated under the control of Apache soap, so I
>>can't pass in a context easily either. I'd like to configure them
>>using jndi parameters defined in the soap servers (i.e. that
>>particular webapps) web.xml.
>>
>>Its basically the same as for a console app. The example from the sun
>>site goes like this:
>>
>>class List {
>> public static void main(String[] args) {
>>
>> // Set up the environment for creating the initial context
>> Hashtable env = new Hashtable(11);
>> env.put(Context.INITIAL_CONTEXT_FACTORY,
>> "com.sun.jndi.fscontext.RefFSContextFactory");
>> env.put(Context.PROVIDER_URL, "file:/tmp/tutorial");
>>
>> try {
>> // Create the initial context
>> Context ctx = new InitialContext(env);
>>
>>...
>>
>>I get class not found for com.sun.jndi.fscontext.RefFSContextFactory
>>when I try this in the app I described. I need to know the correct
>>values for Context.INITIAL_CONTEXT_FACTORY and Context.PROVIDER_URL in
>>this situation please.
>>
>>Thanks!
>>
>><*> Windows XP: How many total strangers do you want poking around in your PC today? <*>
>
>
>
> <*> Windows XP: How many total strangers do you want poking around in your PC today? <*
>
Received on Mon 09 Sep 2002 08:27:53 -0700
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:17 PDT