Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.J2eeApplication


     * ResourceType in domain.xml should start with "system"
     * Also it should be directory deployed.
     * @return true if its a predeployed system module
     */
    public boolean isSystemPredeployed (String appIdthrows ConfigException{
        J2eeApplication ja = getJ2eeApplication(appId);
        String resourceType = ja.getObjectType();
        boolean isDirectoryDeployed = ja.isDirectoryDeployed();
        if (resourceType.startsWith(SYSTEM_PREFIX) && isDirectoryDeployed) {
            return true;
        } else {
            return false;
        }
View Full Code Here


     * Removes the application information from the configuration file.
     *
     * @param appId a unique identifier for the application
     */
    public void remove(String appId) throws ConfigException {
        J2eeApplication backJa = (J2eeApplication)
            ((Applications)configBean).getJ2eeApplicationByName(appId);
        ((Applications)configBean).removeJ2eeApplication(backJa);
    }
View Full Code Here

     * @param optionalAttributes - pairs tag/value to set
     */
    public void setOptionalAttributes(String appId, Properties optionalAttributes)
            throws ConfigException {
        if(optionalAttributes!=null) {
            J2eeApplication ja = getJ2eeApplication(appId);
            Enumeration tags = optionalAttributes.keys();
            while(tags.hasMoreElements())
            {
                String tag = (String)tags.nextElement();
                String value = optionalAttributes.getProperty(tag);
                ja.setAttributeValue(tag, value);
            }
        }
    }
View Full Code Here

    }
   
    private J2eeApplication getJ2eeApplication(String appId)
            throws ConfigException {

        J2eeApplication app = (J2eeApplication)
            ((Applications)this.configBean).getJ2eeApplicationByName(appId);

        if(app == null)
      throw new ConfigException(
                Localizer.getValue(ExceptionType.APP_NOT_EXIST));
View Full Code Here

        if (request.isExternallyManagedApp()) {
            ElementProperty extManagedProperty = new ElementProperty();
            extManagedProperty.setName(EXTERNALLY_MANAGED);
            extManagedProperty.setValue("true");
            if (appBean instanceof J2eeApplication) {
                J2eeApplication app = (J2eeApplication) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof EjbModule) {
                EjbModule app = (EjbModule) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof WebModule) {
                WebModule app = (WebModule) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof AppclientModule) {
                AppclientModule app = (AppclientModule) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof ConnectorModule) {
                ConnectorModule app = (ConnectorModule) appBean;
                app.addElementProperty(extManagedProperty);
            }
        }
       
        // Set the context root on the extension module as a property
        if(appBean instanceof ExtensionModule) {
View Full Code Here

        try {
            ConfigBean appBean = getModule(appName, type);
            if (appBean != null) {
                ElementProperty extManagedProperty = null;
                if (appBean instanceof J2eeApplication) {
                    J2eeApplication app = (J2eeApplication) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof EjbModule) {
                    EjbModule app = (EjbModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof WebModule) {
                    WebModule app = (WebModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof AppclientModule) {
                    AppclientModule app = (AppclientModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof ConnectorModule) {
                    ConnectorModule app = (ConnectorModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                }
                                                                               
                if (extManagedProperty != null) {
                    return Boolean.valueOf(
                        extManagedProperty.getValue()).booleanValue();
View Full Code Here

     *@return a ConfigBean subclass instance of the appropriate type
     */
    private static ConfigBean createNewModule(DeployableObjectType type) {
        ConfigBean result = null;
        if (type.equals(DeployableObjectType.APP)) {
            result = new J2eeApplication();
        } else if (type.equals(DeployableObjectType.CAR)) {
            result = new AppclientModule();
        } else if (type.equals(DeployableObjectType.CONN)) {
            result = new ConnectorModule();
        } else if (type.equals(DeployableObjectType.EJB)) {
View Full Code Here

        long b = System.currentTimeMillis();

        _logger.log(Level.FINE, "synchronization.start.download.bits",appName);

        J2eeApplication app = null;
        try {
            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getJ2eeApplicationByName(appName);
        } catch (ConfigException ce) {
View Full Code Here

     * Starts this converged context.
     */
    public synchronized void start() throws LifecycleException {
        Extension.getInstance().preStart(this);
        super.start();
        J2eeApplication j2eeAppBean = getApplicationBean();
        if (j2eeAppBean != null) {
            // This converged context has been embedded in an EAR file.
            // Make it accessible to the sibling converged contexts that
            // are embedded in the same EAR file, by registering it with
            // the application registry.
View Full Code Here

    /**
     * Stops this converged context.
     */
    public void stop() throws LifecycleException {
        super.stop();
        J2eeApplication j2eeAppBean = getApplicationBean();
        if (j2eeAppBean != null) {
            // This converged context has been embedded in an EAR file.
            // Unregister it from the application registry.
            synchronized (appRegistry) {
                Set siblings = appRegistry.get(j2eeAppBean);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.J2eeApplication

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.