Package org.apache.openjpa.jdbc.conf

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


            _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

        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

        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

   
    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

            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

     */
    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

     */
    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

     */
    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

     */
    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("seq-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.conf.JDBCConfiguration

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.