First, many thanks to the JOnAS and related teams for the open source
development.  It has been invaluable to step through the code in getting the
EJB server up.  I have two questions for the group.

First, jonas SELECTs and the UPDATEs all EJB objects when they are used.  My
impression has been that EJB is supposed to provide high scalability.  Are some
caches being used?  We have some EJB objects that are accessed a lot and would
be better kept in memory all the time, with periodic DB updates.  

Further explanation: The JBeanEntity.preInvoke seems to always call
createContext() to create a new transaction and thus reload a copy of the file.
 TX_BEAN_MANAGED also doesn't work because it goes through the same code as
TX_NOT_SUPPORTED.  The process always goes to:
  JEntityBean.preInvoke
  JEntityBean.getContext(usually null here)
  JEntityBean.createContext // object reloads from DB here
I need to stop getContext from calling createContext().

Second, we often send references to the EJBObject
(entityContext.getEJBObject()) from within business calls.  jonas starts an
inner transaction when the reference is sent, causing the object to be reloaded
from DB and all value changes to be reset to the DB copy.  For example, if I
have A as my EJB Entity Bean, I call:
  A.methodOne() {  // object is reloaded by jonas just before this method
    A.value1 = "Hello World"
    A.value2 = "Value 2"
    B.doSomething(entityContext.getEJBObject()) // sends a ref to A's EJB
      // as soon as B uses the A ref, the object is once again reloaded
      // from disk and the value1 and value2 changes are erased.
  }

Any help provided will be very appreicated.

-- 
Conan C. Albrecht
Director of Software Development
Center for the Management of Information
University of Arizona
McClelland Hall Room 114
Tucson, AZ  85721
http://www.cmi.arizona.edu/users/calbrecht/
[EMAIL PROTECTED]
(520) 621-2640 (voice)
(520) 991-0644 (cell)
(520) 621-2641 (fax)
----
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