This does not make sense in general as it breaks the jndi naming scope. Perhaps an unqualified lookup from within a j2ee component could be assumed to start at the java:comp/env context. Still, its not per the spec.
Thanks for your reply. Yes, you are right that what I?d like to do breaks rules.
I want to do it because Jboss implementation is a mine of technology. I think DIY may lead me into the world of it. On the other hand, I am facing a task of migrating applications to Jboss without changing them. Because many of applications are not well developed.
I think I should pay more attention to jboss interceptors but I am failed to find interceptors of Naming. :-(
Could you give my any tip? Thanks!