Package org.glassfish.persistence.common

Examples of org.glassfish.persistence.common.Java2DBProcessorHelper


                if (!dir.exists()) {
                    logger.log (Level.WARNING, "Cannot upgrade EJBTimerService: " +
                            "required directory is not available");
                } else {
                    Java2DBProcessorHelper h = new Java2DBProcessorHelper(TIMER_SERVICE_APP_NAME);
                    success = h.executeDDLStatement(
                            dir.getCanonicalPath() + "/ejbtimer_upgrade_", resource);
                    ConfigSupport.apply(new SingleConfigCode<Property>() {
                        public Object run(Property p) throws PropertyVetoException, TransactionFailure {
                            p.setValue("true");
                            return null;
View Full Code Here


            DatabaseConfigurationBean dbBean = new DatabaseConfigurationBean();
            dbBean.setJndiName(dsName);
            batchConfig.setDatabaseConfigurationBean(dbBean);


            Java2DBProcessorHelper java2DBProcessorHelper = new  Java2DBProcessorHelper(this.getClass().getSimpleName());
            File ddlDir = new File(serverContext.getInstallRoot(), "/lib");

            //Temporary fix till batch_{db_vendor}.sql is part of the distribution
            File sqlFile = new File(ddlDir, "batch_derby.sql");
            if (sqlFile.exists()) {
                java2DBProcessorHelper.executeDDLStatement(ddlDir.getCanonicalPath() + CREATE_TABLE_DDL_NAME, dsName);
            } else {
                logger.log(Level.WARNING, sqlFile.getAbsolutePath() + " does NOT exist");
            }
            dbInitialized = true;
        } catch (Throwable th) {
View Full Code Here

            // delete tables.
            if(hasScopedResource){
                connectorRuntime.registerDataSourceDefinitions(application);
            }

             Java2DBProcessorHelper helper = new Java2DBProcessorHelper(dc);
             helper.init();
             helper.createOrDropTablesInDB(false, "JPA"); // NOI18N

            //if there are scoped resources, undeploy them.
            if(hasScopedResource){
                connectorRuntime.unRegisterDataSourceDefinitions(application);
            }
View Full Code Here

        }

        // XXX  - use DeploymentContext directly instead of creating helper instance first

        if (providerContainerContractInfo.isJava2DBRequired()) {
            processor = new JPAJava2DBProcessor(new Java2DBProcessorHelper(providerContainerContractInfo.getDeploymentContext()));
            java2db = processor.isJava2DbPU(pud);
        }

        Map<String, Object> overRides = new HashMap<String, Object>( (java2db)? integrationPropertiesWithJava2DB : integrationPropertiesWithoutJava2DB );
View Full Code Here

            // delete tables.
            if(hasScopedResource){
                connectorRuntime.registerDataSourceDefinitions(application);
            }

             Java2DBProcessorHelper helper = new Java2DBProcessorHelper(dc);
             helper.init();
             helper.createOrDropTablesInDB(false, "JPA"); // NOI18N

            //if there are scoped resources, undeploy them.
            if(hasScopedResource){
                connectorRuntime.unRegisterDataSourceDefinitions(application);
            }
View Full Code Here

                if (!dir.exists()) {
                    logger.log (Level.WARNING, "Cannot upgrade EJBTimerService: " +
                            "required directory is not available");
                } else {
                    Java2DBProcessorHelper h = new Java2DBProcessorHelper(TIMER_SERVICE_APP_NAME);
                    success = h.executeDDLStatement(
                            dir.getCanonicalPath() + "/ejbtimer_upgrade_", resource);
                    ConfigSupport.apply(new SingleConfigCode<Property>() {
                        public Object run(Property p) throws PropertyVetoException, TransactionFailure {
                            p.setValue("true");
                            return null;
View Full Code Here

        }

        // XXX  - use DeploymentContext directly instead of creating helper instance first

        if (providerContainerContractInfo.isJava2DBRequired()) {
            processor = new JPAJava2DBProcessor(new Java2DBProcessorHelper(providerContainerContractInfo.getDeploymentContext()));
            java2db = processor.isJava2DbPU(pud);
        }

        Map<String, Object> overRides = new HashMap<String, Object>( (java2db)? integrationPropertiesWithJava2DB : integrationPropertiesWithoutJava2DB );
View Full Code Here

            // delete tables.
            if(hasScopedResource){
                connectorRuntime.registerDataSourceDefinitions(application);
            }

             Java2DBProcessorHelper helper = new Java2DBProcessorHelper(dc);
             helper.init();
             helper.createOrDropTablesInDB(false, "JPA"); // NOI18N

            //if there are scoped resources, undeploy them.
            if(hasScopedResource){
                connectorRuntime.unRegisterDataSourceDefinitions(application);
            }
View Full Code Here

        if (!DeploymentHelper.isJavaToDatabase(
                cmpResource.getSchemaGeneratorProperties())) {
            return;
        }

        helper = new Java2DBProcessorHelper(ctx);
        helper.init();

        String resourceName = cmpResource.getJndiName();
        helper.setProcessorType("CMP", bundle.getName()); // NOI18N
        helper.setJndiName(resourceName, bundle.getName());
View Full Code Here

    /**
     * Drop files on undeploy
     */
    public void clean() {
        helper = new Java2DBProcessorHelper(ctx);
        helper.init();

        helper.createOrDropTablesInDB(false, "CMP"); // NOI18N
    }
View Full Code Here

TOP

Related Classes of org.glassfish.persistence.common.Java2DBProcessorHelper

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.