[JBoss Seam] - Re: WebRemote inconsistencies
by ZeddMaxim
I think I have found the problem. It is mostly my fault, but I think a change or two in InterfaceGenerator.appendComponentSource() would ease a lot of people's headaches in the future.
My WebRemote methods are in a SFSB, with both a remote and local interface. However, the remote and local interfaces are not the same (more methods are exposed via the local than remote, including my WebRemote methods). The culprit in this situation lies with the following snippet from that method:
if ((component.getType().equals(ComponentType.STATEFUL_SESSION_BEAN) ||
| component.getType().equals(ComponentType.STATELESS_SESSION_BEAN)) &&
| component.getBusinessInterfaces().size() > 0)
| {
| type = component.getBusinessInterfaces().iterator().next();
| }
Since the method getBusinessInterfaces() returns a Set, which is not ordered, and I have 2 interfaces on my SFSB, I have (roughly) a 50/50 chance of getting my local interface returned first, which contains my WebRemote method stubs. If my remote interface is returned first, no stubs.
The solution for me is easy at this point. Expose my WebRemote methods in the remote interface as well, and it then does not matter which it grabs first.
However, in the long run, would it not make more sense to iterate all of the stateless/ful session bean's interfaces looking for WebRemote methods?
Incidentally, I admit it is not a common use case to have your local and remote interfaces be different, but the case still seems valid.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962827#3962827
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962827
19 years, 9 months
[JBoss Messaging] - Error running the wiki example
by sajid08
Hi All!,
While running the the queue example given on the wiki page
http://wiki.jboss.org/wiki/Wiki.jsp?page=QueueExample, I get the following error:
Creating jndi context - alternatively use a jndi.properties
Looking up queue
Looking up connection factory
Exception in thread "main" javax.naming.NameNotFoundException: UIL2ConnectionFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Client.main(Client.java:33)
It works alright uptil 'Looking up Queue', but after that it gives error.
It says UIL2ConnectionFactory not bound, do I have to bind UIL2ConnectionFactory? If yes then how?, I have not changed the default settings that the JBoss App. Server and JBoss Messaging install with. Please help me, I'd be very grateful!!
Regards,
Sajid.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962813#3962813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962813
19 years, 9 months