Examples of PEFileLayout


Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

    /**
     * Create the default server.policy file.
     */
    protected void createServerPolicyFile(RepositoryConfig config) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File src = layout.getPolicyFileTemplate();
        final File dest = layout.getPolicyFile();
        try {
            FileUtils.copy(src, dest);
        } catch (IOException ioe) {
            throw new RepositoryException(
                _strMgr.getString("serverPolicyNotCreated"), ioe);
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * @throws RepositoryException
     */   
    public void validateMasterPassword(RepositoryConfig config,
        String password) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
        try {
            // WBN July 2007
            // we are constructing this object ONLY to see if it throws
            // an Exception.  We do not use the object.
            new PasswordAdapter(passwordAliases.getAbsolutePath(),
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * @throws RepositoryException
     */   
    public String getClearPasswordForAlias(RepositoryConfig config,
        String password,String alias) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
        try {
            PasswordAdapter p = new PasswordAdapter(passwordAliases.getAbsolutePath(),
                password.toCharArray());
            String clearPwd = p.getPasswordForAlias(alias);
            return clearPwd;
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * @throws RepositoryException
     */   
    protected void createPasswordAliasKeystore(RepositoryConfig config,
        String password) throws RepositoryException
    {       
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
        try {
            PasswordAdapter p = new PasswordAdapter(passwordAliases.getAbsolutePath(),
                password.toCharArray());
            p.writeStore();
        } catch (Exception ex) {
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * @throws RepositoryException
     */   
    protected void changePasswordAliasKeystorePassword(RepositoryConfig config,
        String oldPassword, String newPassword) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
           
        //Change the password of the keystore alias file
        if (passwordAliases.exists()) {
            try {
                PasswordAdapter p = new PasswordAdapter(passwordAliases.getAbsolutePath(),
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * Create JBI instance.
     */   
    protected void createJBIInstance(String instanceName,
        RepositoryConfig config) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        layout.createJBIDirectories();
        final TokenValueSet tvSet = new TokenValueSet();
        final String tvDelimiter = "@";
        final String tJbiInstanceName = "JBI_INSTANCE_NAME";
        final String tJbiInstanceRoot = "JBI_INSTANCE_ROOT";
        try {

            final TokenValue tvJbiInstanceName = new TokenValue(tJbiInstanceName,
                  instanceName, tvDelimiter);
            final TokenValue tvJbiInstanceRoot = new TokenValue(tJbiInstanceRoot,
                  layout.getRepositoryDir().getCanonicalPath(),tvDelimiter);
            tvSet.add(tvJbiInstanceName);
            tvSet.add(tvJbiInstanceRoot);
            final File src = layout.getJbiTemplateFile();
            final File dest = layout.getJbiRegistryFile();

            generateFromTemplate(tvSet, src, dest);
           
            final File httpConfigSrc = layout.getHttpBcConfigTemplate();
            final File httpConfigDest = layout.getHttpBcConfigFile();
            //tokens will be added in a follow-up integration
            final TokenValueSet httpTvSet = new TokenValueSet();           
            generateFromTemplate(httpTvSet, httpConfigSrc, httpConfigDest);
           
            createHttpBCInstallRoot(layout);
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * Create MQ instance.
     */
    protected void createMQInstance(
        RepositoryConfig config) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File broker = layout.getImqBrokerExecutable();
        final File mqVarHome = layout.getImqVarHome();
        try {
            mqVarHome.mkdirs();
            final List<String> cmdInput = new ArrayList<String>();
            cmdInput.add(broker.getAbsolutePath());
            cmdInput.add("-init");
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * Create the timer database wal file.
     */
    protected void createTimerWal(
        RepositoryConfig config) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File src = layout.getTimerWalTemplate();
        final File dest = layout.getTimerWal();
        try {
            FileUtils.copy(src, dest);
        } catch (IOException ioe) {
            throw new RepositoryException(
                _strMgr.getString("timerWalNotCreated"), ioe);
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

     * Create the timer database dbn file.
     */
    protected void createTimerDbn(
        RepositoryConfig config) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
    final File src = layout.getTimerDbnTemplate();
        final File dest = layout.getTimerDbn();
        try {
            FileUtils.copy(src, dest);
        } catch (IOException ioe) {
            throw new RepositoryException(
                _strMgr.getString("timerDbnNotCreated"), ioe);
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

    protected void handleDerby(final RepositoryConfig config) throws RepositoryException {
        final String DL = "derby.log"; // this is the file that derby creates its log in.
        final File derbyLog = new File(DL);
        try {
            final PEFileLayout layout = getFileLayout(config);
            final File derbySqlFile = layout.getDerbyEjbTimerSqlFile();
            final String tableStatement = formatSqlStatement(derbySqlFile);
            final String dbDir = layout.getDerbyEjbTimerDatabaseDirectory().getAbsolutePath();
            createEjbTimerDatabaseTable(tableStatement, dbDir);
        } catch (final Exception ae) {
            final String c = readDerbyLogFile(derbyLog);
            throw new RepositoryException(_strMgr.getString("derbyEjbTimerDBNotCreated", c), ae);
        } finally {
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.