Re: Borrow broker from pool failed. in production server

2006-11-08 Thread Mike Perham

If you are leaking brokers, that doesn't solve the problem - it just
works around it.  We had the same problem with our Spring/JTA/OJB
application and I discovered the problem was due to using Spring DAOs
directly instead of going through the Spring transaction layer.

On 11/8/06, Marwane <[EMAIL PROTECTED]> wrote:

hi;
The problem is resolved using :


so it s strange the message gived by ojb tel us about the broker pool
problem
but  the solution was the growing the connection pool !

thx for all.


On 10/27/06, Armin Waibel <[EMAIL PROTECTED]> wrote:
>
> Marwane wrote:
> > thx.
> >
> > if i don't defin the connection-pool clause in the repository.xml what
> is
> > the default behavor about the
> > connection managment in ojb ?
> >
>
> I think by default 30 connections (docs says 21) managed by the pool (if
> you specify one of the "pooling" ConnectionFactory implementations in
> OJB.properties file). The other properties please see docs
> http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10284
> http://db.apache.org/ojb/docu/guides/connection.html
>
> regards,
> Armin
>
> >
> >
> > On 10/27/06, Armin Waibel <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi,
> >>
> >> Marwane wrote:
> >> > thx for your reply.
> >> > so we use only the maxActive declared in OJB.properties. in the
> >> > repository.xml we dont use
> >> > the connection-pool elements.
> >> >
> >>
> >> Keep in mind that OJB use two different pools by default. An PB-pool
> >> (settings in OJB.properties file) and a connection-pool (setting within
> >> the connection-pool element in repository file).
> >>
> >> >> > we use maxActif in 1000 the problem persist.
> >> It seems that the error is caused by the broker-pool and not by the
> >> connection-pool. Normally the connection is associated with the PB when
> >> PB-tx starts or a query is performed - thus always after the PB is
> >> requested from the PB-pool.
> >> If the suggestions from Eric and Dennis doesn't solve your problem I
> >> suppose you have a PB leak in your code.
> >>
> >> regards,
> >> Armin
> >>
> >> > regards.
> >> >
> >> > On 10/26/06, Dennis Bekkering <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> when i have a quick look it seems to be about the broker pool and
> not
> >> >> the connection pool. Check your OJB.properties and set maxActive to
> >> >> the same value as maxActive of the connection pool settings in
> >> >> repository_database.xml. I am not sure about it but your problem
> >> >> happened to me once this way and it was solved by doing as i
> suggest.
> >> >>
> >> >> regards,
> >> >> Dennis
> >> >>
> >> >> 2006/10/26, Marwane <[EMAIL PROTECTED]>:
> >> >> > hi
> >> >> > we have a web application on production used about 500 users.
> >> >> > we use default value of ojb parameters (maxActif: 100 ).
> >> >> > we are getting frequently the message indicating that we can't
> >> borrow
> >> >> > connection from pool. even if
> >> >> > we use maxActif in 1000 the problem persist.
> >> >> > we need your help and give us some leads.
> >> >> >
> >> >> > stack trace :
> >> >> >
> >> >> > org.apache.ojb.broker.PBFactoryException: Borrow broker from pool
> >> >> failed,
> >> >> > using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default,
> >> >> user=db2bmce,
> >> >> > password=*
> >> >> > at java.lang.Throwable.(Throwable.java:195)
> >> >> > at java.lang.Exception.(Exception.java:41)
> >> >> > at java.lang.RuntimeException.(RuntimeException.java:43)
> >> >> > at org.apache.commons.lang.exception.NestableRuntimeException
> >> >> .(
> >> >> > NestableRuntimeException.java:86)
> >> >> > at org.apache.ojb.broker.OJBRuntimeException.(Unknown
> >> Source)
> >> >> > at org.apache.ojb.broker.PBFactoryException.(Unknown
> >> Source)
> >> >> > at
> >> >> >
> >> >>
> >>
> 
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker
> >>
> >> >>
> >> >> (Unknown
> >> >> > Source)
> >> >> > at
> >> >> >
> >> >>
> >>
> 
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
> >>
> >> >>
> >> >> (Unknown
> >> >> > Source)
> >> >> > at
> >> >> >
> >> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
> >> >> (Unknown
> >> >> > Source)
> >> >> > at
> >> >> >
> >> >>
> >>
> ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.getBroker(
> >>
> >> >>
> >> >> > OJBPersistenceService.java:156)
> >> >> > at
> >> >> >
> >> >>
> >>
> ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.newSession
> >>
> >> >>
> >> >> (
> >> >> > OJBPersistenceService.java:250)
> >> >> > at
> >> >> >
> >> >>
> >>
> 
ma.co.omnidata.framework.services.transaction.impl.TransactionManagerImpl.getTransaction
> >>
> >> >>
> >> >> > (TransactionManagerImpl.java:39)
> >> >> > at
> >> >> >
> >> >>
> >>
> ma.co.omnidata.framework.services.businessInterface.OMNIFacade.invokeService
> >>
> >> >>
> >> >> > (OMNIFacade.java:55)
> >> >> > at
> >> >> >
> >> >>
> >>
> 

TxCheck, JTA and Spring

2006-09-19 Thread Mike Perham

We are using Spring and JTA in container to manage transactional DAOs.
We have TxCheck enabled and when one of our transactional DAOs is
called in JBoss, we get a "No running tx found..." message.

Should we disable the TxCheck since we are not using PB transactions
or does TxCheck handle this case and we just have something
misconfigured?

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



Problem with Anonymous keys in 1.0.4

2006-09-03 Thread Mike Perham

I'm having trouble getting a simple anonymous key example working in
my tests.  My class descriptor is something like this:

   
   
   
   

   
   
   
   
   
   
   

My Java class looks roughly like this:

public class ChangeStatus extends BaseObject {

//private int statusId;
//private int changeSubmissionId;

   private StatusMaster status;
   private ChangeSubmission changeSubmission;

   // setters and getters...
}

The Desk and Drawer example says to add access="anonymous" to the
field descriptor and it should start to work but I consistently get
this error:

* SQLException during execution of sql-statement:
* sql statement was 'INSERT INTO gov_change_status
(status_id,change_submission_id,date_created,date_modified) VALUES
(?,?,?,?) '
* Exception message is [Column 'STATUS_ID'  cannot accept a NULL value.]
* Vendor error code [3]
* SQL state code [23502=NOT NULL VIOLATION]
* Target class is 'domain.ChangeStatus'
* PK of the target object is [id=0]
* Source object:
[EMAIL 
PROTECTED]@19e3e24[type=Submitted,subType=Dummy,labelForType=,description=Acknowle
dgement of Receipt of Change
Request,externalStatus=true,dateCreated=2006-09-01
09:44:09.592,dateModified=2006-09-01
09:44:09.592,id=15],[EMAIL 
PROTECTED],catalogVersion=100,submittedBy=mperham,submissionDate=Fri
Sep 01 09:44:09 CDT 2006,commitDate=,shortDescription=Short
desc,longDescription=Long
desc,externalGovId=,changeStatuses=[],topLevelElements=[],externalSubmissions=[],dateCreated=2006-09-01
09:44:09.592,dateModified=2006-09-01
09:44:09.592,id=1],changeApprovals=,changeDocuments=,dateCreated=2006-09-01
09:44:09.733,dateModified=2006-09-01 09:44:09.733,id=0]

If I create and set the FK ID fields explicitly (the commented out
fields in the java code above), it works fine.  What am I missing?

mike

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



Fwd: OJB dependencies

2006-08-25 Thread Mike Perham

Any comments would be appreciated, even if it's partial knowledge.
I'm an OJB newbie so everything helps.

mike

-- Forwarded message ------
From: Mike Perham <[EMAIL PROTECTED]>
Date: Aug 24, 2006 11:02 AM
Subject: OJB dependencies
To: ojb-user@db.apache.org


Hi, we are considering using OJB 1.0.4 for our product.  We have a
pretty tight OSS usage process so I need to know exactly which
dependencies are required for our usage of OJB.  The best guide I
could find was this:

http://db.apache.org/ojb/docu/guides/deployment.html#3.+External+dependencies+that+do+not+come+with+OJB

but it does not cover a lot of the deps and how they are used.

If I cut out the jars that either we can already use, are provided by
the container or are obviously not required at runtime (e.g. ant*),
I'm left with this list:

commons-beanutils-1.7.0.jar
commons-betwixt-0.8-dev.jar
commons-digester-1.7.jar
commons-pool-1.2.jar
commons-transaction-1.1.jar
jakarta-regexp-1.3.jar
jcs.jar
prevayler.jar
village-2.0.jar

Can someone give me details as to how these are used?  Are they
required or optional?  If they are optional, what functionality
requires them?

Regarding caching, we do not want to use JCS because they do not use a
proper release process.  Does OJB's caching work well in a single
server?  If we need to support clustering, is OSCache the recommended
option?

mike

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



OJB Dependency breakdown

2006-08-25 Thread Mike Perham

Here's my first pass at determining how OJB 1.0.4 uses the various
dependencies.  Basically I just moved each package out of lib and ran
compile/test to see what failed and how.  Comments welcome.  The
second line for each is my suggested scope/optional dependency setting
in the OJB Maven 2 POM, e.g:


 antlr
 antlr
 2.7.5
 compile
 true


Hope this helps others.

mike

===

antlr-2.7.5.jar
   Used to parse JDOQL
   Compile/Optional

commons-beanutils-1.7.0.jar
   Uses DynaBean and PropertyUtils
   Compile/Required, consider forking code to remove this dep?

commons-betwixt-0.8-dev.jar
   Unknown usage
   Remove? Runtime/Optional, no compilation or test failures without it

commons-digester-1.7.jar
   Used by ant DdlUtils support
   Compile/Optional

commons-pool-1.2.jar
   Used with DBCP connection pooling
   Compile/Optional, J2EE container should perform pooling at runtime

commons-transaction-1.1.jar
   Used by OJB's broker.locking package
   Compile/Required

jakarta-regexp-1.3.jar
   Used by reversedb mapping tool
   Compile/Optional

jcs.jar
   One of a number of caching impls
   Compile/Optional

prevayler.jar
   Object database, unknown usage
   Runtime/Optional?

village-2.0.jar
   Used with Torque to generate DDL, no compile/test failures without it
   Runtime/Optional?

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



OJB dependencies

2006-08-24 Thread Mike Perham

Hi, we are considering using OJB 1.0.4 for our product.  We have a
pretty tight OSS usage process so I need to know exactly which
dependencies are required for our usage of OJB.  The best guide I
could find was this:

http://db.apache.org/ojb/docu/guides/deployment.html#3.+External+dependencies+that+do+not+come+with+OJB

but it does not cover a lot of the deps and how they are used.

If I cut out the jars that either we can already use, are provided by
the container or are obviously not required at runtime (e.g. ant*),
I'm left with this list:

commons-beanutils-1.7.0.jar
commons-betwixt-0.8-dev.jar
commons-digester-1.7.jar
commons-pool-1.2.jar
commons-transaction-1.1.jar
jakarta-regexp-1.3.jar
jcs.jar
prevayler.jar
village-2.0.jar

Can someone give me details as to how these are used?  Are they
required or optional?  If they are optional, what functionality
requires them?

Regarding caching, we do not want to use JCS because they do not use a
proper release process.  Does OJB's caching work well in a single
server?  If we need to support clustering, is OSCache the recommended
option?

mike

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



Re: problem with between criteria

2006-08-18 Thread Mike Perham





Carlos, that's odd.  I just noticed that the Criteria APIs seem to have a
pattern where they allow either raw columns or the field name and the field
name was not working for me.  Unfortunately I just moved this code over to
use a raw SQL query so I can't get you any error messages.  Thanks for the
response anyhow.

mike

Carlos Chávez <[EMAIL PROTECTED]> wrote on 08/18/2006 12:13:25 PM:

> Mike Perham escribió:
> >
> >
> > I'm using
> >
> > crit.addBetween("invoke_date", new
Timestamp(startDate.getTime()),
> > new Timestamp(endDate.getTime()));
> >
> > The problem is that that between does not have a Field API like
> > addFieldBetween so I need to use the raw column name.  Is there any
reason
> > why this API is missing?
> >
> > mike
> >
> Hi mike.
> I'm using addBetween without problems, I'm using the attribute in the
> java class not the column name.
> maybe you can post a more complete example about what are you trying to
do.
>
> do you have any message of error ?
>
> Cheers.
> Carlos Chávez.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

problem with between criteria

2006-08-18 Thread Mike Perham




I'm using

crit.addBetween("invoke_date", new Timestamp(startDate.getTime()),
new Timestamp(endDate.getTime()));

The problem is that that between does not have a Field API like
addFieldBetween so I need to use the raw column name.  Is there any reason
why this API is missing?

mike