0 Replies Latest reply on Jul 16, 2003 11:57 PM by dema

    Multiply J2ee applications

    dema

      Hi!

      I have a security related problem accessing the entity bean in one j2ee application from the bean in other application through local interface.

      Here is the sources:

      public static Properties getEnv() {
      if (login == null) {
      login = new Properties();
      login.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.LoginInitialContextFactory");
      login.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099/");
      login.setProperty(Context.SECURITY_CREDENTIALS, "sdkfds87sdf4df");
      login.setProperty(Context.SECURITY_PRINCIPAL, "web");
      login.setProperty(Context.SECURITY_PROTOCOL, "pcat-database");
      }
      return login;

      ------------------------------
      TreeViewer treeViewer = TreeViewerUtil.getHome(Parameters.getEnv()).create();

      TreeHolder h = treeViewer.getWebTree();
      ---------------
      public kz.alb.site.service.util.TreeHolder getWebTree() throws NamingException, FinderException {

      Collection rootTreeC = TreeUtil.getLocalHome().findByName("WEB Tree");
      .............

      -------------
      The exception is raised in findByName method:

      EJBException:; nested exception is:
      javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      Authentication exception, principal=null

      ---------
      I'm using XDoclet for generating all descriptors and other.

      What am I doing wrong? Do I need to login somewhere in the TreeViewer bean? Help me, please... I'm stuck with this problem...

      --
      With best regards, Dmitry