Does jetty support JNDI EventContext?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does jetty support JNDI EventContext?

Lin Ren

Hi all,

 

Here is a question for JNDI EventContext, I have a tree like JNDI name, given it “a/b/c/d”, and I bind the name as below:

 

final InitialContext context = new InitialContext();

context.addToEnvironment(DEEP_BINDING_PROP, true);

Context contextNew = contextNew.createSubcontext(“a”);

contextNew = contextNew.createSubcontext(“b”);

contextNew = contextNew.createSubcontext(“c”);

contextNew.bind (“d”, new AA());

 

And now I need add a NamespaceChangeListener under “a/b/c”, I tried to do that as below:

   namingListener = new EventReceiversListener(this);

   EventContext eventContext = (EventContext)context.lookup(“a/b/c”);

   eventContext.addNamingListener("", EventContext.ONELEVEL_SCOPE, namingListener);

                                                                                                                       

But Jetty says “org.eclipse.jetty.jndi.NamingContext cannot be cast to javax.naming.event.EventContext”. Can anyone know how to do with that?

 

 

Thanks!

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Does jetty support JNDI EventContext?

Joakim Erdfelt-8
I think you are the first person in the 21 year history of Jetty to ask about javax.naming.event.* behaviors.

The Jetty implementation has no references to anything in javax.naming.event.* so there's probably nothing that handles/implements it.


Joakim Erdfelt / [hidden email]

On Wed, Apr 11, 2018 at 1:40 AM, Lin Ren <[hidden email]> wrote:

Hi all,

 

Here is a question for JNDI EventContext, I have a tree like JNDI name, given it “a/b/c/d”, and I bind the name as below:

 

final InitialContext context = new InitialContext();

context.addToEnvironment(DEEP_BINDING_PROP, true);

Context contextNew = contextNew.createSubcontext(“a”);

contextNew = contextNew.createSubcontext(“b”);

contextNew = contextNew.createSubcontext(“c”);

contextNew.bind (“d”, new AA());

 

And now I need add a NamespaceChangeListener under “a/b/c”, I tried to do that as below:

   namingListener = new EventReceiversListener(this);

   EventContext eventContext = (EventContext)context.lookup(a/b/c”);

   eventContext.addNamingListener("", EventContext.ONELEVEL_SCOPE, namingListener);

                                                                                                                       

But Jetty says “org.eclipse.jetty.jndi.NamingContext cannot be cast to javax.naming.event.EventContext”. Can anyone know how to do with that?

 

 

Thanks!

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users