You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Bruce Snyder (JIRA)" <ji...@apache.org> on 2008/01/24 20:09:24 UTC

[jira] Created: (SM-1208) Try to find a way to bridge to existing JNDI context in app servers

Try to find a way to bridge to existing JNDI context in app servers 
--------------------------------------------------------------------

                 Key: SM-1208
                 URL: https://issues.apache.org/activemq/browse/SM-1208
             Project: ServiceMix
          Issue Type: New Feature
    Affects Versions: 3.2.1, 3.2.2, 3.3
            Reporter: Bruce Snyder


When ServiceMix is deployed to an application server that already has a JNDI context, we need to try to find a way to bridge to that context. This is so that lookups from within JBI components will use the exiting JNDI context in the app server. Currently, the ServiceMix WAR deployment does nothing for JNDI and configuring a {{SpringIniitalContextFactory}} is very limited to only those beans that are placed in the {{jndiEntries}} bean-ref. 

E.g., access to the JBoss JNDI context is restricted to to the thread of control from the app server. Below is the documentation from [chapter 3|http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch3.chapter.html] on this topic: 

{panel}
_'An application component environment is a local environment that is accessible only by the component when the application server container thread of control is interacting with the application component. This means that an EJB Bean1 cannot access the ENC elements of EJB Bean2, and vice versa. Similarly, Web application Web1 cannot access the ENC elements of Web application Web2 or Bean1 or Bean2 for that matter. Also, arbitrary client code, whether it is executing inside of the application server VM or externally cannot access a component's java:comp JNDI context. The purpose of the ENC is to provide an isolated, read-only namespace that the application component can rely on regardless of the type of environment in which the component is deployed. The ENC must be isolated from other components because each component defines its own ENC content. Components A and B, for example, may define the same name to refer to different objects."_
{panel} 

This restricts spec compliant lookups from the {{java:comp/env}} context from within a JBI component, even with the correct mappings {{web.xml}} and {{jboss-web.xml}} files due to the thread-based restriction. 

We need to research this further to see if there's any way to work around this and provide access to the {{java:comp/env}} context in the container in which ServiceMix is deployed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.