Hi, Please forgive the question if there is already a posted answer; I did search but I cannot seem to find this one.

I have a legacy EJB deployed and running in JBoss App Server. I am attempting to call the EJB using FUSE 4.1 from a successfully deployed OSGi bundle.

The EJB client call, itself, works perfectly, outside of FUSE. Once within my Impl class, however, I see that javax.naming.InitialContext seems to be wrapped around by the org.apache.servicemix OSGI naming classes when I attempt the lookup of the EJB name. Thus, the lookup then throws the javax.naming.NotContentException.

I did use the "wrap" command for my client EJB jars within the OSGi container to resolve the bundle constraints. However, I've not used "bnd" yet.

Has anyone else already faced this issue regarding the naming package? If using "bnd" is the answer, can you please post a short sample?

Sorry have not done this myself yet but it seem you are not even getting to the JBoss JNDI registry there.

When you create your InitialContext in your Impl class, you should be able to pass in an HashTable of environment entries. Have you tried setting the JNDI properties (URL and provider class) accordingly and pass them into the call to new InitialContext()? That might get you connected to the JBoss JNDI service.

Once you can lookup the EJBs home interface, it will take you further.

The hashtable of properties are being set properly and occur prior to my lookup call. All of this same code runs perfectly outside of FUSE as both a stand-alone Java application as well as within a completely different ESB.

I believe the trouble here is related to FUSE ESB overriding my JBoss settings with their own Naming package.