Hi Eric,
We use this service for looking up Beans, works a treat.
1. The Provider & factory can be defined in properties file
2. Use the service to return a Context
3. Perform a Lookup in the context to find what you're looking for.
If I look at your code below I would say you could use the service for this.
HTH
/c
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 2:50 AM
Subject: How to use the TurbineNamingService?
> Hi all,
>
> I looked at the TurbineNamingService, but I can't seem to figure out if I
> should be using it or not. I have code like this:
> javax.naming.Context initCtx = new
> InitialContext();
> javax.naming.Context envCtx =
> (javax.naming.Context) initCtx.lookup("java:comp/env");
> String emailDataStoreToAddress =
> (String)
> envCtx.lookup("inventory/EmailDataStoreToAddress");
>
> This code is starting to crop up in lots of places. Does the
> TurbineNamingService help with this? It doesn't seem to, but I can't tell
> from the howto at:
>
http://jakarta.apache.org/turbine/turbine-2.2.0/services/naming-service.html
> , that doesn't seem to reference it. Unless the service is just to hook
up
> to JNDI?
>
> It seems that it would be nice to be able to tell TurbineNamingService to
> get all values that start with "inventory" or something.. And just cache
> them locally in a hashtable. Would that be faster then using JNDI every
> time?
>
> Eric Pugh
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]