Package com.sun.enterprise

Examples of com.sun.enterprise.NamingManager


    {
        try {
            if ((name == null) || (name.length() == 0)) {
                return new InitialContext();
            } else {
                NamingManager nm = Switch.getSwitch().getNamingManager();
                return nm.restoreJavaCompEnvContext(name);
            }
        } catch (NamingException namEx) {
            IOException ioe = new IOException();
            ioe.initCause(namEx);
            throw ioe;
View Full Code Here


     */
    protected synchronized void stop() {
        super.stop();
        try {
            Switch sw = Switch.getSwitch();
            NamingManager namingMgr = sw.getNamingManager();
            if (namingMgr != null) {
                namingMgr.unbindObjects((WebBundleDescriptor)
                    webBundleDescriptor);
            }
        } catch (NamingException ex) {
            logger.log(Level.WARNING, context.getName() +
                " failed to unbind namespace");
View Full Code Here

     */
  public synchronized void undeployResource(Object resource)
            throws Exception {

        // naming manager - provides jndi support
        NamingManager namingMgr = getAppServerSwitchObject().getNamingManager();

        com.sun.enterprise.config.serverbeans.MailResource mailRes =
            (com.sun.enterprise.config.serverbeans.MailResource) resource;

        // converts the config data to j2ee resource
        J2EEResource j2eeResource =
            IASJ2EEResourceFactoryImpl.toMailJ2EEResource(mailRes);

        // removes the resource from jndi naming
        namingMgr.unpublishObject(j2eeResource.getName());

        // resource installer
        ResourceInstaller installer = getAppServerSwitchObject().getResourceInstaller();

        // removes the resource from the collection
View Full Code Here

    /**
     * Get the initial naming context.
     */
    public InitialContext getInitialContext() {
        // XXX: cleanup static instance variables
        NamingManager mgr = Switch.getSwitch().getNamingManager();
        if (mgr == null) {
            return null;
        }
        return (InitialContext)(mgr.getInitialContext());
    }
View Full Code Here

        }
    }

    public synchronized void undeployResource(Object resource)
            throws Exception {
        NamingManager namingMgr = Switch.getSwitch().getNamingManager();
        PersistenceManagerFactoryResource configPMFRes =
                (PersistenceManagerFactoryResource)resource;
        namingMgr.unpublishObject(configPMFRes.getJndiName());

        ResourceInstaller installer = Switch.getSwitch().getResourceInstaller();
        installer.removeResource(
                IASJ2EEResourceFactoryImpl.toPMFJ2EEResource(configPMFRes));
    }
View Full Code Here

     */
  public synchronized void undeployResource(Object resource)
            throws Exception {

        // naming manager - provides jndi support
        NamingManager namingMgr = Switch.getSwitch().getNamingManager();

        com.sun.enterprise.config.serverbeans.CustomResource customRes =
            (com.sun.enterprise.config.serverbeans.CustomResource) resource;

        // converts the config data to j2ee resource
        J2EEResource j2eeResource =
            IASJ2EEResourceFactoryImpl.toCustomJ2EEResource(customRes);

        // removes the resource from jndi naming
        namingMgr.unpublishObject( j2eeResource.getName() );

        // resource installer
        ResourceInstaller installer = Switch.getSwitch().getResourceInstaller();

        // removes the resource from the collection
View Full Code Here

      Utility.checkJVMVersion();
      // Initialize the ORB if not already started.
      ORBManager.getORB() ;

      Switch theSwitch = Switch.getSwitch();
      NamingManager nm = new NamingManagerImpl();
      theSwitch.setNamingManager(nm);
     
      RealmManager mgr = new RealmManager();
      mgr.init(); // Initialize the Authentication Service ...
      mgr.start(); // Start the Server.
View Full Code Here

    os = null;               
  }

  protected synchronized void publishJNDI() {
    try {
      NamingManager namingManager = Switch.getSwitch().getNamingManager();

      String jndiName1 = OverloadNotifier.class.getName();
      if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, "Publishing the object " + jndiName1);
      }
      Object o1 = OverloadFactoryImpl.newInstance(jndiName1,
          org.glassfish.comms.api.overload.OverloadNotifier.class);
      namingManager.publishObject(jndiName1, o1, true);

      String jndiName2 = OverloadDetectionRegistrar.class.getName();
      if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, "Publishing the object " + jndiName2);
      }
      Object o2 = OverloadFactoryImpl
          .newInstance(
              jndiName1,
              org.glassfish.comms.api.overload.OverloadDetectionRegistrar.class);
      namingManager.publishObject(jndiName2, o2, true);
    } catch (NamingException ne) {
      ne.printStackTrace();
    }
  }
View Full Code Here

        // bind to JNDI namespace
  try{

            Reference ref = aor.createAdminObjectReference();
            NamingManager nm = Switch.getSwitch().getNamingManager();
            nm.publishObject(jndiName, ref, true);

        } catch (NamingException ex) {
      String i18nMsg = localStrings.getString(
          "aira.cannot_bind_admin_obj");
            throw new ConnectorRuntimeException( i18nMsg );
View Full Code Here

TOP

Related Classes of com.sun.enterprise.NamingManager

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.