Examples of JDBCConfiguration


Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        props.put("openjpa.Sequence", "table");
       
        OpenJPAEntityManagerFactory factory =(OpenJPAEntityManagerFactory)
                getEmf(props);

        JDBCConfiguration conf = (JDBCConfiguration)
            factory.getConfiguration();
        ClassMapping mapping1 = conf.getMappingRepositoryInstance().
            getMapping(RuntimeTest1.class, null, true);
        ClassMapping mapping2 = conf.getMappingRepositoryInstance().
            getMapping(PerClassTestObject.class, null, true);
        ClassMapping mapping3 = conf.getMappingRepositoryInstance().
            getMapping(PerClassTestObject2.class, null, true);

        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        //FIXME jthomas
        /*
 
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

    throws Exception {
        if (!(supportsPessimisticLocking()))
            return;
       
        Set set = new HashSet();
        JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
        Broker broker = getBrokerFactory().newBroker();
       
       
        UpdateThread t1 = new UpdateThread(set, broker);
        UpdateThread t2 = new UpdateThread(set, broker);
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

            _set = set;
        }

        public void run() {
            try {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                TableJDBCSeq seq = new TableJDBCSeq();
                seq.setConfiguration(conf);
                seq.startConfiguration();
                seq.endConfiguration();
                DataSource ds = conf.getDataSource2(null);
                for (int i = 0; i < 51; i++)
                    _set.add(seq.next(_broker,
                        conf.getMetaDataRepositoryInstance().
                        getMetaData(RuntimeTest1.class, null, true)));
            } catch (Exception e) {
                throw new RuntimeException(e.getMessage());
            }
        }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        if (type == TYPE_TRANSACTIONAL || type == TYPE_CONTIGUOUS) {
            // Also increments ref count.
            return store.getConnection();
        }
        else {
            JDBCConfiguration conf = store.getConfiguration();
            DataSource ds = conf.getDataSource2(store.getContext());
            Connection conn = ds.getConnection();
            if (conn.getAutoCommit())
                conn.setAutoCommit(false);
            return conn;
        }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

        Options opts = new Options();
        final String[] arguments = opts.setFromCmdLine(args);
        boolean ret = Configurations.runAgainstAllAnchors(opts,
            new Configurations.Runnable() {
            public boolean run(Options opts) throws Exception {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                try {
                    return NativeJDBCSeq.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("native-seq-usage"));
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

   
    public void endConfiguration()
    {
        super.endConfiguration();

        JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
        _dict = conf.getDBDictionaryInstance();
        if (_defaults == null)
            _defaults = conf.getMappingDefaultsInstance();
        if (_schema != null && _schema instanceof Configurable) {
            ((Configurable) _schema).setConfiguration(conf);
            ((Configurable) _schema).startConfiguration();
            ((Configurable) _schema).endConfiguration();
        }           
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

            CLEAR_TABLES, RETAIN_DATA);

        // trigger complete resolution of metadata etc.
        emf.createEntityManager().close();

        JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
        _dict = conf.getDBDictionaryInstance();
        _mapping = (ClassMapping) JPAFacadeHelper.getMetaData(emf,
            NonstandardMappingEntity.class);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

     */
    public static void main(String[] args)
        throws IOException, SQLException {
        Options opts = new Options();
        args = opts.setFromCmdLine(args);
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        try {
            if (!run(conf, args, opts))
                System.out.println(_loc.get("revtool-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

     */
    public static void main(String[] args)
        throws IOException, SQLException {
        Options opts = new Options();
        args = opts.setFromCmdLine(args);
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        try {
            if (!run(conf, args, opts))
                System.out.println(_loc.get("tool-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.JDBCConfiguration

     */
    public static void main(String[] args)
        throws Exception {
        Options opts = new Options();
        args = opts.setFromCmdLine(args);
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        try {
            if (!run(conf, args, opts))
                System.out.println(_loc.get("native-seq-usage"));
        } finally {
            conf.close();
        }
    }
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.