[Design of POJO Server] - Re: JRMPProxyFactory equivalent for POJO Services
by ron.sigal@jboss.com
"bstansberry(a)jboss.com" wrote :
| The JNDI binding could be done via an @JNDI annotation:
|
That's pretty cool. So, it looks like there are three votes in favor of removing the JNDI binding step from RemotingProxyFactory. OK.
bstansberry(a)jboss.com" wrote :
| If the "factory" element supported a nested "bean" element it would be a bit cleaner.
|
Just to be sure I understand, you're talking about a microcontainer feature, right, not something I should do with RemotingProxyFactory?
I think the use of the factory element here is also pretty cool. The one thing that strikes me is that the bean with the factory element is defined with a single interface class, even though the proxy will, in fact, implement two interfaces. I certainly don't know the microcontainer internals, but superficially it seems like a bean with a factory element could live without a class attribute, since it could be derived from the factory method's return type.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166540#4166540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166540
17 years, 8 months
[Design of POJO Server] - Re: CNFE when using PojiProxy/Remoting
by ALRubinger
Oddly this is thrown from the server VM, not the client, at:
07-24-2008 21:10:04: ERROR: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ts.tests.ejb30.sec.stateful.common.lTest (no security manager: RMI class loader disabled)
at org.jboss.aop.joinpoint.MethodInvocation.getArguments(MethodInvocation.java:318)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:118)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:847)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:681)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:634)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:459)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:197)
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166537#4166537
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166537
17 years, 8 months
[Design of POJO Server] - CNFE when using PojiProxy/Remoting
by ALRubinger
In integrating EJB3 Proxy w/ EJB3 Core I'm occasionally coming across a CNFE when making a remote invocation from the client to the Container.
// Create a POJI Proxy to the Container
| Interceptor[] interceptors =
| {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
| PojiProxy handler = new PojiProxy(this.getContainerName(), locator, interceptors);
| Class<?>[] interfaces = new Class<?>[]
| {InvokableContext.class};
| InvokableContext<? extends ContainerMethodInvocation> container = (InvokableContext<?>) Proxy.newProxyInstance(
| interfaces[0].getClassLoader(), interfaces, handler);
| ...
|
| // Invoke
| Object result = container.invoke(proxy, invokedMethod, args);
|
Exception received is below. What do I need to do to get the RMI CL enabled, manually put a security manager in place?
Caused by: java.lang.ClassNotFoundException: com.sun.ts.tests.ejb30.sec.stateful.common.lTest (no security manager: RMI class loader disabled)
| at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:531)
| at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
| at org.jboss.system.JBossRMIClassLoader.loadProxyClass(JBossRMIClassLoader.java:82)
| at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
| at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
| at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
| at org.jboss.aop.joinpoint.MethodInvocation.getArguments(MethodInvocation.java:309)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:118)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:847)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:681)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:634)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:459)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:197)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:203)
| at org.jboss.remoting.Client.invoke(Client.java:1685)
| at org.jboss.remoting.Client.invoke(Client.java:589)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.proxy.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
| at $Proxy3.invoke(Unknown Source)
| at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:121)
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166524#4166524
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166524
17 years, 8 months
[Design of POJO Server] - Re: JRMPProxyFactory equivalent for POJO Services
by bstansberry@jboss.com
The JNDI binding could be done via an @JNDI annotation:
| <bean name="SampleTarget" class="org.jboss.aspects.remoting.test.proxy.SampleTarget"/>
|
| <bean name="SampleTargetProxyFactory" class="org.jboss.aspects.remoting.RemotingProxyFactory">
| <property name="target"><inject bean="SampleTarget"/></property>
| <property name="interfaces">
| <array elementClass="java.lang.Class">
| <value>org.jboss.aspects.remoting.test.proxy.SampleInterface1</value>
| <value>org.jboss.aspects.remoting.test.proxy.SampleInterface2</value>
| </array>
| </property>
| <property name="dispatchName">proxyTest</property>
| <property name="invokerLocator">socket://0.0.0.0:4873</property>
| <property name="interceptors">
| <list elementClass="java.lang.String">
| <value>org.jboss.aspects.remoting.test.proxy.FactorInterceptor</value>
| <value>org.jboss.aspects.remoting.test.proxy.AddendInterceptor</value>
| </list>
| </property>
| </bean>
|
| <bean class="org.jboss.aspects.remoting.test.proxy.SampleInterface1">
|
| <annotation>
| @org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="proxyTestJNDI")
| </annotation>
|
| <constructor factoryMethod="getProxy">
| <factory bean="SampleTargetProxyFactory"/>
| </constructor>
|
| </bean>
|
If the "factory" element supported a nested "bean" element it would be a bit cleaner.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166517#4166517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166517
17 years, 8 months