Philippe Durieux wrote:

> "Halas, Miroslav" wrote:
> >
> > Weblogic has a configuration parameter on a datasource (or a bean, I don't
> > remember it correctly) to mark it as 'shared'. Shared means that there is
> > other application which is modifying database and therefore beans has to be
> > reread at the beginning of transaction. If the bean/datasource is not marked
> > as shared than the cached copy is used.
> >
> > Can something like this be implemented in Jonas? What would be the best
> > place to put it in?
> >
> > Miro Halas
> >
>         Hi Miro,
>
> I think that your proposal is not correct. When you work with transactions,
> you MUST insure that the bean state is written at the end of each transaction,
> regardless if someone else is using it or not.

Hi Philippe,

I think what he and I are saying is that you have to write it (regardless of
somebody else), but do you have to read it back in all times? If nobody else is
modifying it except via the app server, the cached copy is as good as the one in
the database. If what you do is:

while (true)
   wakeup upon notification
   start tx
      read 1000 beans
      update one of them
   end tx

there are a lot of extra (1000 actually) reads going on for each cycle except the
first one and not much to gain if reads are really db-reads. What do you think?

thanks,
ilker

>
> What is possible with jonas is only to share entity beans if you don't use
> transactions. In that case, the bean state is kept only in memory until a
> special event occur (end of server, timeout, start of transaction, ...).
> This is effective only for beans declared as "Reentrant".
>
>         Philippe
>
> > -----Original Message-----
> > From: Ilker Sozat [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, July 29, 2001 12:46 PM
> > To: [EMAIL PROTECTED]
> > Subject: how to tune jonas for performance problems
> >
> > Hi,
> >
> > I am having some performance problems (and a memory leak problem), and I am
> > not sure whether I have tuned jonas for optimized performance (before having
> > to change my design in less maintainable ways). My two basic questions
> > related to performance are:
> >
> > 1) Is there a way in Jonas to prevent entity beans in the cache to be reread
> > at the beginning of a transaction? I have a session bean which reads a
> > subset of the entity beans at each method call (more or less the same
> > subset). If those beans are already in the cache, and if only this
> > application is modifying the database, it is really unnecessary to do an
> > additional read for each and every bean in that subset (for a
> > findByPrimaryKey() method). Having a cache large enough for this subset and
> > using jeremie for intracalls would be the best optimization I can hope to
> > get from jonas.
> >
> > 2) I am keeping track of any changes in my entity bean and make ejbStore an
> > empty method if there isn't any. Also, I am only updating the modified data
> > since the ejb is representing info from 5 different tables. Does using the
> > isModified() attribute still bring an advantage over this?
> >
> > My memory leak problem is that 15 simultaneous users continuously calling an
> > addBean() method (which basically does as the name implies) brings down the
> > server in 2 days. The final error I'm getting is something like "panic could
> > not create LWP". I have increased the max memory size, and the file
> > descriptor limit from 64 to 1024. Increasing file descriptor limit moved the
> > time to crash the system from a couple of hours to 2 days, but I feel it is
> > still a problem. I do not cache, or keep any references between calls. Is
> > this a known issue (btw, I am using RMI on Solaris 2.6, and planning to
> > change to jeremie, and I am really hoping that it is related to the way rmi
> > manages the connections) ?
> >
> > thanks,
> > ilker
> >
> > ----
> > 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".
> > ----
> > 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".
>
> --
> Philippe Durieux  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Bull - 1 rue de Provence - 38432 Echirolles Cedex France
> [EMAIL PROTECTED]
> -> Download our EJBServer at http://www.evidian.com/ejb <-
> ----
> 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".

----
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