Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ConnectorDescriptor


            }
        }
    }

    public void createActiveResourceAdapterForEmbeddedRar(String rarModuleName) throws ConnectorRuntimeException {
        ConnectorDescriptor cdesc = loadConnectorDescriptorForEmbeddedRAR(rarModuleName);
        String appName = ConnectorAdminServiceUtils.getApplicationName(rarModuleName);
        String rarFileName = ConnectorAdminServiceUtils
                        .getConnectorModuleName(rarModuleName) + ".rar";
        String loc = getResourcesUtil().getApplicationDeployLocation(appName);
        loc = loc + File.separator + FileUtils.makeFriendlyFilename(rarFileName);
View Full Code Here


            throws ConnectorRuntimeException {

        if (rarName == null) {
            return null;
        }
        ConnectorDescriptor desc = null;
        desc = _registry.getDescriptor(rarName);
        if (desc != null) {
            return desc;
        }
        String moduleDir;
View Full Code Here

    private void populateConnectorConnectionPool(ConnectorConnectionPool ccp,
                                                 String connectionDefinitionName, String rarName,
                                                 List<Property> props, List<SecurityMap> securityMaps)
            throws ConnectorRuntimeException {

        ConnectorDescriptor connectorDescriptor = runtime.getConnectorDescriptor(rarName);
        if (connectorDescriptor == null) {
            ConnectorRuntimeException cre = new ConnectorRuntimeException("Failed to get connection pool object");
            _logger.log(Level.SEVERE, "rardeployment.connector_descriptor_notfound_registry", rarName);
            _logger.log(Level.SEVERE, "", cre);
            throw cre;
        }
        Set connectionDefs =
                connectorDescriptor.getOutboundResourceAdapter().getConnectionDefs();
        ConnectionDefDescriptor cdd = null;
        Iterator it = connectionDefs.iterator();
        while (it.hasNext()) {
            cdd = (ConnectionDefDescriptor) it.next();
            if (connectionDefinitionName.equals(cdd.getConnectionFactoryIntf()))
                break;

        }
        ConnectorDescriptorInfo cdi = new ConnectorDescriptorInfo();

        cdi.setRarName(rarName);
        cdi.setResourceAdapterClassName(connectorDescriptor.getResourceAdapterClass());
        cdi.setConnectionDefinitionName(cdd.getConnectionFactoryIntf());
        cdi.setManagedConnectionFactoryClass(cdd.getManagedConnectionFactoryImpl());
        cdi.setConnectionFactoryClass(cdd.getConnectionFactoryImpl());
        cdi.setConnectionFactoryInterface(cdd.getConnectionFactoryIntf());
        cdi.setConnectionClass(cdd.getConnectionImpl());
        cdi.setConnectionInterface(cdd.getConnectionIntf());
        Properties properties = new Properties();
        //skip the AddressList in case of JMS RA.
        //Refer Sun Bug :6579154 - Equivalent Oracle Bug :12206278
        if(rarName.trim().equals(ConnectorRuntime.DEFAULT_JMS_ADAPTER)){
            properties.put("AddressList","localhost");
        }
        Set mergedProps = ConnectorDDTransformUtils.mergeProps(props, cdd.getConfigProperties(),properties);
        cdi.setMCFConfigProperties(mergedProps);
        cdi.setResourceAdapterConfigProperties(connectorDescriptor.getConfigProperties());
        ccp.setConnectorDescriptorInfo(cdi);
        ccp.setSecurityMaps(SecurityMapUtils.getConnectorSecurityMaps(securityMaps));

    }
View Full Code Here

        return getDefaultProcessedResult();
    }

    private void handleAnnotation(AnnotatedElementHandler aeHandler, ConnectionDefinition connDefn, AnnotationInfo element) {
        RarBundleContext rarContext = (RarBundleContext) aeHandler;
        ConnectorDescriptor desc = rarContext.getDescriptor();

        Class c = (Class) element.getAnnotatedElement();
        String targetClassName = c.getName();
        if (ManagedConnectionFactory.class.isAssignableFrom(c)) {

            if (!desc.getOutBoundDefined()) {
                OutboundResourceAdapter ora = new OutboundResourceAdapter();
                desc.setOutboundResourceAdapter(ora);
            }

            OutboundResourceAdapter ora = desc.getOutboundResourceAdapter();

            if (!ora.hasConnectionDefDescriptor(connDefn.connectionFactory().getName())) {
                ConnectionDefDescriptor cdd = new ConnectionDefDescriptor();
                cdd.setConnectionFactoryImpl(connDefn.connectionFactoryImpl().getName());
                cdd.setConnectionFactoryIntf(connDefn.connectionFactory().getName());
View Full Code Here

     * @return AuthenticationService
     */
    public AuthenticationService getAuthenticationService(String rarName,
                                                          PoolInfo poolInfo) {

        ConnectorDescriptor cd = _registry.getDescriptor(rarName);
        OutboundResourceAdapter obra = cd.getOutboundResourceAdapter();
        Set authMechs = obra.getAuthMechanisms();
        for (Object authMech : authMechs) {
            AuthMechanism authMechanism = (AuthMechanism) authMech;
            String mech = authMechanism.getAuthMechType();
            if (mech.equals("BasicPassword")) {
View Full Code Here

    public ConnectorApplication load(ConnectorContainer container, DeploymentContext context) {
        super.load(container, context);
        File sourceDir = context.getSourceDir();
        String sourcePath = sourceDir.getAbsolutePath();
        String moduleName = sourceDir.getName();
        ConnectorDescriptor connDesc =
            context.getModuleMetaData(ConnectorDescriptor.class);
        if (connDesc != null) {
            connDesc.setClassLoader(context.getClassLoader());
        }
        if(_logger.isLoggable(Level.FINEST)){
            _logger.finest("connector-descriptor during load : " + connDesc);
        }
View Full Code Here

        String fileName = System.getProperty("java.security.policy");
        if (fileName != null) {
            File policyFile = new File(fileName);
            String policyContent = getFileContent(policyFile);

            ConnectorDescriptor connectorDescriptor = getConnectorDescriptor(moduleName);
            Set securityPermissions = connectorDescriptor.getSecurityPermissions();
            Iterator it = securityPermissions.iterator();
            SecurityPermission secPerm = null;
            String permissionString = null;

            while (it.hasNext()) {
View Full Code Here

    public String[] getConnectionDefinitionNames(String rarName)
               throws ConnectorRuntimeException
    {

        String[] result = new String[0];
        ConnectorDescriptor desc = getConnectorDescriptor(rarName);
        if(desc != null) {
            MCFConfigParser mcfConfigParser = (MCFConfigParser)
              ConnectorConfigParserFactory.getParser(ConnectorConfigParser.MCF);
            return mcfConfigParser.getConnectionDefinitionNames(desc);
        } else {
View Full Code Here

     @throws ConnectorRuntimeException if property retrieval fails.
     */
    public Properties getAdminObjectConfigProps(
      String rarName,String adminObjectIntf, String adminObjectClass) throws ConnectorRuntimeException
    {
        ConnectorDescriptor desc = getConnectorDescriptor(rarName);
        if(desc != null) {
            AdminObjectConfigParser adminObjectConfigParser =
                 (AdminObjectConfigParser)
                 ConnectorConfigParserFactory.getParser(
                 ConnectorConfigParser.AOR);
View Full Code Here

     */
    public Properties getConnectorConfigJavaBeans(String rarName,
        String connectionDefName,String type) throws ConnectorRuntimeException
    {

        ConnectorDescriptor desc = getConnectorDescriptor(rarName);
        if(desc != null) {
            ConnectorConfigParser ccParser =
                     ConnectorConfigParserFactory.getParser(type);
            return ccParser.getJavaBeanProps(desc,connectionDefName, rarName);
        } else {
View Full Code Here

TOP

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

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.