Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.ProfileService


         protected DeploymentManager getDeploymentManager() throws Exception
         {
            if (dm == null)
            {
               InitialContext ctx = new InitialContext();
               ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
               dm = ps.getDeploymentManager();
               dm.loadProfile(defaultProfile);
               return dm;
            }
            return dm;
         }
View Full Code Here


   }

   protected ManagementView getManagementView() throws Exception
   {
      InitialContext ctx = getInitialContext();
      ProfileService ps = (ProfileService)ctx.lookup("ProfileService");
      ManagementView activeView = ps.getViewManager();
      activeView.load();
      // Init the VFS to setup the vfs* protocol handlers
      VFS.init();
      return activeView;
   }
View Full Code Here

    */
   protected ManagementView getManagementView()
      throws Exception
   {
      InitialContext ctx = getInitialContext();
      ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
      ManagementView activeView = ps.getViewManager();
      activeView.load();
      // Init the VFS to setup the vfs* protocol handlers
      VFS.init();   
      return activeView;
   }
View Full Code Here

      throws Exception
   {
      if( deployMgr == null )
      {
         InitialContext ctx = getInitialContext();
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         deployMgr = ps.getDeploymentManager();
         deployMgr.loadProfile(getProfileKey());
         // Init the VFS to setup the vfs* protocol handlers
         VFS.init();
      }
      return deployMgr;
View Full Code Here

    protected ProfileServiceConnectionImpl doConnect()
    {
        Properties env = new Properties();
        env.setProperty(Context.PROVIDER_URL, this.providerURL);
        ProfileService profileService;
        ManagementView managementView;
        DeploymentManager deploymentManager;
        ClassLoader originalContextClassLoader = Thread.currentThread().getContextClassLoader();
        try
        {
            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
            if (this.principal != null)
            {
                env.setProperty(Context.INITIAL_CONTEXT_FACTORY, JNDI_LOGIN_INITIAL_CONTEXT_FACTORY);
                env.setProperty(Context.SECURITY_PRINCIPAL, this.principal);
                env.setProperty(Context.SECURITY_CREDENTIALS, this.credentials);
                log.debug("Connecting to Profile Service via remote JNDI using env [" + env + "]...");
                InitialContext initialContext = createInitialContext(env);
                profileService = (ProfileService)lookup(initialContext, SECURE_PROFILE_SERVICE_JNDI_NAME);
                managementView = (ManagementView)lookup(initialContext, SECURE_MANAGEMENT_VIEW_JNDI_NAME);
                deploymentManager = (DeploymentManager)lookup(initialContext, SECURE_DEPLOYMENT_MANAGER_JNDI_NAME);
            }
            else
            {
                env.setProperty(Context.INITIAL_CONTEXT_FACTORY, NAMING_CONTEXT_FACTORY);
                env.setProperty(JNP_DISABLE_DISCOVERY_JNP_INIT_PROP, "true");
                // Make sure the timeout always happens, even if the JBoss server is hung.
                env.setProperty("jnp.timeout", String.valueOf(JNP_TIMEOUT));
                env.setProperty("jnp.sotimeout", String.valueOf(JNP_SO_TIMEOUT));
                log.debug("Connecting to Profile Service via remote JNDI using env [" + env + "]...");
                InitialContext initialContext = createInitialContext(env);
                profileService = (ProfileService)lookup(initialContext, PROFILE_SERVICE_JNDI_NAME);
                managementView = profileService.getViewManager();
                deploymentManager = profileService.getDeploymentManager();
            }
        }
        finally
        {
            Thread.currentThread().setContextClassLoader(originalContextClassLoader);
View Full Code Here

   protected DeploymentManager getDeploymentManager(Context ctx)
      throws Exception
   {
      if( deployMgr == null )
      {
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         deployMgr = ps.getDeploymentManager();
         deployMgr.loadProfile(getProfileKey());
         // Init the VFS to setup the vfs* protocol handlers
         VFS.init();
      }
      return deployMgr;
View Full Code Here

   protected ManagementView getManagementView(Context ctx)
      throws Exception
   {
      if( activeView == null )
      {
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         activeView = ps.getViewManager();
         // Init the VFS to setup the vfs* protocol handlers
         VFS.init();
      }
      // Reload
      activeView.load();
View Full Code Here

   private ManagementView getManagementView(Context ctx)
      throws Exception
   {
      if( activeView == null )
      {
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         activeView = ps.getViewManager();
         // Init the VFS to setup the vfs* protocol handlers
         VFS.init();
      }
      // Reload
      activeView.load();
View Full Code Here

         env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
            "org.jnp.interfaces.NamingContextFactory");
         env.setProperty(Context.PROVIDER_URL, urls[0]);
         Context ctx = new InitialContext(env);
        
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         activeView = ps.getViewManager();
         // Init the VFS to setup the vfs* protocol handlers
         VFS.init();
      }
      activeView.load();
      return activeView;
View Full Code Here

      throws Exception
   {
      if( activeView == null )
      {
         InitialContext ctx = getInitialContext();
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         activeView = ps.getViewManager();
         // Init the VFS to setup the vfs* protocol handlers
         VFS.init();
      }
      activeView.load();
      return activeView;
View Full Code Here

TOP

Related Classes of org.jboss.profileservice.spi.ProfileService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.