RE: How to configure OJB with Tomcat

2003-06-05 Thread BURT, RANDALL (CONTRACTOR)
Pooling other than what OJB provides? -Original Message- From: Lukas Severin [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 6:36 AM To: OJB Users List Subject: How to configure OJB with Tomcat I read the documentation about setting up OJB in a servlet. However I couldnt find any

Re: ODMG and collection descriptor

2003-06-05 Thread Miroslav Lazarević
On Wednesday 04 June 2003 10:20, Mahler Thomas wrote: > Hi again, > > correct the collection attribute should be typed as DList. > > the respective collecion descriptor in repository.xml could look like > follows: >name="myListAttribute" > collection-class="org.apache.ojb.odmg.collections.DLi

Re: Possible OJB Bug with Oracle

2003-06-05 Thread kristian meier
here is the conversion class I am now using: public class OracleFieldConversion implements FieldConversion { public OracleFieldConversion(){ } // Implementation of org.apache.ojb.broker.accesslayer.conversions.FieldConversion /** * Describe javaToSql method here. * * @

Re[5]: ODMG intialization.

2003-06-05 Thread Alexander Prozor
I got such log... [org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO: Destroy object was called, try to close connection: [EMAIL PROTECTED] [org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl] INFO: OptimisticLockException was thrown, will try again to store sequence

Re: How to alternate Criteria.addGroupBy .

2003-06-05 Thread shivaken
Hi Thomas, Thanks for your advice. But, addGroupBy() accepts Field (name or FieldDescriptor). I want use group by like below, (with mysql) --- select DATE_FORMAT(DATE, " %Y %m %d"), count(*) from A0 group by DATE_FORMAT(DATE, " %Y %m %d") --- The type of DATE is TIMESTAMP. Is there any way ?

Re[4]: ODMG intialization.

2003-06-05 Thread Alexander Prozor
Hello Armin, OJB 1 Rc3, I use Oracle, and I've tried both driver ( thin and oci8 ). result the same, when I set repository_database.xml sounds strange! Could you give some more information. AW> Code snip, OJB version, repository_database.xml AW> file. -- Best regards, Alexander

How to configure OJB with Tomcat

2003-06-05 Thread Lukas Severin
I read the documentation about setting up OJB in a servlet. However I couldnt find any instructions on how to configure connection pooling (eg using jakarta-commons) together with OJB in Tomcat so that connections to the database is pooled. Are there any synchronization issues to be careful about ?

Nested Query, Subquery

2003-06-05 Thread Alexander Prozor
Hello Again :), is it possible to use nested queries in OJB OQL ? something like : select distinct struct (code: c.crse_code, title: c.crse_title, (select x from c.offers x where x.enrollment < 20)) from courses c or define to classes or more in From statements? thank you. -- Best regards,

Re: Possible OJB Bug with Oracle

2003-06-05 Thread kristian meier
Sorry for my ignorance, I just did not expected any problems while switching the databases. with a simple FieldConversion, now all my Integer-fields also work on Oracle. that's for help ;-) with best wishes Kristian Mahler Thomas wrote: Hi again, -Original Message- From: kristi

RE: Identity_Insert mssql

2003-06-05 Thread Peter Costa
We were not able to fix it. We had to modify the OJB code to check to see if the first field is an auto-increment field and if it was, then we would turn Identity insert on. That requires that you make sure that if you are going to use Identity insert that it be the first field. Not a great fix, bu

Re: Cannot switch to MySQL

2003-06-05 Thread shivaken
Hi, Maybe your repository_database.xml is wrong. 'test.' is database name. You have to set mysql database name as below. - dbalias="//localhost:3306/test + dbalias="//localhost:3306/databaseName On Thursday 05 June 2003 23:57, Christian Pesch wrote: > Hi Folks, > > I'm clueless how to switch

Re: Identity_Insert mssql

2003-06-05 Thread Brian Chaplin
Did you ever solve this? I'm having the same issue with Sybase 11.9.3 identity columns. "Peter Costa" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am stuck with it for right now. So I take it there is no easy way > around this other than removing the Identities. If anyone has an

RE: How to alternate Criteria.addGroupBy .

2003-06-05 Thread Mahler Thomas
Just have a a look at the Javadocs: http://db.apache.org/ojb/api/org/apache/ojb/broker/query/QueryByCriteria.htm l#addOrderBy(java.lang.String) Thomas > -Original Message- > From: shivaken [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 11:21 AM > To: OJB Users List > Subject: H

RE: Possible OJB Bug with Oracle

2003-06-05 Thread Mahler Thomas
Hi again, > -Original Message- > From: kristian meier [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 11:54 AM > To: OJB Users List > Subject: Re: Possible OJB Bug with Oracle > > > Hi Thomas, > > just to understand, if > > repository.xml > > is wrongly configured it should

problem using dynamic proxies

2003-06-05 Thread Nikos Vitalis
Hi everyone, i have a problem using dynamic proxies in a multiuser enviroment. Assume that client A has a unmaterialized proxy P for the persistent object Person. The Person got deleted by client B. When client A tries to access the proxy P a NullPointerException will be thrown. The tests succeed

Re: Possible OJB Bug with Oracle

2003-06-05 Thread kristian meier
Hi Thomas, just to understand, if repository.xml is wrongly configured it shouldn't work with mysql, hsqldb as well not oracle. basically the same file (the platform attribute changes respectivly) works fine for mysql, hsqldb, but not for oracle !!! all java classes are the same in each case

How to alternate Criteria.addGroupBy .

2003-06-05 Thread shivaken
Hi all, Today, I noticed that Criteria.addGroupBy is deprcated. Then javadoc use Query#addGroupBy . But, interface org.apache.ojb.broker.query.Query dosen't have addGroupBy method. What do I have to use? -- shivaken antshell: Ant command line front end http://www.antshell.org --

RE: Possible OJB Bug with Oracle

2003-06-05 Thread Mahler Thomas
Hi Kristian, For me this does not look like a OJB bug, but as a configuration problem. If you have a java attribute of type String but have defined it as INTEGER in the repository.xml you've got a problem! If you want to have a String attribute converted into an Oracle Number column you should us

map mapping

2003-06-05 Thread [EMAIL PROTECTED]
Hello, I have a class with a map type attribute. I've try to store it using object to byte array conversion but it seems to not work. There are no errors during the storage, but when I list rows from the table, the corresponding column is empty whereas when debugging the converter it returns a byt

Re: Re[2]: ODMG intialization.

2003-06-05 Thread Armin Waibel
Hi, sounds strange! Could you give some more information. Code snip, OJB version, repository_database.xml file. regards, Armin - Original Message - From: "Alexander Prozor" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel" <[EMAIL PROTECTED]> Sent: Thursday, Ju

Re[2]: ODMG intialization.

2003-06-05 Thread Alexander Prozor
Hello Armin, Ok, but I still have problem with Active connections. Try to take example, when I set activeconnections = 10. I can open my page for a 3 times before server crashed ( it contains some db call ). when I set activeconnections = 40 I can do it for 10 times :). and so on. so I am think tha

Please help: How to delete a reference

2003-06-05 Thread Sylvain.Thevoz
Hello, I have a Workstation class which contains the reference "wntWorkstation" to another class WntWorkstation (there is a 1:1 relationship). How could I delete in Workstation the reference "wntWorkstation" AND the object referenced in WntWorksation table?? Thanks Sylvain Note: the mailing-

Re: Possible OJB Bug with Oracle

2003-06-05 Thread kristian meier
Hello, when I yesterday switch to oracle I came across the same exception and I investigated a bit, and found an unexpected situation in the PlatformOracleImpl.java in the setObjectForStatement( ) method the sqlType was Type.INTEGER and the value was a String class both arguments were pass

Re: refreshing a connection

2003-06-05 Thread Armin Waibel
Hi, use 'validationQuery' in your jdbc-connection-descriptor. Then OJB do a 'real' query before a connection was returned. This is a minor performance impact, but this should solve your problem. regards, Armin - Original Message - From: "luke cassady-dorion" <[EMAIL PROTECTED]> To: "'OJB

Re: ODMG intialization.

2003-06-05 Thread Armin Waibel
Hi, > connections. ( I also call db.close() after each operations ). is not necessary. Close the database only before open another. > > Or I just call db.open(...) the first time? yep, that's recommended > > It's is possible to share db among the different threads? yep! > > Should I close som

ODMG intialization.

2003-06-05 Thread Alexander Prozor
Hello , I can't find answer for this question... But I have a some strange trouble and it looks like I didn't close connections. ( I also call db.close() after each operations ). Should I call another finalized methods? thank you. > From: Mauricio CASTRO <[EMAIL PROTECTED]> > To: [EM

mySQL Sequences

2003-06-05 Thread Aaron Longwell
I'm working with mySQL 4+ and OJB's current release. I am wondering about the preferred method for autoincrement keys in mySQL. Almost all of my tables have an integer ID field that autoincrements in mySQL. I also edit the databases directly (i.e. not through OJB) through other apps. When I use

Re: SequenceManager trouble with rc3

2003-06-05 Thread David Forslund
I'm having some problems moving from 0.9.8 in the SequenceManager. I have a polymorphic class ObservationValue_ that has multiple . I have a primary key "valueId" which I try to increment with the call broker.serviceSequenceManager().getUniqueValue(field); This call fails with a NullPointerE

1 n Maps

2003-06-05 Thread Marcelo Magno
Hi, I am having some misunderstandings on implementing 1,n mappings. The mapping is this one, as follows right bellow. My doubt is in the collectin-descriptor: What is the field that I need to reference on the inverse-foreignkey? This colection is a vector of EntidadeExt

Re: Problems with DMap

2003-06-05 Thread Mark Neighbors
I can't send the actual code. Duplicating the error in an autonomous test may be probematic. It could be due to some mechanism (mine or ojb's) that doesn't get repesented in the autonomous environment. The only other alternatives I can think of at this point are to attempt working around it with

Re: 1-M mappings retry

2003-06-05 Thread James Nyika
Hi I just wanted to reping the group on this questions I am having trouble performing tasks with a 1-M mapping None of my objects use the reference descritor constructs. I constructed my 1-M exactly as the documentation suggests but the problem that i have is that when my test attempts to

Re: Problems with DMap

2003-06-05 Thread Thomas Mahler
Hi Mark, can you post a piece of code demonstrating the failure? I'd like to verify this with a test case. cheers, thomas Mark Neighbors wrote: Hi, I'm having problems with TransactionImpl.markDelete(Object anObject) regarding keys to DMAP entries as well as the DMap Impl object itself. markDelet

Re: Database views

2003-06-05 Thread Thomas Mahler
Hi Raymond, Raymond Barlow wrote: Hi all, I'd like to get a general opinion on what is the best practise for using database views or not. I'm currently converting a system that has a number of views. Some of the views use other views to build up reporting type information. I would think that

optimistic locking question

2003-06-05 Thread Bonnie MacKellar
Forgive me, I know this is a really basic question, but... I just finished reading how to set up optimistic locking. I gather that I need to set this explicitly for each class, and that each table needs to have a dedicated column for this purpose (timestamp or integer). Is this correct? Is there a

refreshing a connection

2003-06-05 Thread luke cassady-dorion
A requirement for my application is that the application can continue to service requests even if the database connection is severed. In order to do this, i'm putting insert requests into a queue and pushing them back on if they fail. What i'm finding tho is that the if the db is started and stoppe

App server-specific startup class needed?

2003-06-05 Thread Bates, Alex
What are the reasons for writing startup classes (ODMGFactory and PBFactory) specific to an app server (extending jboss.ServiceMBeanSupport for JBoss, and extending T3StartupDef for WebLogic, and xxx for WebSphere)? Could this be achieved using JMX alone, or does the spec not meet the needs to in

RE: Limited collection returned

2003-06-05 Thread Ken Dempster
I did finally get a chance and change eager-release to true. I just wanted to get back to you all and say I have confirmed it is retrieving the full collection. - Ken Ken Dempster Programmer Analyst Vision Solutions, Inc. 17911 Von Karman Ave, 5th Floor Irvine, CA 92614 UNITED STATES

Looking for guidelines ...

2003-06-05 Thread Semiosys (Elie Naulleau)
I installed OJB and ran the junit tests. Then I decided to make a test with a helloworld flavored application. I used the great xdoclet-ojb tool (this package is findable in the OJB CVS contrib) to generate myapp-repository.xml and myapp-schema.xml directly from my java source code (neat!). B

Problems with DMap

2003-06-05 Thread Mark Neighbors
Hi, I'm having problems with TransactionImpl.markDelete(Object anObject) regarding keys to DMAP entries as well as the DMap Impl object itself. markDelete will sometimes not cause an sql DELETE for these objects at transaction commit. However, the Entry object always get deleted. The persistent

Re: OJB will not persist a simple object :-(

2003-06-05 Thread Armin Waibel
Hi Chuck, to isolate your problem use default settings for connection properties: eager-release="false" batch-mode="false" useAutoCommit="1" ignoreAutoCommitExceptions="false" Maybe the sequence manager cause the problem. Change the sequence manager (e.g. SequenceManagerInMemoryImpl when running

Re: OJB will not persist a simple object :-(

2003-06-05 Thread Chuck Grohowski
Thanks so much Armin. Now After writing one object to the db, I get no errros but no more objects written to the database. DEBUG tells me it is now updating an object rather than doing a new insert even though a new object is attempted to be written. My repository.xml has changed to this: