Package org.glassfish.embeddable

Examples of org.glassfish.embeddable.GlassFishException


            gfMap.put(gfProps.getInstanceRoot(), gfImpl);
            return gfImpl;
        } catch (GlassFishException e) {
            throw e;
        } catch(Exception e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here


            String key = (String) obj;
            if (key.startsWith(CONFIG_PROP_PREFIX)) {
                CommandResult result = commandRunner.run("set",
                        key.substring(CONFIG_PROP_PREFIX.length()) + "=" + props.getProperty(key));
                if (result.getExitStatus() != CommandResult.ExitStatus.SUCCESS) {
                    throw new GlassFishException(result.getOutput());
                }
            }
        }
    }
View Full Code Here

    public String deploy(URI archive, String... params) throws GlassFishException {
        File file;
        try {
            file = convertToFile(archive);
        } catch (IOException e) {
            throw new GlassFishException("Unable to make a file out of " + archive, e);
        }
        return deploy(file, params);
    }
View Full Code Here

                extractPayload(outboundPayload, actionReport, retrieve);
            }
           
            return actionReport.getResultType(String.class);
        } catch (CommandException e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

    @Override
    public String deploy(InputStream is, String... params) throws GlassFishException {
        try {
            return deploy(createFile(is), params);
        } catch (IOException e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

        CommandExecutorImpl executer = habitat.getService(CommandExecutorImpl.class);
        try {
            ActionReport actionReport = executer.executeCommand("undeploy", newParams);
            actionReport.writeReport(System.out);
        } catch (CommandException e) {
            throw new GlassFishException(e);
        } catch (IOException e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

            CommandExecutorImpl executer = habitat.getService(CommandExecutorImpl.class);
            ActionReport report = executer.executeCommand("list-components");
            Properties props = report.getTopMessagePart().getProps();
            return new ArrayList<String>(props.stringPropertyNames());
        } catch (Exception e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

    public String deploy(URI archive, String... params) throws GlassFishException {
        File file;
        try {
            file = convertToFile(archive);
        } catch (IOException e) {
            throw new GlassFishException("Unable to make a file out of " + archive, e);
        }
        return deploy(file, params);
    }
View Full Code Here

                extractPayload(outboundPayload, actionReport, retrieve);
            }
           
            return actionReport.getResultType(String.class);
        } catch (CommandException e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

    @Override
    public String deploy(InputStream is, String... params) throws GlassFishException {
        try {
            return deploy(createFile(is), params);
        } catch (IOException e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.glassfish.embeddable.GlassFishException

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.