aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Using Java ManagedBean and RMI to access methods on a server. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Using Java ManagedBean and RMI to access methods on a server." Watch "Using Java ManagedBean and RMI to access methods on a server." New topic
Author

Using Java ManagedBean and RMI to access methods on a server.

scott coleman
Greenhorn

Joined: Dec 12, 2010
Posts: 1
Hi there everyone.
My first post on your forums as I've never usually had to post because somebody on here has asked the questions and posted the answer i was looking for.
so here it goes.

I'm using:
NetBeans 6.9
Tomcat 6.0
JSF - primeFaces
Hibernate with JPA
mySQL

What I want my system to do:
I currently have a Primefaces XHTML front end
the XHTML calls methods via a bean using the @managedBean annotation.
I then want the bean to perform an RMI call to a server class file I have running on my local machine.
This 'server' then persists data to a mySQL database.

Currently I'm just trying to get the bean-to-RMI set-up,
so i have a simple method called ping(); which gets called in the constructor of the bean.

Bean:-


ServerInterface:-


'Server':-


Error:

In the stackTrace I'm getting this error:


It happens at line:

in the bean.

If I take the code that i used in the bean, stick it in a javaclass file and run it through commandprompt then it pings the server as it should do.
So i'm guessing its got something to do with it being in a managed bean?

Can any of you guys help?
Cheers,
Scott


As a side note:
I've already done something similar,
the client RMI code was run from a servlet in tomcat and the rmi worked correctly




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Java ManagedBean and RMI to access methods on a server.