You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Pa...@capgroup.com on 2003/05/14 08:38:03 UTC
Problem with locking features
Some questions ...
I tried to lock an object for writing but I get no exception if I launch
two processes locking the same object.
Has anybody heard something about this ?
OQLQuery query = odmg.newOQLQuery();
query.create("select allObjects from " + gl.class.getName() + " where
m_id = " + m_id);
DList result = (DList) query.execute();
Product toBeEdited = (Product) result.get(0);
tx.lock(toBeEdited, Transaction.WRITE);
... wait for some time ....
tx.commit();
Regards,
Patrick Reyes
"Armin Waibel"
<armin.waibel@code-a To: Patrick Reyes/CDS/CG/CAPITAL@CG
u-lait.de> cc:
Subject: Re: Strange error when opening the database
05/13/2003 03:13 PM
Please respond to
"Armin Waibel"
>
> OQL is indeed different from SQL!
'O' instead of 'S' ;-)
here is OQL query link
http://www.ccs.neu.edu/home/ylmao/oql/oql.html
some things are different using OJB, but it could be a
good starting point (beside the doc)
regards,
Armin
----- Original Message -----
From: <Pa...@capgroup.com>
To: <ar...@code-au-lait.de>
Sent: Tuesday, May 13, 2003 2:38 PM
Subject: Re: Strange error when opening the database
>
> OQL is indeed different from SQL!
>
> Thanks,
>
> Patrick Reyes
>
>
>
> "Armin Waibel"
> <armin.waibel@code-a To: "OJB Users
List" <oj...@db.apache.org>
> u-lait.de> cc: (bcc: Patrick
Reyes/CDS/CG/CAPITAL)
> Subject: Re:
Strange error when opening the database
> 05/13/2003 12:28 PM
> Please respond to
> "OJB Users List"
>
>
>
>
>
>
> try
>
> query.create("select allObjects from " + gl.class.getName());
>
> more info see
>
> http://db.apache.org/ojb/tutorial2.html
>
> regards,
> Armin
>
>
> ----- Original Message -----
> From: <Pa...@capgroup.com>
> To: "OJB Users List" <oj...@db.apache.org>
> Sent: Tuesday, May 13, 2003 12:01 PM
> Subject: Re: Strange error when opening the database
>
>
> >
> > Ok, that works now I am getting this error:
> >
> > at org.apache.ojb.odmg.oql.OQLParser.selectQuery(Unknown Source)
> >
> > at org.apache.ojb.odmg.oql.OQLParser.buildQuery(Unknown Source)
> >
> > at org.apache.ojb.odmg.oql.OQLQueryImpl.create(Unknown Source)
> >
> > at org.apache.ojb.odmg.oql.OQLQueryImpl.create(Unknown Source)
> >
> > when trying
> >
> > query.create("select * from " + gl.class.getName());
> >
> > What does it mean ?
> >
> > Thanks,
> >
> > Patrick Reyes
> >
> >
> >
> > "Armin Waibel"
> > <armin.waibel@code-a To: "OJB Users
> List" <oj...@db.apache.org>, "Armin Waibel"
> > u-lait.de>
> <ar...@code-au-lait.de>
> > cc: (bcc: Patrick
> Reyes/CDS/CG/CAPITAL)
> > 05/13/2003 11:31 AM Subject: Re:
> Strange error when opening the database
> > Please respond to
> > "OJB Users List"
> >
> >
> >
> >
> >
> >
> > sorry, should be jcdAlias name (not jcsAlias)
> >
> > <jdbc-connection-descriptor
> > jcd-alias="default"
> > platform="Hsqldb"
> > jdbc-level="2.0"
> > driver="org.hsqldb.jdbcDriver".....
> > ...
> >
> > ----- Original Message -----
> > From: "Armin Waibel" <ar...@code-au-lait.de>
> > To: "OJB Users List" <oj...@db.apache.org>
> > Sent: Tuesday, May 13, 2003 11:25 AM
> > Subject: Re: Strange error when opening the database
> >
> >
> > > Hi Patrick,
> > >
> > > ----- Original Message -----
> > > From: <Pa...@capgroup.com>
> > > To: <oj...@db.apache.org>
> > > Sent: Tuesday, May 13, 2003 11:13 AM
> > > Subject: Strange error when opening the database
> > >
> > >
> > > > I have recently swapped from OJB API to ODMG API now when I try
to
> > > open the
> > > > database with
> > > >
> > > > db.open("repository.xml", Database.OPEN_READ_WRITE);
> > >
> > > use the jcsAlias name defined in the jdbc-connection-descriptor
> > > to open:
> > >
> > > db.open("default", Database.OPEN_READ_WRITE);
> > >
> > > db.open("default#user#passwd", Database.OPEN_READ_WRITE);
> > >
> > > regards,
> > > Armin
> > >
> > > >
> > > > I get the following error:
> > > >
> > > > INFO: Could not found
> > > > org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for
> PBKey
> > > > 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
> > > >
> > > >
> > > > Even though I have not changed anything neither in the
> > repository.xml
> > > file
> > > > nor in the database.
> > > >
> > > > Any help would be appreciated :-)
> > > >
> > > > Regards,
> > > >
> > > > Patrick Reyes
> > > >
> > > >
> > >
> >
>
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > > > For additional commands, e-mail: ojb-user-help@db.apache.org
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: ojb-user-help@db.apache.org
> > >
> > >
> > >
> >
> >
> >
>
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
>
>
>
>