Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PBKey


       
        int oldVersion = db.getSchemaVersion();
       
        // Find needed information fr DdlUtils
        ConnectionRepository cr = MetadataManager.getInstance().connectionRepository();
        PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" );
        JdbcConnectionDescriptor connDesc = cr.getDescriptor( connKey );
        String jdbcDriver = connDesc.getDriver();
        Platform platform = null;
        if ( jdbcDriver.equals( "org.apache.derby.jdbc.EmbeddedDriver" ) ) {
            platform = PlatformFactory.createNewPlatformInstance( "derby" );           
View Full Code Here


        }
        if(user != null && passwd == null)
        {
            passwd = "";
        }
        PBKey key = new PBKey(dbName, user, passwd);
        return key;
    }
View Full Code Here

     */
    public static PBKey crossCheckPBKey(PBKey key)
    {
        if(key.getUser() == null)
        {
            PBKey defKey = MetadataManager.getInstance().connectionRepository().getStandardPBKeyForJcdAlias(key.getAlias());
            if(defKey != null)
            {
                return defKey;
            }
        }
View Full Code Here

    {
      m_log.info("No enviroment entry was found, use default repository");
      ojbRepository = "repository.xml";
    }
    m_log.info("Use OJB repository file: " + ojbRepository);
    m_pbKey = new PBKey(ojbRepository);

    // Lookup the PBF implementation
    try
    {
      context = new InitialContext();
View Full Code Here

        {
            m_conn = m_kit.acquireConnection(PersistenceBrokerFactory.getDefaultKey());
        }
        else
        {
            PBKey key = new PBKey(m_alias, m_userID, m_password);
            m_conn = m_kit.acquireConnection(key);
        }
        m_tx = new TransactionImpl(this, m_kit, m_conn);
    }
View Full Code Here

            {
                prepareRealSubject(tx.getBroker());
            }
            else
            {
                PBKey aPbKey = getPBKey();
                if(aPbKey != null)
                {
                    PBCapsule capsule = new PBCapsule(aPbKey, null);
                    try
                    {
View Full Code Here

    // Constructor
    //////////////////////////////////////////

    public ConcreteEditingContext(Transaction tx, PersistenceBroker pb)
    {
        PBKey pbkey;

        _tx = tx;
        _pb = pb;
        _objects = new HashMap();
        _order = new ArrayList();
View Full Code Here

  {
    Util.log("In OTMJCAManagedConnectionFactory.createManagedConnection");
    try
    {
      Kit kit = getKit();
      PBKey key = ((OTMConnectionRequestInfo) info).getPbKey();
      OTMConnection connection = kit.acquireConnection(key);
      return new OTMJCAManagedConnection(this, connection, key);
    }
    catch (ResourceException e)
    {
View Full Code Here

            {
                System.setProperty("OJB.properties", _propertiesFile);
            }

            ConnectionRepository connRep = MetadataManager.getInstance().connectionRepository();
            PBKey                pbKey   = null;

            if ((_jcdAlias == null) || (_jcdAlias.length() == 0))
            {
                pbKey = PersistenceBrokerFactory.getDefaultKey();
            }
View Full Code Here

           jcd.setPassWord(password);
        }
        if ("default".equals(jcdAlias))
        {
            jcd.setDefaultConnection(true);
            MetadataManager.getInstance().setDefaultPBKey(new PBKey(jcd.getJcdAlias(), jcd.getUserName(), jcd.getPassWord()));
        }

        addDescriptor(jcd);
        return jcd;
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.PBKey

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.