Connection problem

2005-04-07 Thread Bikram B Kapoor
Hello Everyone, I am facing a serious problem with Connection in OJB. The situation this error occurs is when the site has been inactive for quite some time i.e. No web visitors are present and when a user visits the site and tries to login I get Exception from: [--

Re: Connection problem

2005-04-07 Thread Thomas Dudziak
That's probably a configuration issue with the MySQL JDBC driver or the MySQL server as MySQL shuts down the connection after a certain period of inactivity. You can try to specify some properties in the jdbc url, e.g. autoReconnect, see here for details:

OJB Listener :: Best practise

2005-04-07 Thread Nils Liebelt
Hi everybody, I need a simple Listener which methods get called after insert, update and delete. I just found Listener for Transaction stuff in the API. Any suggestions? GreetZ Nils

AppServer: When does a Transaction start/end?

2005-04-07 Thread Andreas Bohnert
hello list, I would like to clearify, how ojb and jboss handle a transaction in a managed environment exactly. I'm using Jboss and the PersistenceBrokerFactorySyncImpl. I assume, it's is like that: void func() { PersistenceBroker broker = getBroker(); -- here the transaction starts!?

RE: OJB Listener :: Best practise

2005-04-07 Thread Charles Anthony
Here's a quick off the cuff list of steps for listeners that work for both ODMG PB, based on what we do here. a) Create your own persistence broker factory, extending PersistenceBrokerFactoryDefaultImpl b) Override createNewBrokerInstance(PBKey key) and add your listener(s)

RE: OJB Listener :: Best practise

2005-04-07 Thread Vesely, Max [IT]
Charles, Do you know if listener state events (afterBegin, afterCommit, ...) are going to be invoked in managed environment? Thank you, Max. -Original Message- From: Charles Anthony [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 9:12 AM To: 'OJB Users List' Cc: [EMAIL

RE: OJB Listener :: Best practise

2005-04-07 Thread Charles Anthony
Hi, I've never used OJB in managed environment, but looking at the PersistenBrokerFactorySyncImpl (http://cvs.apache.org/viewcvs.cgi/db-ojb/src/java/org/apache/ojb/broker/cor e/PersistenceBrokerFactorySyncImpl.java?view=markup) specifically, the PersistenceBrokerSyncImpl inner class, it certainly

Re: Connection problem

2005-04-07 Thread Martin Kalén
Bikram B Kapoor wrote: I am facing a serious problem with Connection in OJB. The situation this error occurs is when the site has been inactive for quite some time Use a validation query that just performs a fast/simple query to ping the database server. This can be eg SELECT 1

Re: OJB Listener :: Best practise

2005-04-07 Thread Martin Kalén
Nils Liebelt wrote: I need a simple Listener which methods get called after insert, update and delete. I just found Listener for Transaction stuff in the API. Any suggestions? If it is an option for you to modify your persistence beans, you can implement

RE: OJB Listener :: Best practise

2005-04-07 Thread Nils Liebelt
This looks like good option for me. Thanks Nils -Original Message- From: Martin Kalén [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 5:44 PM To: OJB Users List Subject: Re: OJB Listener :: Best practise Nils Liebelt wrote: I need a simple Listener which methods get

mapping one object in different RDBMS

2005-04-07 Thread Stas Ostapenko
I`m trying to do mapping one object in two RDBMS and different tables. How can I create mapping and access SAME objects in different db`s on the fly ?.For example to store search results of databaseA in databaseB ? I use PB API.

new functionality concerning setting member variables

2005-04-07 Thread Bobby Lawrence
I don't know if this is the correct place to ask, but... Is it possible to tell OJB to call setter methods on the descriptor classes instead of attempting to get the field, calling myField.setAccessible(true), and calling the myField.set() method? This will enforce the practice of creating

Re: new functionality concerning setting member variables

2005-04-07 Thread Thomas Dudziak
Is it possible to tell OJB to call setter methods on the descriptor classes instead of attempting to get the field, calling myField.setAccessible(true), and calling the myField.set() method? This will enforce the practice of creating good JavaBeans with the proper accessor methods. It will

Re: new functionality concerning setting member variables

2005-04-07 Thread Bobby Lawrence
Thanx! Armin Waibel wrote: Hi Bobby, have a look at this http://db.apache.org/ojb/docu/guides/advanced-technique.html#Change+PersistentField+Class regards, Armin Bobby Lawrence wrote: I don't know if this is the correct place to ask, but... Is it possible to tell OJB to call setter methods on

mapping one object in different RDBMS - source

2005-04-07 Thread Stas Ostapenko
I have a problem with inserting all table data of one table to another table in other RDBMS. Following code works, but it stores not all the data, but only first object. Where I`m wrong ? Please help. import org.apache.ojb.broker.PersistenceBroker; import