See below...

Armin Waibel wrote:
----- Original Message -----
From: "Will Jaynes" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, January 16, 2003 4:17 PM
Subject: Re: problem moving to 0.9.9



Thanks, for the reply, Armin,

My jdbc-connection-descriptor is defined as you indicate below (except
for Oracle), but...

I don't understand your ODMG-api example. The signature for
org.odmg.Database.open takes two String arguements, not one as you
show.

Sorry, I mean
db.open("default#sa#test", Database.OPEN_READ_WRITE);


It won't compile. So I am at a loss...

Also, your examples both include the user and password, and thus are
different than in the tutorials. Are the tutorials now out of date?

yes, that is on my todo list.

I add a workaround for that problem (hope so) - check out
new version of BrokerHelper.java (see #extractAllTokens(...)
if you want to play around ;-)).

Say you do the following call in 0.9.8

db.open("repository.xml", Database.OPEN_READ_WRITE);

To make this work with 0.9.9.x declare a jdbc-connection-descriptor

<jdbc-connection-descriptor
      jcd-alias="repository.xml"
      default-connection="true"
      platform="Hsqldb"
      jdbc-level="2.0"
......
For a second there I didn't realize that you had just *NOW* added the workaround in BrokerHelper.extractAllTokens. Having updated from CVS I see that the ODMG api now works more like I would expect.

Thank you.


regards,
Armin



Do
we need to pass in the user and password in the application code.
Isn't

it enough that these are defined in the jdbc-connection-descriptor?

Yours in confusion,
Will

Armin Waibel wrote:

Hi Will,

take a look in the release-notes.txt to see
what has changed.

Seems a configuration problem.
Say you have declared a jdbc-connection-descriptor
in repository_database.xml like this one below.

Then you could obtain PB instances
1.
PBKey key = new PBKey("default","sa","test");
broker = PBF.createPersistenceBroker(key);

2. You set this descriptor as default-connection
broker = PBF.defaultPersistenceBroker();

ODMG-api
Database db = odmg.newDatabase();
db.open("default#sa#test");
or, if a default-connection was declared
db.open(null); (this possibility maybe removed - security reasons)


<jdbc-connection-descriptor
    jcd-alias="default"
    default-connection="true"
    platform="Hsqldb"
    jdbc-level="2.0"
    driver="org.hsqldb.jdbcDriver"
    protocol="jdbc"
    subprotocol="hsqldb"
    dbalias="../OJB"
    username="sa"
    password="test"
    batch-mode="false"
    >

       <connection-pool
           maxActive="21"
           validationQuery="" />

       <sequence-manager

className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImp

l">
           <attribute attribute-name="grabSize"
attribute-value="20"/>

       </sequence-manager>
  </jdbc-connection-descriptor>

HTH

regards,
Armin

----- Original Message -----
From: "Will Jaynes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 16, 2003 2:34 PM
Subject: problem moving to 0.9.9




I'm trying to upgrade one of my applications to the latest from CVS.
It


has been working with 0.9.7. I upgraded
- repository.xml
- repository_internal.xml
- repository.dtd
- the ojb jar file
- replaced commons-lang.jar with new commons-lang-1.0-mod.jar that
comes


in CVS

Now I get an exception I don't understand:

[org.apache.ojb.broker.metadata.ConnectionRepository] INFO: Could
not

found org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for
alias


'org.apache.ojb.broker.PBKey: repository=repository.xml, user=null,
password=null'
[org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR:
ConfigurableFactory instantiation failed for class class
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
* Factory types:
1 - Type: org.apache.ojb.broker.PersistenceBroker
* Factory arguments:
1 - Argument:
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl@18d9850


What has changed and what more must I do to upgrade.

Thanks for any info,
Will


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>

For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>

For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>

For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to