RE: Help with using OJB with Tomcat

2003-08-14 Thread Paul Worrall
Hi Jason,


Yes the two apps were self contained.  I have tried to change this by
implementing a factory object in Tomcats GlobalNamingResources that
creates PersistenceBroker objects but have ran into problems casting the
object back once it returns from a JNDI lookup().  At that point I
thought there must be some documentation/info to hand hold me through
it.  Or, as you might be implying, an alternative way of configuring OJB
to be shared in Tomcat.

Paul W.

-Original Message-
From: Jason McKerr [mailto:[EMAIL PROTECTED] 
Sent: 07 August 2003 18:10
To: OJB Users List
Subject: Re: Help with using OJB with Tomcat


Do the two webapps have there own OJB instances (as in separate JAR
files, OJB.properties etc) in their own respective WEB-INF/lib,
WEB-INF/classes area?  Or are they using shared resources through
something like tomcat/common/lib?

Jason

On Thu, 2003-08-07 at 10:03, Paul Worrall wrote:
 Hi,
  
 Can anyone point me to documentation/info on configuring OJB with 
 Tomcat.  I have ran into a problem where two web apps running on the 
 same Tomcat instance that are supposed to use the same OJB cache seem 
 to get their own instances.  Therefore changes to data in one app are

 not reflected on the other.
  
 TIA
 
 Kind regards,
 
 
 Paul Worrall
 Architect | Director
 
 Apcentric Limited
 
 The Soft Science of J2EE Deployment
 
 
 m: +44 (0) 77 1133 0213
 w: www.apcentric.com http://www.apcentric.com/ 
 
 Any opinions expressed in the email are those of the individual and 
 not
 necessarily of the company.  This email and any files transmitted with

 it are confidential and solely for the use of the intended recipient. 
 It may contain material protected by attorney-client privilege.  If
you 
 are not the intended recipient or person responsible for delivering to

 the intended recipient, be advised that you have received this email
in 
 error and that any use is strictly prohibited.  If you have received 
 this email in error please notify the IT manager. 
 


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





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



Help with using OJB with Tomcat

2003-08-14 Thread Paul Worrall
Hi,
 
Can anyone point me to documentation/info on configuring OJB with
Tomcat.  I have ran into a problem where two web apps running on the
same Tomcat instance that are supposed to use the same OJB cache seem to
get their own instances.  Therefore changes to data in one app are  not
reflected on the other.
 
TIA

Kind regards, 


Paul Worrall 
Architect | Director

Apcentric Limited

The Soft Science of J2EE Deployment


m: +44 (0) 77 1133 0213 
w: www.apcentric.com http://www.apcentric.com/ 

Any opinions expressed in the email are those of the individual and not 
necessarily of the company.  This email and any files transmitted with 
it are confidential and solely for the use of the intended recipient. 
It may contain material protected by attorney-client privilege.  If you 
are not the intended recipient or person responsible for delivering to 
the intended recipient, be advised that you have received this email in 
error and that any use is strictly prohibited.  If you have received 
this email in error please notify the IT manager. 



Turning off the cache or marking chached objects stale

2003-07-11 Thread Paul Worrall
Hi,

I am passing a serialized object through a JMS middleware. This is an
object persisted using OJB and the object ends up being 'published' from
one JVM and 'subscribed' to from another JVM. I presume because of the
caching of persistent objects in OJB changes by the subscriber to the
objects persistent state are not being reflected in the publishers side.

Do I have to turn the caching off to get these database changes to be
reflected and how do I do that. Or is there some mechanism that marks
cached objects as stale when the state changes in the database without
going through the OJB. And how do I do that?

Kind regards, 

 

Paul Worrall 

Architect | Director

Apcentric Limited

The Soft Science of J2EE Deployment

 

m: +44 (0) 77 1133 0213 

w:  http://www.apcentric.com/ http://www.apcentric.com/
outbind://10/www.apcentric.com www.apcentric.com

Any opinions expressed in the email are those of the individual and not 

necessarily of the company. This email and any files transmitted with 

it are confidential and solely for the use of the intended recipient. 

It may contain material protected by attorney-client privilege. If you 

are not the intended recipient or person responsible for delivering to 

the intended recipient, be advised that you have received this email in 

error and that any use is strictly prohibited. If you have received 

this email in error please notify the IT manager. 

 

Kind regards, 


Paul Worrall 
Commercial Director 

MJW Handling Services Limited 
Rising to the Challenge 

t: +44 (0) 870 204 1902 
m: +44 (0) 77 1133 0213 
w: www.mjw-handling.co.uk 

Any opinions expressed in the email are those of the individual and not 
necessarily of the company.  This email and any files transmitted with 
it are confidential and solely for the use of the intended recipient. 
It may contain material protected by attorney-client privilege.  If you 
are not the intended recipient or person responsible for delivering to 
the intended recipient, be advised that you have received this email in 
error and that any use is strictly prohibited.  If you have received 
this email in error please notify the IT manager. 

 


Accomodating the VERSION column during ojb upgrade

2003-06-11 Thread Paul Worrall
Help much appreciated,

I am upgrading from 0.9.5 to 1.0 rc3 and I am told in the release notes

to:

- Intern table OJB_HL_SEQ (used by SequenceManagerHighLowImpl)

has changed! Now need an additional column 'VERSION' of type INTEGER

When updating from earlier version drop/reinstall table with additional
field

Can I just alter the existing table to add the column VERSION?

If I drop it is there a script a run to rebuild it?

Will it affect the integrity of my existing data tables?

TIA.

 

Kind regards, 


Paul Worrall 
Architect | Director

Apcentric Limited

The Soft Science of J2EE Deployment


m: +44 (0) 77 1133 0213 
w: www.apcentric.com http://www.apcentric.com/ 

Any opinions expressed in the email are those of the individual and not 
necessarily of the company.  This email and any files transmitted with 
it are confidential and solely for the use of the intended recipient. 
It may contain material protected by attorney-client privilege.  If you 
are not the intended recipient or person responsible for delivering to 
the intended recipient, be advised that you have received this email in 
error and that any use is strictly prohibited.  If you have received 
this email in error please notify the IT manager. 

 


RE: Accomodating the VERSION column during ojb upgrade

2003-06-11 Thread Paul Worrall
Thanks.  It worked.

Regards,

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 11 June 2003 21:39
To: OJB Users List
Subject: Re: Accomodating the VERSION column during ojb upgrade


Most DBMS allow to add columns without changing existing data. I think
it will be the safest way to upgrade.

Paul Worrall wrote:
 Help much appreciated,
 
 I am upgrading from 0.9.5 to 1.0 rc3 and I am told in the release 
 notes
 
 to:
 
 - Intern table OJB_HL_SEQ (used by SequenceManagerHighLowImpl)
 
 has changed! Now need an additional column 'VERSION' of type INTEGER
 
 When updating from earlier version drop/reinstall table with 
 additional field
 
 Can I just alter the existing table to add the column VERSION?
 
 If I drop it is there a script a run to rebuild it?
 
 Will it affect the integrity of my existing data tables?
 
 TIA.
 
  
 
 Kind regards,
 
 
 Paul Worrall
 Architect | Director
 
 Apcentric Limited
 
 The Soft Science of J2EE Deployment
 
 
 m: +44 (0) 77 1133 0213
 w: www.apcentric.com http://www.apcentric.com/ 
 
 Any opinions expressed in the email are those of the individual and 
 not
 necessarily of the company.  This email and any files transmitted with

 it are confidential and solely for the use of the intended recipient. 
 It may contain material protected by attorney-client privilege.  If
you 
 are not the intended recipient or person responsible for delivering to

 the intended recipient, be advised that you have received this email
in 
 error and that any use is strictly prohibited.  If you have received 
 this email in error please notify the IT manager. 
 
  
 


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




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



RE: timeout after long period of idleness

2003-06-07 Thread Paul Worrall
Thanks Thomas,



I tried Michael Schulze advise and found I needed to upgrade to the
MySQL Connector/J version 3.0.7 to use the autoReconnect parameter for
the db URL.  This didn't solve my problem though.  I then found the
README file for Connector/J explicitly says:-

  MySQL closes connections after 8 hours of inactivity. You either
  need to use a connection pool that handles stale connections or use
the 
  autoReconnect parameter (see USAGE AND INSTALLATION). Also, you
should
  be catching SQLExceptions in your application and dealing with them,
rather
  than propagating them all the way until your application exits, this
is just
  good software development. MySQL Connector/J will set the SQLState
(see 
  java.sql.SQLException.getSQLState() in your APIDOCS) to 08S01 when
it 
  encounters network-connectivity issues during the processing of a
query. 
  Your application code should then attempt to re-connect to MySQL at
this 
  point. 

I presume I should be expecting OJB to take care of this for me. I don't
find the validationQuery attribute in the repository.dtd for the
connection-pool element so is this an enhancement in a more recent
version of OJB?

TIA
Paul W.

-Original Message-
From: Mahler Thomas [mailto:[EMAIL PROTECTED] 
Sent: 04 June 2003 09:07
To: 'OJB Users List'
Subject: RE: timeout after long period of idleness


It's a problem of the connection pool. It keeps the connections, but
after some time MySql disconnects the idle connections. You should use
the connection-pool validationQuery attribute to specify a SQL query
that is used to detect if a connection is still alive, as in the
following example

connection-pool maxActive=5 whenExhaustedAction=0
validationQuery=select count(*) from OJB_HL_SEQ /


cheers,
thomas

 -Original Message-
 From: Paul Worrall [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 04, 2003 9:59 AM
 To: [EMAIL PROTECTED]
 Subject: timeout after long period of idleness
 
 
 Hi,
  
 I am using ojb-0.9.5 for persistence in a servlet application running 
 under Tomcat 4.1.12 on Java 1.4.0_1.  The database is MySQL and I used

 3.23.51 without any problems but a recent upgrade to 4.0.12 has 
 introduced a problem where OJB seems to loose its connections/ability 
 to connect after a long period of idleness.  Long period is
 between 5 to 8
 hours.
  
 Has anyone experience this problem?
 
 Kind regards,
 
 
 Paul Worrall
 Architect | Director
 
 Apcentric Limited
 
 The Soft Science of J2EE Deployment
 
 
 m: +44 (0) 77 1133 0213
 w: www.apcentric.com http://www.apcentric.com/ 
 
 Any opinions expressed in the email are those of the
 individual and not 
 necessarily of the company.  This email and any files 
 transmitted with 
 it are confidential and solely for the use of the intended recipient. 
 It may contain material protected by attorney-client 
 privilege.  If you 
 are not the intended recipient or person responsible for 
 delivering to 
 the intended recipient, be advised that you have received 
 this email in 
 error and that any use is strictly prohibited.  If you have received 
 this email in error please notify the IT manager. 
 
  
 


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




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



timeout after long period of idleness

2003-06-04 Thread Paul Worrall
Hi,
 
I am using ojb-0.9.5 for persistence in a servlet application running
under Tomcat 4.1.12 on Java 1.4.0_1.  The database is MySQL and I used
3.23.51 without any problems but a recent upgrade to 4.0.12 has
introduced a problem where OJB seems to loose its connections/ability to
connect after a long period of idleness.  Long period is between 5 to 8
hours.
 
Has anyone experience this problem?

Kind regards, 


Paul Worrall 
Architect | Director

Apcentric Limited

The Soft Science of J2EE Deployment


m: +44 (0) 77 1133 0213 
w: www.apcentric.com http://www.apcentric.com/ 

Any opinions expressed in the email are those of the individual and not 
necessarily of the company.  This email and any files transmitted with 
it are confidential and solely for the use of the intended recipient. 
It may contain material protected by attorney-client privilege.  If you 
are not the intended recipient or person responsible for delivering to 
the intended recipient, be advised that you have received this email in 
error and that any use is strictly prohibited.  If you have received 
this email in error please notify the IT manager.