Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigBean


    private String getWebServiceEndpointContextRoot(String wsFQN) {
       
        String[] fqns = wsFQN.split(NAME_SEPERATOR);
        ConfigContext configCtx = AdminService.getAdminService().
                getAdminContext().getAdminConfigContext();
        ConfigBean cb = null;
       
        try {
            cb = ApplicationHelper.findApplication(configCtx, fqns[0]);
        } catch( Exception e) {
            String msg = "Could not find a deployed application/module by name "
View Full Code Here


        }
       
        ArrayList retList = new ArrayList(oNameMap.size());
        ConfigContext configCtx = AdminService.getAdminService().
                getAdminContext().getAdminConfigContext();
        ConfigBean cb = null;
       
        try {
            cb = ApplicationHelper.findApplication(configCtx, appId);
        } catch( Exception e) {
            String msg = "Could not find a deployed application/module by name "
View Full Code Here

    private void handleReconfiguration(TransformationRuleEvent event, boolean
            takeOld, boolean isRemove)
             throws AdminEventListenerException {
       try {
           ConfigBean bean = getTRBean(event, takeOld);
           if ( bean instanceof TransformationRule ) {
                TransformationRule tr = (TransformationRule) bean;
                String appId = getApplicationId(tr);
                WebServiceConfigImpl wsc = new WebServiceConfigImpl (
                    (WebServiceEndpoint) tr.parent());
                TransformHandler trh = new TransformHandler( wsc , appId);
                Filter f = trh.getFilter(appId, wsc);
                TransformFilter tf = null;
                if ( f != null) {
                    tf = (TransformFilter) f;
                }
                ConfigBean newBean = getTRBean(event, false);
                WebServiceConfigImpl nwsc = null;
                if ( newBean == null) {
                       if ( ! isRemove) {
                            // only remove operation can not have
                            // new element in the new config context
                            throw new AdminEventListenerException();
                       } else {
                            nwsc = wsc;
                       }
                } else {
                    nwsc = new WebServiceConfigImpl(
                        (WebServiceEndpoint) newBean.parent());
                }
                if ( tf == null) {
                    // create new filter to handle transformation
                    tf = (TransformFilter) trh.registerFilter(wsc);
                } else {
View Full Code Here

        if (event == null) {
            throw new IllegalArgumentException();
        }

        ConfigBean bean = null;
        ConfigContext ctx = null;
        String xpath = event.getElementXPath();
        if (old) {
            ctx = event.getOldConfigContext();
        } else {
View Full Code Here

    }

    private String getApplicationId(TransformationRule trBean) {
        String name = null;

        ConfigBean bean = null;
        if ( trBean != null) {
            bean = (ConfigBean) trBean.parent();
            if (!( bean instanceof WebServiceEndpoint)) {
                throw new RuntimeException()
            }
        }

        if (bean != null) {
            ConfigBean parent = (ConfigBean) bean.parent();
            if (parent instanceof J2eeApplication) {
                J2eeApplication app = (J2eeApplication) parent;
                name = app.getName();
            } else if (parent instanceof WebModule) {
                WebModule wm = (WebModule) parent;
View Full Code Here

        WebServiceEndpoint[] wsps = null;
        try {
            ConfigContext ctx = ApplicationServer.getServerContext().
                                                getConfigContext();

            ConfigBean cb = ApplicationHelper.findApplication(ctx, appId);

            // check if web service endpoint is configured for this
            // application/module, then ruturn this app

            if ( cb instanceof WebModule) {
View Full Code Here

            ApplicationRef[] appRefs =ServerHelper.getApplicationReferences(ctx,
            serverName);
            for ( int appIdx =0; appIdx < appRefs.length; appIdx++) {
                String appName = appRefs[appIdx].getRef();
                ConfigBean cb = ApplicationHelper.findApplication(ctx, appName);
                // check if web service endpoint is configured for this
                // application/module, then ruturn this app

                int wsSize = 0;
View Full Code Here

    }

    private void handleSingleCreate(String xpath, ElementChangeEvent adminEvent) throws AdminEventListenerException {
        if (xpath!=null) {
            try {
                ConfigBean bean = adminEvent.getConfigContext().exactLookup(xpath);
                configAdapter.configureSpecificContext(bean, xpath2Context(xpath));      
            } catch (ConfigException ex) {                   
                throw new AdminEventListenerException("Failed to lookup bean.", ex);
            }
        }
View Full Code Here

    }

    private void handleSingleUpdate(String xpath, ElementChangeEvent adminEvent) throws AdminEventListenerException {
        if (xpath!=null) {
            try {
                ConfigBean bean = adminEvent.getConfigContext().exactLookup(xpath);
                configAdapter.reconfigureSpecificContext(bean, xpath2Context(xpath));      
            } catch (ConfigException ex) {
                throw new AdminEventListenerException("Failed to lookup bean.", ex);
            }
        }
View Full Code Here

    }

    private void handleSingleDelete(String xpath, ElementChangeEvent adminEvent) throws AdminEventListenerException {
        if (xpath!=null) {
            try {
                ConfigBean bean = adminEvent.getOldConfigContext().exactLookup(xpath);
                configAdapter.unconfigureSpecificContext(bean, xpath2Context(xpath));      
            } catch (ConfigException ex) {
                throw new AdminEventListenerException("Failed to lookup bean.", ex);
            }
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigBean

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.