Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.Application


 
  private Application explodeArchive() throws Exception
  {
           
            // first explode the ear file
            Application appDesc = J2EEModuleExploder.explodeEar(request.getFileSource().getFile(), getAppDir());          
            appDesc.setRegistrationName(request.getName());
           
            request.setDescriptor(appDesc);
            getXMLDir().mkdirs();
            getJWSDir().mkdirs();
            getStubsDir().mkdirs();
View Full Code Here


  private void runJSPC() throws IASDeploymentException
  {
      if(!request.getPrecompileJSP())
    return;
     
      Application app = request.getDescriptor();
      Set webBundleDescriptors = app.getWebBundleDescriptors();
            if (webBundleDescriptors == null) {
                return;
            }

            Iterator itr = webBundleDescriptors.iterator();
View Full Code Here

  protected void postDeploy() throws ConfigException, IASDeploymentException
  {
                // handle undeleted files if there is any
                handleUndeletedFiles();

    Application applicationDD = request.getDescriptor();
                       getManager().registerDescriptor(applicationDD.getRegistrationName(),
                                                       applicationDD);
    DeploymentEventInfo info = new DeploymentEventInfo(
      getAppDir(), getStubsDir(),
      applicationDD, getRequest());
    DeploymentEvent ev = new DeploymentEvent(
      DeploymentEventType.POST_DEPLOY, info);
    DeploymentEventManager.notifyDeploymentEvent(ev);

    // need to populate web security PolicyConfig
    for (Iterator iter = applicationDD.getWebBundleDescriptors().iterator(); iter.hasNext();)
    {
      WebSecurityManager.createManager((WebBundleDescriptor)iter.next(),true);
    }
    // need to populate ejb security PolicyConfig

                for (Object ejbBundleDescObj : applicationDD.getEjbBundleDescriptors()) {
                    for (Object ejbDescObj : ((EjbBundleDescriptor)ejbBundleDescObj).getEjbs()) {
                        EJBSecurityManager.createManager((EjbDescriptor)ejbDescObj,false);
                    }
    }
View Full Code Here

   */
  protected List getModuleClasspath(Archivist archivist,
                AbstractArchive archive) throws IASDeploymentException
  {
      try {
                Application application = request.getDescriptor();
                if (application==null) {
                    application = (Application)archivist.readStandardDeploymentDescriptor(archive);
                    application.setRegistrationName(request.getName());
                }
        return EJBClassPathUtils.getAppClassPath(
                  application, request.getDeployedDirectory().getAbsolutePath(), getManager());
      } catch(Exception e) {
    throw new IASDeploymentException(e);
View Full Code Here

  /**
   * @return a fully initialized and validated deployment descriptors for this
   * deployment request.
   */
  protected Application loadDescriptors() throws IASDeploymentException {
            Application app = super.loadDescriptors();
            (new com.sun.enterprise.webservice.WsUtil()).genWSInfo(app, request);
            return app;
        }
View Full Code Here

       protected void generatePolicy() throws IASDeploymentException {
     try{
               // generate policy for all web modules with
               // moduleName + contextRoot and then generate for ejbs
               // with Appname
                Application applicationDD = request.getDescriptor();
                                                      
                // link with the ejb name      
                String linkName = null;
                boolean lastInService = false;
                for (Iterator iter = applicationDD.getWebBundleDescriptors().iterator();
                        iter.hasNext();){
                    String name
                        = WebSecurityManager.getContextID((WebBundleDescriptor)iter.next());
                    lastInService = SecurityUtil.linkPolicyFile(name, linkName, lastInService);
                    linkName = name;
    }                                  
                for (Iterator iter = applicationDD.getEjbBundleDescriptors().iterator(); iter.hasNext();) {
                    String name =
                        EJBSecurityManager.getContextID((EjbBundleDescriptor)iter.next());
                    lastInService = SecurityUtil.linkPolicyFile(name, linkName, lastInService);
                    linkName = name;
                }
                // generate policies
               for (Iterator iter = applicationDD.getWebBundleDescriptors().iterator();
                        iter.hasNext();){
                    String name
                        = WebSecurityManager.getContextID((WebBundleDescriptor)iter.next());
                    SecurityUtil.generatePolicyFile(name);
    }                              
                for (Iterator iter = applicationDD.getEjbBundleDescriptors().iterator(); iter.hasNext();) {
                    String name =
                        EJBSecurityManager.getContextID((EjbBundleDescriptor)iter.next());
                    SecurityUtil.generatePolicyFile(name);
                }
               ModuleType mt = XModuleType.getModuleType("org.jvnet.glassfish.comms.deployment.backend.SipArchiveDeployer");
               Set extDescSet = applicationDD.getBundleDescriptors(mt);
               // Set extDescSet = applicationDD.getExtnBundleDescriptors();

               Iterator sitr = extDescSet.iterator();
               while (sitr.hasNext()) {
                   //BundleDescriptor bd = sitr.next();
View Full Code Here

        /*
         *Get the module descriptors (if any) for eligible nested app clients.
         *If there are any, start Java Web Start services for this app and
         *those eligible app clients.
         */
        Application app = event.getApplication();
        ModuleDescriptor [] mds = NamingConventions.getEligibleAppclientModuleDescriptors(app);
        if (mds.length > 0) {
            try {
                if (eventType == event.AFTER_APPLICATION_LOAD) {
                    jwsInfo.startJWSServicesForApplication(app, mds, event.getConfigContext());
                } else if (eventType == event.BEFORE_APPLICATION_UNLOAD) {
                    jwsInfo.endJWSServicesForApplication(app, mds, event.getConfigContext());
                }
            } catch (Throwable thr) {
                _logger.log(Level.SEVERE, "Error updating Java Web Start information for application " + app.getRegistrationName(), thr);
            }           
        }

    }
View Full Code Here

        }
       
        /*
         *Find out if this app client is eligible for Java Web Start access.
         */
        Application app = event.getApplication();
       
        /*
         *The Application object wraps the app client, so there should be only
         *a single nested module (at most) representing the app client itself.
         */
        ModuleDescriptor [] mds = NamingConventions.getEligibleAppclientModuleDescriptors(app);
       
        if (mds.length > 1) {
            _logger.warning("During app client loading, expected exactly one app client module in the wrapping application but found more; using the first one and ignoring the others");
        } else if (mds.length == 0) {
            _logger.warning("During app client loading, expected exactly one app client module in the wrapping application but found none; ignoring this app client and continuing");
            return;
        }
       
        try {
            if (eventType == event.AFTER_APPLICATION_CLIENT_LOAD) {
                jwsInfo.startJWSServicesForAppclient(app, mds[0], event.getConfigContext());
            } else if (eventType == event.BEFORE_APPLICATION_CLIENT_UNLOAD) {
                jwsInfo.endJWSServicesForAppclient(app, mds[0], event.getConfigContext());
            }
        } catch (Throwable thr) {
            _logger.log(Level.SEVERE, "Error updating Java Web Start information for app client " + app.getRegistrationName(), thr);
        }
    }
View Full Code Here

  /**
   * @return a fully initialized and validated deployment descriptors for this
   * deployment request.
   */
  protected Application loadDescriptors() throws IASDeploymentException {
            Application app = super.loadDescriptors();
            (new com.sun.enterprise.webservice.WsUtil()).genWSInfo(app, request);
            return app;
        }
View Full Code Here

   
    public void run(EjbcContext context) throws Exception {
        rootLocation_ = new FileArchive();
        rootLocation_.open(context.getSrcDir().getAbsolutePath());
        this.context = context;
        Application application = context.getDescriptor();
        application.visit((ApplicationVisitor) this);
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.Application

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.