0 Replies Latest reply on Feb 26, 2015 2:16 AM by valsaraj007

    Migrate ManagedConnectionFactory login module

    valsaraj007

      for (MBeanServer server : MBeanServerFactory.findMBeanServer(null)) {

                      if (server.getDefaultDomain() != null && server.getDefaultDomain().equals(getServerId())) {

                          ObjectName managedConnectionFactoryObject = new ObjectName(getManagedConnectionFactoryName());

                          ManagedConnectionFactory mcf = (ManagedConnectionFactory) server.getAttribute(managedConnectionFactoryObject, getManagedConnectionFactoryKey());

                          PasswordCredential cred = new PasswordCredential(principalName, password);

                          subject.getPrivateCredentials().add(cred);

                          cred.setManagedConnectionFactory(mcf);

                      }

                  }

       

      I have this code in custom login module working with JBoss-4,2,2.GA but in WildFly-8.2, it is not entering into the block. What is the solution to migrate this to WildFly?

       

      Thanks!