[Installation, Configuration & DEPLOYMENT] - Can custom APIs be bound in the RMI Registry started by JBos
by venkatramanan1
Team
This is Venkatramanan, a developer from AdventNet WebNMS (http://www.adventnet.com/products/webnms/index.html).
When we used JBoss 5Beta 4 to deploy, we found the below issue.
We started the default JBoss & ensured that RMI registry was running (Port 1099 & 1098 was listening). But when we tried to bind our APIs using Naming.Bind , it threw the following exception:
FileServer: non-JRMP server at remote endpoint
| java.rmi.ConnectIOException: non-JRMP server at remote endpoint
| at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
| at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
| at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
| at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
| at java.rmi.Naming.rebind(Naming.java:160)
| at FileServer.main(FileServer.java:11)
Code we used is a simple one & a sample implementation from SUN's RMI code - http://java.sun.com/developer/technicalArticles/RMI/rmi_corba - File transfer using RMI
FileInterface fi = new FileImpl("FileServer");
| Naming.bind("//127.0.0.1/FileServer", fi);
Even variations "like <IP_Address>/FileServer" or "localhost/FileServer" did not work.
When we searched with the stack trace, we found from an http://mail-archive.objectweb.org/proactive/2005-01/msg00009.html that:
"Romain" wrote : You can have a look at http://www.jboss.org/index.html?module=bb&op=viewtopic&t=27490 or go to JBOSS web site at search in the forums for rmi registry.
| Unless I misunderstood everything, you cannot use JBOSS as RMI Registry(i.e by just starting the server). Of course I am pretty sure that it is possible to start it in a separate process: in a Servlet for instance, or maybe to start it as a service, but for sure with the default configuration, when starting the server, there is no RMI Registry running by default
But I found that in JMXConnectorServerService.java, LocateRegistry.createRegistry is called. (But I doubt whether this source is called at all)
He has also referred a JBoss Forum http://www.jboss.org/index.html?module=bb&op=viewtopic&t=27490
Now can we understood this as "The registry started with JBoss cannot be used for binding Custom APIs. Atleast does it means that we have to do some more special configuration or source change to bind custom APIs in JBoss' RMI registry?"
Kindly clarify
Thanks & regards
Venkatramanan
P.S. Mistakenly posted it on http://www.jboss.com/index.html?module=bb&op=viewtopic&t=133006 & now posting it here as per Ron's request.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147113#4147113
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147113
17 years, 11 months
[JBossWS] - Re: Cannot expose EJB 3 as WS
by richard.opalka@jboss.com
Strange, it works for me.
Here's my EJB3 archive content:
| jar -tvf jaxws.jar
| 0 Mon Apr 28 08:17:42 CEST 2008 META-INF/
| 106 Mon Apr 28 08:17:40 CEST 2008 META-INF/MANIFEST.MF
| 0 Mon Apr 28 08:20:04 CEST 2008 org/
| 0 Mon Apr 28 08:20:04 CEST 2008 org/jboss/
| 0 Mon Apr 28 08:20:04 CEST 2008 org/jboss/ws/
| 0 Mon Apr 28 08:20:04 CEST 2008 org/jboss/ws/hello/
| 290 Mon Apr 28 08:20:04 CEST 2008 org/jboss/ws/hello/Hello.class
| 834 Mon Apr 28 08:20:04 CEST 2008 org/jboss/ws/hello/HelloBean.class
Here's my server console output:
| 08:22:02,562 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 08:22:02,577 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=jaxws.jar,name=HelloBean,service=EJB3 with dependencies:
| 08:22:02,854 INFO [EJBContainer] STARTED EJB: org.jboss.ws.hello.HelloBean ejbName: HelloBean
| 08:22:02,982 INFO [EJB3Deployer] Deployed: file:/opt/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA/server/default/deploy/jaxws.jar
| 08:22:03,161 INFO [DefaultEndpointRegistry] register: jboss.ws:context=jaxws,endpoint=HelloBean
| 08:22:06,156 INFO [WSDLFilePublisher] WSDL published to: file:/opt/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA/server/default/data/wsdl/jaxws.jar/HelloBeanService9073.wsdl
| 08:22:06,504 INFO [TomcatDeployer] deploy, ctxPath=/jaxws, warUrl=.../tmp/deploy/jaxws.jar9072.war/
and I'm able to access WSDL here:
http://127.0.0.1:8080/jaxws/HelloBean?wsdl
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147110#4147110
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147110
17 years, 11 months
[Messaging, JMS & JBossMQ] - Re: Creating New Connection Factory
by kahzoo
anonymous wrote : Can one tell me where i can define new connection factory in JBOSS 4.2.2 GA and how.
This depends on where your client code runs. If it runs in the same JVM as the JBoss server, you need to modiy
deploy/jms/jvm-il-service.xml
Otherwise (when your client runs remotely from the JBoss server),
deploy/jms/uil2-service.xml
Either way, if all you want to do is to change the name of the connection factory. you simply change the value of '(XA)ConnectionFactoryJNDIRef' attributes.
If you want to add a new name to an existing connecion factory, you may want to use NamingAlias bean. You can find an example of this in deploy/jms/uil2-service.xml as below.
<mbean code="org.jboss.naming.NamingAlias" name="jboss.mq:service=InvocationLayer,type=UIL">
| <attribute name="FromName">UILConnectionFactory</attribute>
| <attribute name="ToName">ConnectionFactory</attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
|
Hope this helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147101#4147101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147101
17 years, 11 months