Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PBKey


  /**
   * Set the JDBC Connection Descriptor alias of the PersistenceBroker
   * configuration to use. Default is the default connection configured for OJB.
   */
  public void setJcdAlias(String jcdAlias) {
    this.pbKey = new PBKey(jcdAlias);
  }
View Full Code Here


  /**
   * Set the JDBC Connection Descriptor alias of the PersistenceBroker
   * configuration to use. Default is the default connection configured for OJB.
   */
  public void setJcdAlias(String jcdAlias) {
    this.pbKey = new PBKey(jcdAlias);
  }
View Full Code Here

    template.setJcdAlias("alias1");
    assertEquals("alias1", template.getJcdAlias());
    assertEquals("alias1", template.getPbKey().getAlias());

    template = new PersistenceBrokerTemplate();
    template.setPbKey(new PBKey("alias2", "user2", "password2"));
    assertEquals("alias2", template.getJcdAlias());
    assertEquals("alias2", template.getPbKey().getAlias());
    assertEquals("user2", template.getPbKey().getUser());
    assertEquals("password2", template.getPbKey().getPassword());
  }
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

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

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

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

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

    private JdbcConnectionDescriptor findJcd()
    {
        // Try to find JCD
        ConnectionRepository cr = MetadataManager.getInstance().connectionRepository();
        return cr.getDescriptor(new PBKey(JCD_ALIAS));
    }
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

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.