Package javax.enterprise.deploy.spi.exceptions

Examples of javax.enterprise.deploy.spi.exceptions.ClientExecuteException


     * @throws ClientExecuteException when the configuration
     *         is incomplete.
     */
    public void execute() throws ClientExecuteException {
        if (targetModuleID==null) {
            throw new ClientExecuteException(localStrings.getLocalString(
                "enterprise.deployapi.actions.clientconfigurationimpl.nomoduleid",
                "No moduleID for deployed application found"));
        }
        TargetImpl target = (TargetImpl) targetModuleID.getTarget();
        String moduleID;
        if (targetModuleID.getParentTargetModuleID()!=null) {           
            moduleID = targetModuleID.getParentTargetModuleID().getModuleID();
        } else {
            moduleID = targetModuleID.getModuleID();
        }
       
       
        try {
            // retrieve the stubs from the server
            String location = target.exportClientStubs(moduleID, System.getProperty("java.io.tmpdir"));
      
            // invoke now the appclient...
            String j2eeHome = System.getProperty("com.sun.aas.installRoot");
            String appClientBinary = j2eeHome + File.separatorChar + "bin" + File.separatorChar + "appclient";
            String command = appClientBinary + " -client " + location;
           
            Process p = Runtime.getRuntime().exec(command);
           
        } catch(Exception e) {
            Logger.getAnonymousLogger().log(Level.WARNING, "Error occurred", e);
            throw new ClientExecuteException(localStrings.getLocalString(
                "enterprise.deployapi.actions.clientconfigurationimpl.exception",
                "Exception while invoking application client : \n {0}", new Object[] { e.getMessage() }));
        }
    }
View Full Code Here


     * @throws ClientExecuteException when the configuration
     *         is incomplete.
     */
    public void execute() throws ClientExecuteException {
        if (targetModuleID==null) {
            throw new ClientExecuteException(localStrings.getLocalString(
                "enterprise.deployapi.actions.clientconfigurationimpl.nomoduleid",
                "No moduleID for deployed application found"));
        }
        TargetImpl target = (TargetImpl) targetModuleID.getTarget();
        String moduleID;
        if (targetModuleID.getParentTargetModuleID()!=null) {           
            moduleID = targetModuleID.getParentTargetModuleID().getModuleID();
        } else {
            moduleID = targetModuleID.getModuleID();
        }
       
       
        try {
            // retrieve the stubs from the server
            String location = target.exportClientStubs(moduleID, System.getProperty("java.io.tmpdir"));
      
            // invoke now the appclient...
            String j2eeHome = System.getProperty("com.sun.aas.installRoot");
            String appClientBinary = j2eeHome + File.separatorChar + "bin" + File.separatorChar + "appclient";
            String command = appClientBinary + " -client " + location;
           
            Runtime.getRuntime().exec(command);
           
        } catch(Exception e) {
            Logger.getAnonymousLogger().log(Level.WARNING, "Error occurred", e);
            throw new ClientExecuteException(localStrings.getLocalString(
                "enterprise.deployapi.actions.clientconfigurationimpl.exception",
                "Exception while invoking application client : \n {0}", new Object[] { e.getMessage() }));
        }
    }
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.spi.exceptions.ClientExecuteException

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.