Package org.odmg

Examples of org.odmg.Database


        super.dispose();
        synchronized(this.databases) {
            final Set keys = this.databases.keySet();
            for( Iterator i = keys.iterator(); i.hasNext(); )
            {
                final Database db = (Database)i.next();
                try
                {
                    db.close();
                }
                catch( final ODMGException e) {
                    getLogger().error( "OJB-ODMG: Cannot close Database", e);
                }
                i.remove();
View Full Code Here


    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.Odmg#getInstance()
     */
    public Implementation getInstance() throws ODMGException {
        Database db = (Database)this.databases.get( DEFAULT_CONNECTION );
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(DEFAULT_CONNECTION, DEFAULT_MODE);
            synchronized (this.databases) {
                this.databases.put( DEFAULT_CONNECTION + DEFAULT_MODE, db );
            }
        }
        return this.odmg;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.Odmg#getInstance(java.lang.String, int)
     */
    public Implementation getInstance(String connection, int mode) throws ODMGException {
        Database db = (Database)this.databases.get( connection + mode);
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(connection, mode);
            synchronized (this.databases) {
                this.databases.put( connection + mode, db );
            }
        }
        return this.odmg;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.Odmg#getInstance(java.lang.String)
     */
    public Implementation getInstance(String connection) throws ODMGException {
        Database db = (Database)this.databases.get( connection + DEFAULT_MODE);
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(connection, DEFAULT_MODE);
            synchronized (this.databases) {
                this.databases.put( connection + DEFAULT_MODE, db );
            }
        }
        return this.odmg;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.OdmgImplementation#getInstance(int)
     */
    public Implementation getInstance( int mode ) throws ODMGException
    {
        Database db = (Database)this.databases.get( DEFAULT_CONNECTION+ mode);
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(DEFAULT_CONNECTION, mode);
            synchronized (this.databases) {
                this.databases.put( DEFAULT_CONNECTION+ mode, db );
            }
        }
        return this.odmg;
View Full Code Here

        super.dispose();
        synchronized(this.databases) {
            final Set keys = this.databases.keySet();
            for( Iterator i = keys.iterator(); i.hasNext(); )
            {
                final Database db = (Database)i.next();
                try
                {
                    db.close();
                }
                catch( final ODMGException e) {
                    getLogger().error( "OJB-ODMG: Cannot close Database", e);
                }
                i.remove();
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.Odmg#getInstance()
     */
    public Implementation getInstance() throws ODMGException {
        Database db = (Database)this.databases.get( DEFAULT_CONNECTION );
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(DEFAULT_CONNECTION, DEFAULT_MODE);
            synchronized (this.databases) {
                this.databases.put( DEFAULT_CONNECTION + DEFAULT_MODE, db );
            }
        }
        return this.odmg;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.Odmg#getInstance(java.lang.String, int)
     */
    public Implementation getInstance(String connection, int mode) throws ODMGException {
        Database db = (Database)this.databases.get( connection + mode);
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(connection, mode);
            synchronized (this.databases) {
                this.databases.put( connection + mode, db );
            }
        }
        return this.odmg;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.Odmg#getInstance(java.lang.String)
     */
    public Implementation getInstance(String connection) throws ODMGException {
        Database db = (Database)this.databases.get( connection + DEFAULT_MODE);
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(connection, DEFAULT_MODE);
            synchronized (this.databases) {
                this.databases.put( connection + DEFAULT_MODE, db );
            }
        }
        return this.odmg;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.ojb.odmg.components.OdmgImplementation#getInstance(int)
     */
    public Implementation getInstance( int mode ) throws ODMGException
    {
        Database db = (Database)this.databases.get( DEFAULT_CONNECTION+ mode);
        if(null == db ) {
            db = this.odmg.newDatabase();
            db.open(DEFAULT_CONNECTION, mode);
            synchronized (this.databases) {
                this.databases.put( DEFAULT_CONNECTION+ mode, db );
            }
        }
        return this.odmg;
View Full Code Here

TOP

Related Classes of org.odmg.Database

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.