Re: Jboss (3.2.3) Session Bean with RC5

2003-12-30 Thread Gunnar Hilling
Hello, I think I found the error: I have to use Container-Transaction with the JBossTransactionManagerFactory. All other Combinations (especially Bean managed Transactions) seem not to work. I set eager-release to "true" (will try other possibilities later/tomorrow). MBean access also seems not t

Re: Jboss (3.2.3) Session Bean with RC5

2003-12-30 Thread Gunnar Hilling
On Tue, 30 Dec 2003 21:18:14 -0500, Brian McCallister wrote: > Do you have eager-release in the connection descriptor enabled or > disabled? > I tried both (not sure about all combinations) but it didn't seem to have any effect (I think it should be set to true for JBoss 3.0.6 - says the doc ...

Re: Jboss (3.2.3) Session Bean with RC5

2003-12-30 Thread Brian McCallister
Do you have eager-release in the connection descriptor enabled or disabled? -Brian On Dec 30, 2003, at 8:26 PM, Gunnar Hilling wrote: Hello all! I got serious problems integrating ojb-rc5 (using odmg) into jboss. All works fine when testing with MBeans. In a stateless session bean selecting

Jboss (3.2.3) Session Bean with RC5

2003-12-30 Thread Gunnar Hilling
Hello all! I got serious problems integrating ojb-rc5 (using odmg) into jboss. All works fine when testing with MBeans. In a stateless session bean selecting data I get an error: [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them your

Re: AW: AW: AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Armin Waibel
Hi Dirk, I don't have experience what's the best way in using PB-api in servlets. But I can give some notes: - PB instances are pooled and PB.close() close the PB-handle and return the underlying PB instance to pool, thus get a PB instance from the pool (PersistenceBrokerFactory) when you need i

Re: ODMG update

2003-12-30 Thread Gunnar Hilling
Hi! > Hi Gunnar, > > I will try to write a test case for your problem. > By the way, does your test pass when you switch back to old DList > implementation class in OJB.properties? > I think I found the problems in my code. It was caused by implicit locking. All worked well when I turned implici

Re: objects in cache after transaction abort

2003-12-30 Thread Armin Waibel
Hi Jair Jr, hmm, this should not happend. Do you use checkpoint() or flush() in your code? This only could happens when the object was already in DB. Only the PersistenceBrokerImpl and RsIterator class push objects to cache. If you abort the tx, the PB instance is not aware of locked objects. In

Re: cache implementation change in rc5?

2003-12-30 Thread Armin Waibel
Hi Jair Jr, it's a(/my) bug in ObjectCacheDefaultImpl (rc5) causing this strange behaviour. I will check in a fixed version tomorrow. More info see thread 'Usage WeakHashMap in AnonymousPersistentField Re: Cache and prefetched relationships' regards, Armin Jair da Silva Ferreira Júnior wrote:

cache implementation change in rc5?

2003-12-30 Thread Jair da Silva Ferreira Júnior
Hi, I am using ojb1.0_rc5, ODMG api with OJB queries, mysql4 (innodb tables) in Linux Red Hat 7.3 (kernel 2.4.20-20.7). I moved from rc4 to rc5 recently and I noticed that sometimes when I run a query the resulting associated objects don't come from the cache. Please, take a look at the

Re: ODMG update

2003-12-30 Thread Armin Waibel
Hi Gunnar, I will try to write a test case for your problem. By the way, does your test pass when you switch back to old DList implementation class in OJB.properties? regards, Armin Gunnar Hilling wrote: Hello! I got the following serious problem (RC5): Using the following code, only one (the

Re: Find by ID in ODMG API?

2003-12-30 Thread Sean Dockery
You can use PersistenceBroker Queries directly... http://db.apache.org/ojb/faq.html#I%20don't%20like%20OQL,%20can%20I%20use%20the%20PersistenceBroker%20Queries%20within%20ODMG? "Andreas Schildbach" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there a simple "Find by ID" call,

objects in cache after transaction abort

2003-12-30 Thread Jair da Silva Ferreira Júnior
Hi, I am using ojb1.0_rc5, ODMG api with OJB queries, mysql4 (innodb tables) in Linux Red Hat 7.3 (kernel 2.4.20-20.7). I moved from rc4 to rc5 recently and I noticed that sometimes the objects persisted inside an aborted transaction are still in cache when another transaction is started

Find by ID in ODMG API?

2003-12-30 Thread Andreas Schildbach
Is there a simple "Find by ID" call, instead of using a somewhat bloated OQLQuery that only returns one result (and having to use an Iterator just to get one object). Something similar to "Object Database.load(Class type, Object identity)" in the Castor API? Regards, Andreas

supplying default values?

2003-12-30 Thread Andreas Schildbach
With my own O/R mapping, I used to have read-only columns with special default values, like a "created_at" column with the creation date of each row of a table. I created the row on MySQL with INSERT INTO table ( ..., ? ) VALUES ( ..., NOW()). Is there any way to supply database functions in o

Re: OrderBy of ref class having same property name = problem

2003-12-30 Thread Jakob Braeuchi
hi terry, i checked in a quick fix using column alias. jakob Jakob Braeuchi wrote: hi terry, i can reproduce the problem and i posted it to the developer list: http://article.gmane.org/gmane.comp.jakarta.ojb.devel/4830 thanks for the testcase. jakob Terry Brick wrote: Thanks Jakob for y

AW: AW: AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Dirk Manske (Service Respond)
Hi Armin, I solved the issue. It was indeed a second broker connection open... (was hard to track...). Anyway, I posted the jdbc connection descriptor settings and the source code. I should mention that we have a PersistenceManagerFactory which will be called on web-app startup and initializes a c

QueryFactory.newQuery(Class, Critiera) vs. QueryByCriteria

2003-12-30 Thread Sean Dockery
The examples on the OJB web site show code that uses the following... Query query = new QueryByCriteria(Product.class, criteria); ...instead of... Query query = QueryFactory.newQuery(Product.class, critiera); Would one ever choose the former style of the latter?

[RESEND]Re: Problem changing from RC4 to RC5

2003-12-30 Thread Erik Engstrom
That didnt work, don't know where it is being lost. Could someone take a look at this? Here it is inline: --- db-ojb-1.0.rc5/src/test/org/apache/ojb/odmg/CollectionsTest.java 2003-12-14 06:59:05.0 -0600 +++ db-ojb-1.0.rc5.broken/src/test/org/apache/ojb/odmg/CollectionsTest.java 200

Re: [RESEND]Re: Problem changing from RC4 to RC5

2003-12-30 Thread Erik Engstrom
Looks like my attatchment got stripped some how, Ill try it again. >>> [EMAIL PROTECTED] 12/29/03 09:48 AM >>> Ok, here is a real simple patch to the org.apache.ojb.odmg.CollectionsTest that causes the test to fail. My goal is to simulate restarting the system between storing and verifying. I th

OQLQuery being cached?

2003-12-30 Thread Katarn
Hi, I am executing the following code: OQLQuery query = impl.newOQLQuery(); query.create( [THEQUERY] ); DList results = (DList)query.execute(); Iterator iterator = results.iterator(); If I change some column with an external tool and then execute the code, the updated column is not r

AW: ClassPersistenceNotCapableException: java.lang.Integer not found ...

2003-12-30 Thread Dirk Manske
Thanks Wally, it is the information I was in desparate need. -Ursprüngliche Nachricht- Von: Gelhar, Wallace Joseph [mailto:[EMAIL PROTECTED] Gesendet: Montag, 29. Dezember 2003 21:22 An: OJB Users List Betreff: RE: ClassPersistenceNotCapableException: java.lang.Integer not found ... Ver

Re: AW: AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Armin Waibel
more questions: Armin Waibel wrote: Hi Dirk, I can't believe that PB-api is the problem. Can you post a junit test (or a modified test from test suite) to reproduce the problem? What calculations you are doing, do you use the ConnectionManager? Do you set eager-release 'true' in jdbc-connectio

Re: AW: AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Armin Waibel
Hi Dirk, I can't believe that PB-api is the problem. Can you post a junit test (or a modified test from test suite) to reproduce the problem? What calculations you are doing, do you use the ConnectionManager? Do you set eager-release 'true' in jdbc-connection-descriptor? Do you use batch mode? r

AW: AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Dirk Manske (Service Respond)
Hi Armin, no, as ConnectionFactoryClass I use ConnectionFactoryPooledImpl. While the process runs there is only one OJB object (the pm object, see code snippet) and I do not use further data sources. All database operations are only handled by PB. greets, Dirk -Ursprüngliche Nachricht---

questions about tx.lock() and a feature request

2003-12-30 Thread Gunnar Hilling
Hello, 1.) I was just trying to update data with odmg and found that using implicit locking is quite tricky because it seems to result in locking the same Objects multiple times eventually. Is this assumption correct? If so, is it a good advice to turn implicit locking off with tx.setImplicitLock

Re: AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Armin Waibel
Hi Dirk, hmm, this shouldn't be a problem. Do you use any connection object from OJB while performing your test? Do you use ConnectionFactoryManagedImpl in OJB.properties file as ConnectionFactoryClass? Do you use DataSource? regards, Armin Dirk Manske (Service Respond) wrote: Hi Wally, auto-c

Re: OutOfMemoryError

2003-12-30 Thread Brian McCallister
Which object cache are you using? When you say "any" -- can you run the unit tests that come with OJB? -Brian On Dec 30, 2003, at 8:29 AM, Fabiano Fernandes de Souza wrote: I'm getting this "java.lang.OutOfMemoryError" when i try to run any ojb task. Have you any idea of how can i solve it? Th

ODMG update (additional info)

2003-12-30 Thread Gunnar Hilling
following a snippet from the generated xml-descriptor: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

AW: how can i do multiple operations in one transaction?

2003-12-30 Thread Dirk Manske (Service Respond)
Hi Wally, auto-commit is set to "2" = off. I still get an org.apache.ojb.broker.TransactionNotInProgressException: ConnectionManager is NOT in transaction. This exception is thrown after pm.commitTransaction() is executed. However, if I comment this out, it runs well, both objects are stored. I re

ODMG update

2003-12-30 Thread Gunnar Hilling
Hello! I got the following serious problem (RC5): Using the following code, only one (the last) of the "Zertifikat"-Objects is updated (it has two foreignkeys pointing to "TextData"). Any clue? This ist a 1:1-Relation from Zertifikat to TextData. There is currently no foreign key constraint for t

OutOfMemoryError

2003-12-30 Thread Fabiano Fernandes de Souza
I'm getting this "java.lang.OutOfMemoryError" when i try to run any ojb task. Have you any idea of how can i solve it? Thanks. -- Fabiano F. Souza Tecnologia da Informação Estudar Soluções em Treinamento Corporativo. (31) 32849294 - [EMAIL PROTECTED] --

Re: Query prefetching non-decomposed M:N relationships is unimplemented?

2003-12-30 Thread Jakob Braeuchi
hi oleg, the constraint violation is imo due to the fact that the odmg-testcase runs after the pb-testcase. when i run the odmg-testcase against a clean database, there's not constraint violation. jakob Oleg Nitz wrote: Hi Jakob, Great work! I have included m:n relationships to those that ar