Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.ProfileService


                InitialContext ic  = new InitialContext(env);
               
                try {
                  return (ProfileService)ic.lookup(PROFILE_SERVICE_JNDI_NAME);
                } catch(NamingException e) {
                  ProfileService ps =  (ProfileService)ic.lookup(SECURE_PROFILE_SERVICE_JNDI_NAME);
                  return (ProfileService)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {ProfileService.class}, new JaasSecurityHandler(ps, this.userName, this.password));
                }
          } catch(NamingException e) {
            throw new AdminComponentException(e);
          } finally {
View Full Code Here


    */
   public void testProfileKeys()
      throws Exception
   {
      InitialContext ctx = super.getInitialContext();
      ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
      Collection<ProfileKey> keys = ps.getActiveProfileKeys();
      log.info("getProfileKeys: "+keys);
      ProfileKey defaultKey = null;
      for(ProfileKey key : keys)
      {
         if(key.getName().equals(PROFILESERVICE_SERVER_NAME))
View Full Code Here

         protected DeploymentManager getDeploymentManager() throws Exception
         {
            if (dm == null)
            {
               InitialContext ctx = new InitialContext();
               ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
               dm = ps.getDeploymentManager();
               dm.loadProfile(defaultProfile);
               mv = ps.getViewManager();
               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();
      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();
      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());
      }
      return deployMgr;
   }
View Full Code Here

   /**
    * Unregisters the profile registered in {@link #start()}.
    */
   public void stop() throws Exception
   {     
      ProfileService profSvc = getProfileService();
      ProfileKey profKey = getProfileKey();
      if (profSvc != null &&  profKey != null)
      {
         try
         {
            // Inactivate first if needed
            if (profSvc.getActiveProfileKeys().contains(profKey))
            {
               releaseProfile();
            }
           
            profSvc.unregisterProfile(profKey);
         }
         catch (NoSuchProfileException e)
         {
            log.warn("Could not unregister unknown profile " + profKey);
         }
View Full Code Here

      throws Exception
   {
      if( activeView == null )
      {
         InitialContext ctx = getInitialContext();
         ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
         activeView = ps.getViewManager();
      }
      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();
      }
      // Reload
      activeView.load();
      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());
      }
      return deployMgr;
   }
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.