• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI application on Jboss

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
George McCain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks,
on to step 2 writing my server...
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your are using JBoss, why not just call an EJB from the Swing client?
 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not using the -iiop option.
 
Tiger Scott
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is this you?
http://forum.java.sun.com/thread.jsp?forum=59&thread=419881&tstart=0&trange=15
 
Tiger Scott
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes that is me.
Also I do something identical. I am doing IIOP so the semantics are different.
Thanks
Sanjay
 
George McCain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic