Erez,

first of all, Sybase 7 is not able to let you read or write into or from a database 
without a transaction. So your TX has to be at least Required.

Second, we also use Sybase 7 and are using TX=Required. What you describe is something 
that JOnAS crew is working on.

At the moment (2.3) JOnAS does not know if it is the only application that accesses 
the database. Before every transaction, JOnAS re-reads the entity to ensure to work on 
the latest copy (maybe another application in parallel to jonas changed the data). In 
future (2.4) JOnAS will provide a switch where you can tell JOnAS that it is the 
onlyone accessing that data, so it will cache that data internally and does not 
re-read the entity at every transaction start. But this is not quite ready at the 
moment.

-------- Original Message --------
Subject: RE: Performance tuning and transaction management (04-Okt-2001 14:41)
From:    [EMAIL PROTECTED]
To:      [EMAIL PROTECTED]

> Thanks Markus,
> 
> We use dbms (sybase 7) sorry I forgot this one.
> Transaction management is by the container.
> 
> The point is that supports will not help since I do not want to load a new
> bean's instance if it is already cached. If transaction is involved the
> container will passivate and store the instance any way.
> 
> What I wish to achieve is: when every a client (jsp/servle) calls the
> session bean (that enables just get methods) it will be without transaction
> so the entity bean will not be passivated and stored at the end of the
> method call.
> 
> Erez
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thu, October 04, 2001 1:37 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Performance tuning and transaction management
> 
> 
> Hi Erez,
> 
> > We are facing some difficulties with Jonas's behavior regard to ejbLoad.
> > Our configuration: Jonas 2.3, Tomcat 3.2.1, jdk 1.3.1, Win 2k.
> >
> > Our server side is based mostly on session facade (e.g. Stateless Session
> > Beans wraps Entity Beans)and Value Objects (Each EB holds a ref to a java
> > object contains all the data).
> > We use BMP.
> >
> > Our thumb rule regard to transaction management is: declare each getXXX
> > method (or any method that performs just select statement) as NotSupported
> > and each setXXX, create remove etc. (any method that insert, update or
> > delete data) as Required.
> > We set passivation-timeout for 360 and session-timeout for 360 as well.
> > Our reentrant flag is False.
> >
> > When I call the session bean from the servlet/jsp for the first time, I
> see
> > the container loads the needed entity beans, this is what I expect it to
> do.
> >
> >
> > However when I recall the session bean (by refreshing the browser or by
> > open
> > a new browse) it loads again the entity beans although there should be no
> > transactions and no second ejbLoad.
> >
> > Am I missing something here?
> >
> > Any help/comments will be highly appreciated.
> 
> If you set TX=NotSupported this means that just before your getXXX a 
> pending
> transaction is commited, then your method is called. I suppose that your
> ejbLoad works against a dbms, so it needs (!) a TX. In this case, what now
> happens is, that a new TX is started (since you said that you don't support
> them, so they are dropped). This takes much time. Try to set TX=Supported.
> This is the most defensive setting. It means "If there is a TX, just use
> ist. If there is none, forget about it". Maybe this will speed up your
> application.
> 
> Markus
> 
> 
> To: [EMAIL PROTECTED]


To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to