Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PBKey


            {
                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


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

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

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

     */
    public PBKey getPBKey()
    {
        if (pbKey == null)
        {
            this.pbKey = new PBKey(this.getJcdAlias(), this.getUserName(), this.getPassWord());
        }
        return pbKey;
    }
View Full Code Here

    public void afterPropertiesSet () throws Exception
    {
        // Try to find JCD
        ConnectionRepository cr = MetadataManager.getInstance().connectionRepository();
        JdbcConnectionDescriptor jcd = cr.getDescriptor(new PBKey(jcdAlias));
        if (jcd == null)
        {
            jcd = new JdbcConnectionDescriptor();
            jcd.setJcdAlias(jcdAlias);
            cr.addDescriptor(jcd);
View Full Code Here

    {
        ConnectionRepository cr = MetadataManager.getInstance()
                .readConnectionRepository(MetadataTest.TEST_REPOSITORY);
        MetadataManager.getInstance().mergeConnectionRepository(cr);

        PersistenceBroker pb = PersistenceBrokerFactory.createPersistenceBroker(new PBKey("runtime_2"));
        try
        {
            ObjectCache oc = pb.serviceObjectCache();
            CacheObject testObj = new CacheObject(null, "testPerDatabaseCache");
            Identity oid = new Identity(testObj, pb);
View Full Code Here

    public void afterPropertiesSet () throws Exception
    {
        // Try to find JCD
        ConnectionRepository cr = MetadataManager.getInstance().connectionRepository();
        JdbcConnectionDescriptor jcd = cr.getDescriptor(new PBKey(jcdAlias));
        if (jcd == null)
        {
            jcd = new JdbcConnectionDescriptor();
            jcd.setJcdAlias(jcdAlias);
            cr.addDescriptor(jcd);
View Full Code Here

   
    public void init()
    throws Exception
    {
        ConnectionRepository cr = MetadataManager.getInstance().connectionRepository();
        JdbcConnectionDescriptor jcd = cr.getDescriptor(new PBKey(jcdAlias));
        if (jcd == null)
        {
            jcd = new JdbcConnectionDescriptor();
            jcd.setJcdAlias(jcdAlias);
            cr.addDescriptor(jcd);
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

                    tx.lockAndRegisterCleanup();
                }
            }
            else
            {
                PBKey aPbKey = getPBKey();
                if(aPbKey != null)
                {
                    PBCapsule capsule = new PBCapsule(aPbKey, null);
                    try
                    {
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.