This content has been marked as final.
Show 2 replies
-
1. Re: rmi over http (httpinvoker) selectively
starksm64 Oct 22, 2004 10:49 PM (in response to fe2o3)You can have a component invocable by multiple transports at the same time. Here is an example from the testsuite that shows a stateless session bean with an RMI/JRMP and RMI/Socket transport active. The client chooses which transport to use by selecting the corresponding jndi-name for the ejb home binding, PooledStatelessSession=RMI/Socket, StatelessSession=RMI/JRMP:
<?xml version="1.0"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd"> <jboss> <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> <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> </jboss>
-
2. Re: rmi over http (httpinvoker) selectively
fe2o3 Nov 1, 2004 11:15 PM (in response to fe2o3)Works great! Thanks.
I ended up creating a custom jboss_xml.xdt and lookup.xdt xdoclet template files. They register all my remotes using the http-invoker and the standard rmi-invoker. Now my clients use their standard util classes to automagically lookup and invoke depending on some setting.