0 Replies Latest reply on Feb 1, 2008 2:59 AM by Sascha Smutny

    JBoss Portal and RMI

    Sascha Smutny Newbie


      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://", bridge);
       } catch (Exception e) {
       throw new PortletException(e);

      This is the client I'm trying to connect with

      public TestClient() throws MalformedURLException, RemoteException,
       NotBoundException {
       System.setProperty("java.security.policy", "client.policy");
       System.setSecurityManager(new java.rmi.RMISecurityManager());
       IPortalService bridge = (IPortalService) Naming
       IPortalContext game = bridge.registerGame(new GameConfigurationImpl());

      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