Examples of MailResource


Examples of org.glassfish.resources.javamail.config.MailResource

        return status;
    }

    private MailResource createConfigBean(Resources param, Properties props) throws PropertyVetoException,
            TransactionFailure {
        MailResource newResource = param.createChild(MailResource.class);
        newResource.setJndiName(jndiName);
        newResource.setFrom(fromAddress);
        newResource.setUser(mailUser);
        newResource.setHost(mailHost);
        newResource.setEnabled(enabled);
        newResource.setStoreProtocol(storeProtocol);
        newResource.setStoreProtocolClass(storeProtocolClass);
        newResource.setTransportProtocol(transportProtocol);
        newResource.setTransportProtocolClass(
                transportProtocolClass);
        newResource.setDebug(debug);
        if (description != null) {
            newResource.setDescription(description);
        }
        if (props != null) {
            for (java.util.Map.Entry e : props.entrySet()) {
                Property prop = newResource.createChild(Property.class);
                prop.setName((String) e.getKey());
                prop.setValue((String) e.getValue());
                newResource.getProperty().add(prop);
            }
        }
        return newResource;
    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    /**
     * {@inheritDoc}
     */
    public synchronized void deployResource(Object resource, String applicationName, String moduleName) throws Exception {
        MailResource mailRes =
                (MailResource) resource;


        if (mailRes == null) {
            _logger.log(Level.INFO, "core.resourcedeploy_error");
        } else {
            ResourceInfo resourceInfo = new ResourceInfo(mailRes.getJndiName(), applicationName, moduleName);
            //registers the jsr77 object for the mail resource deployed
            /* TODO Not needed any more ?
            /*ManagementObjectManager mgr =
                getAppServerSwitchObject().getManagementObjectManager();
            mgr.registerJavaMailResource(mailRes.getJndiName());*/
 
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    /**
     * {@inheritDoc}
     */
    public synchronized void deployResource(Object resource) throws Exception {
        MailResource mailResource =
                (MailResource) resource;
        ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(mailResource);
        deployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    /**
     * {@inheritDoc}
     */
    public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
        MailResource mailRes =
                (MailResource) resource;
        // converts the config data to j2ee resource
        ResourceInfo resourceInfo = new ResourceInfo(mailRes.getJndiName(), applicationName, moduleName);
        deleteResource(mailRes, resourceInfo);
    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    /**
     * {@inheritDoc}
     */
    public synchronized void undeployResource(Object resource) throws Exception {
        MailResource mailRes =
                (MailResource) resource;
        // converts the config data to j2ee resource
        ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(mailRes);
        deleteResource(mailRes, resourceInfo);
    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    @Override
    public void deployResource(Object resource) throws Exception {
        final MailSessionDescriptor desc = (MailSessionDescriptor) resource;
        String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), desc.getResourceType());
        MailResource mailResource = new MyMailResource(desc,resourceName);
        getDeployer(mailResource).deployResource(mailResource);
        _logger.log(Level.FINE, "Mail-Session resource is deployed having resource-name [" + desc.getName() + "]");

    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    @Override
    public void undeployResource(Object resource) throws Exception {
        final MailSessionDescriptor desc = (MailSessionDescriptor) resource;
        String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(),desc.getResourceType());
        MailResource mailResource = new MyMailResource(desc, resourceName);
        getDeployer(mailResource).undeployResource(mailResource);
        _logger.log(Level.FINE, "Mail-Session resource is undeployed having resource-name [" + desc.getName() + "]");
    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    @Override
    public void deployResource(Object resource) throws Exception {
        final MailSessionDescriptor desc = (MailSessionDescriptor) resource;
        String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), desc.getResourceType());
        MailResource mailResource = new MyMailResource(desc,resourceName);
        getDeployer(mailResource).deployResource(mailResource);
        _logger.log(Level.FINE, "Mail-Session resource is deployed having resource-name [" + desc.getName() + "]");

    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    @Override
    public void undeployResource(Object resource) throws Exception {
        final MailSessionDescriptor desc = (MailSessionDescriptor) resource;
        String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(),desc.getResourceType());
        MailResource mailResource = new MyMailResource(desc, resourceName);
        getDeployer(mailResource).undeployResource(mailResource);
        _logger.log(Level.FINE, "Mail-Session resource is undeployed having resource-name [" + desc.getName() + "]");
    }
View Full Code Here

Examples of org.glassfish.resources.javamail.config.MailResource

    @Override
    public void deployResource(Object resource) throws Exception {
        final MailSessionDescriptor desc = (MailSessionDescriptor) resource;
        String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), desc.getResourceType());
        MailResource mailResource = new MyMailResource(desc,resourceName);
        getDeployer(mailResource).deployResource(mailResource);
        _logger.log(Level.FINE, "Mail-Session resource is deployed having resource-name [" + desc.getName() + "]");

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.