if (useInternalJNDI)
{
// bind the current JNDI context to this service thread.
JNDIComponent jndi = (JNDIComponent) componentManager
.getComponent(JNDIComponent.class);
if (jndi != null)
{
try
{
jndi.bindToCurrentThread();
}
catch (NamingException e)
{
throw new JetspeedException("Unable bind jndi: "+e.toString(), e);
}