aspose file tools*
The moose likes Distributed Java and the fly likes RMI application on Jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI application on Jboss" Watch "RMI application on Jboss" New topic
Author

RMI application on Jboss

George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
I am thinking of developing a webapp that would have both Swing and JSP's as its main UI's. For the Swing Client, i was thinking of using RMI to communicate with the server doing the Business Logic.
Now, i've searched many forums, and websites trying to figure out how to do a simple RMI client using Jboss as the RMI server (Can this even be done?)
If so, can you point me out to a place that would have a simple "Hello World" RMI example with the steps to Deploy that example to jboss.
If it can't be done, I guess i'm stuck writing my own rmi server, and stuff..
Thoughts/Comments/Remarks?
ahmad namini
Ranch Hand

Joined: Aug 29, 2002
Posts: 52
Hi George:
As you may know, JBoss is an EJB Container affording all the wonderful middleware that J2EE enterprise apps have come to expect. I wouldn't try to embed an RMI app into JBoss. JBoss expects components to be deployed as EJBs.
I would write your own RMI server.


-Ahmad<br />Sun Certified Java Developer (SCJD)<br />Sun Certified Java Programmer (SCJP)<p>"You got to be careful if you don't know where you're going, because you might not get there." -Yogi Berra
George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
thanks,
on to step 2 writing my server...
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
If your are using JBoss, why not just call an EJB from the Swing client?


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Tiger Scott
Ranch Hand

Joined: Mar 01, 2001
Posts: 223
George,
You can potentially use a Servlet to launch your RMI Server. Just initiate it in the init() of the servlet.
HTH
Sanjay
George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
William Duncan - Don't feel like using EJB's for some odd reason.
Tiger - Funny thing is that is what I ended up doing. But I ditched jboss, and using tomcat.
Swing > RMI in the servlet context..
Tiger Scott
Ranch Hand

Joined: Mar 01, 2001
Posts: 223
George,
I am also not using EJBs. Just don't want to take the trouble.
I am having trouble creating the iiop _Stub. The rmic -iiop is not doing that for me- creates the -tie fine. Anything special I need to do for that to happen,
Thanks
Sanjay
George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
I am not using the -iiop option.
Tiger Scott
Ranch Hand

Joined: Mar 01, 2001
Posts: 223
George,
could you run RMI on Tomcat? I have not been able to do it either on Tomcat or JBoss. I have been able to get past the codebase and policy kind of issues can deploy and start it but it gives errors of various types. The final one when I try to execute a method:
java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 1398079692 No.
Thanks
Sanjay
George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
I'll post some code later i'm @ work rightnow, and the code is a personal project.. but here is my rough design.
I have a servlet that is Auto-Init's on startup of Tomcat (.xml configuration)
In that Servlet's Init method I create the Registry
LocateRegistry.createRegistry();
Then I call out another class which does all the name binding of remote objects.
George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
is this you?
http://forum.java.sun.com/thread.jsp?forum=59&thread=419881&tstart=0&trange=15
Tiger Scott
Ranch Hand

Joined: Mar 01, 2001
Posts: 223
Yes that is me.
Also I do something identical. I am doing IIOP so the semantics are different.
Thanks
Sanjay
George McCain
Ranch Hand

Joined: May 06, 2003
Posts: 35
My Servlet

I then used rmic to compile the stubs and skel's
And then I edited the tomcat start file to add -Djava.security.policy = ....
When I start up Tomcat, it binds the services, and my RMI calls to the server works..
hope this helps your issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI application on Jboss
 
Similar Threads
Question about the RMI factory pattern
How simple can a Server be?
JBoss Remoting
Anybody interested in a sockets discussion ?
JBoss as a RMI Server