3 Replies Latest reply on Nov 12, 2004 12:47 PM by kalyan120

    Using both JNP and HTTP IL to access EJB

      Hi,

      Is there a way to access the same bean deployed in JBoss server, over both JNP and HTTP? We have ejbeans deployed on a JBoss server, which are accessed by users both inside and outside the firewall. For those inside the firewall, we want them to use JNP as it is more efficient and for those outside the firewall, we want them to use HTTP, as it requires only one port to be opened across firewall.

      While deploying the bean, if we choose the invocation layer as RMI (defined in jboss.xml), can the same bean be accessed using HTTP-Invoker, simply by changing the Context Factory used for JNDI lookup on the client?

      Apart from this, is there any other way for the client to choose the Invocation Layer (JNP vs HTTP)?

      Thanks,
      Kalyan.

        • 1. Re: Using both JNP and HTTP IL to access EJB

          I have gone through the documentation of JBoss, and figured out that this can be done. But I don't see how this can be implemented (from the documentation).

          Can someone please let me know if this is possible or not?

          Thanks,
          Kalyan.

          • 2. Re: Using both JNP and HTTP IL to access EJB
            starksm64

            You expose the ejb via the desired invokers with different jndi bindings as shown in this testsuite jboss.xml descriptor:

            <?xml version="1.0"?>
            
            <jboss>
             <invoker-proxy-bindings>
             <invoker-proxy-binding>
             <name>stateless-pooled-invoker</name>
             <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>
             <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
             <proxy-factory-config>
             <client-interceptors>
             <home>
             <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
             <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
             <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
             <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
             </home>
             <bean>
             <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
             <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
             <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
             <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
             </bean>
             </client-interceptors>
             </proxy-factory-config>
             </invoker-proxy-binding>
             </invoker-proxy-bindings>
             <enterprise-beans>
             <session>
             <ejb-name>StatelessSession</ejb-name>
             <jndi-name>StatelessSession</jndi-name>
             <invoker-bindings>
             <invoker>
             <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
             <jndi-name>PooledStatelessSession</jndi-name>
             </invoker>
             <invoker>
             <invoker-proxy-binding-name>stateless-rmi-invoker</invoker-proxy-binding-name>
             <jndi-name>StatelessSession</jndi-name>
             </invoker>
             </invoker-bindings>
             </session>
             </enterprise-beans>
            </jboss>
            



            • 3. Re: Using both JNP and HTTP IL to access EJB

              Thanks Scott

              Regards,
              Kalyan