Hello!

I got a really important problem and i can't find a solution yet.
Is there a way to get a RMI service running inside a porlet?
Before initiating the rmi binding inside the portlet I started
an rmiregistry on port 1100.

This is the code inside the portlet


  | public void init(PortletConfig portletConfig) throws PortletException {     
        
  |             PlayableGamesContainer playableGamesContainer = new 
PlayableGamesContainer();
  |             
portletConfig.getPortletContext().setAttribute("playableGamesContainer", 
playableGamesContainer);
  |             try {
  |                     IPortalService bridge = new 
PortalServiceImpl(playableGamesContainer);
  |                     Naming.rebind("rmi://127.0.0.1:1100/PortalService", 
bridge);
  |             } catch (Exception e) {
  |                     throw new PortletException(e);
  |             }
  |             super.init(portletConfig);
  |     }
  | 

This is the client I'm trying to connect with



  | public TestClient() throws MalformedURLException, RemoteException,
  |                     NotBoundException {
  |             //UnicastRemoteObject.exportObject(this);
  |             System.setProperty("java.security.policy", "client.policy");
  |             System.setSecurityManager(new java.rmi.RMISecurityManager());
  |             IPortalService bridge = (IPortalService) Naming
  |                             .lookup("rmi://127.0.0.1:1100/PortalService");
  | 
  |             IPortalContext game = bridge.registerGame(new 
GameConfigurationImpl());
  | 
  |             game.setMatchListener(this);
  |     }
  | 

What I get is an access denied error from the server. If I setup
a new SecurityManager inside the portlet I don't get this error,
but it seems the a new security manager overwrites a jboss internal
one. Cause I get lots of access denied errors for the jboss internal
methods in the console. Any suggestions? Is there a way to get
RMI working?

Kind regards
Sascha

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125393#4125393

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125393
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to