Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.ProfileService


      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();
      }
      // Reload
      activeView.load();
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

    */
   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 = new ProfileKey(PROFILESERVICE_SERVER_NAME);
      assertTrue("keys contains profileservice", keys.contains(defaultKey));
   }
View Full Code Here

    */
   public void testNonAdminProfileKeys()
      throws Exception
   {
      login("jduke", "theduke".toCharArray());
      ProfileService ps = getProfileService();
      try
      {
         Collection<ProfileKey> keys = ps.getProfileKeys();
         fail("jduke was able to invoke getProfileKeys, keys: "+keys);
      }
      catch(Exception e)
      {
         log.info("jduke calling getProfileKeys failed as expected, "+e.getMessage());
View Full Code Here

    */
   public void testProfileKeys()
      throws Exception
   {
      login("javaduke", "anotherduke".toCharArray());
      ProfileService ps = getProfileService();
      Collection<ProfileKey> keys = ps.getProfileKeys();
      log.info("getProfileKeys: "+keys);
      ProfileKey defaultKey = new ProfileKey("all");
      assertTrue("keys contains default", keys.contains(defaultKey));
      logout();
   }
View Full Code Here

   protected ProfileService getProfileService()
      throws Exception
   {
      InitialContext ctx = super.getInitialContext();
      ProfileService ps = (ProfileService) ctx.lookup("SecureProfileService/remote");
      return ps;
   }
View Full Code Here

   @Test
   public void shouldBeAbleToExtractData() throws Exception
   {
      InitialContext ctx = createContext();
      ProfileService profile = (ProfileService) ctx.lookup("ProfileService");

      ProtocolMetaData metaData = ManagementViewParser.parse("test.war", profile);
     
      Assert.assertNotNull(metaData);
     
View Full Code Here

   private void initDeploymentManager() throws Exception
   {
      String profileName = configuration.getProfileName();
      InitialContext ctx = new InitialContext();
      ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
      deploymentManager = ps.getDeploymentManager();
      ProfileKey defaultKey = new ProfileKey(profileName);
      deploymentManager.loadProfile(defaultKey, false);
      VFS.init();
   }
View Full Code Here

      }
    }
   
    protected ProfileService getProfileService()
    {
        ProfileService profileService = null;
        InitialContext initialContext;
       
        try {
            initialContext = new InitialContext();
        } catch (NamingException e) {
View Full Code Here

      }
    }

    protected ManagementView getCurrentProfileViewUnsecured()
    {
        ProfileService profileService = getProfileService();
        ManagementView currentProfileView = profileService.getViewManager();
      
        try {
            currentProfileView.load();
        } catch (Exception e) {
            log.error("Could not find default Profile in Current Profile View", e);
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.