Laurie Tynor wrote:
> 
> We are using Jonas-2-1-1 on a redhat 6.2 linux system.  We are using
> bean-managed persistence and are having problems with Jonas not
> synching with the database when the bean is modified.
> 
> The ejbStore method is not called when we modify the entity bean.  We
> have tried trans-attributes of RequiresNew, Requires, Supported, and
> NotSupported.  We have tried demarcating the transaction in the client
> with UserTransaction begin/commit methods surrounding the entity bean
> update.  And, we have tried the is-modified-method-name tag.  In all
> of these attempts the ejbStore method was not called at all.  The only
> way we have been able to get Jonas to synch with the database (call
> ejbStore) is to use the JonasAdmin sync command, or to shutdown Jonas.
> 
> I'm sure we are doing something wrong in the setup.  We've checked
> through the docs and mail-list archives, though, and are running out
> of ideas about what to try.  We'd really appreciate any suggestions
> about what we should try next...
> 
> I'll append our ejb-xml.jar and jonas-ejb-xml.jar files at the end,
> along with a couple of code snippets.
> 
> Thanks very much for any information,
> 
> Laurie Tynor
> [EMAIL PROTECTED]
> 


Hi laurie,
Excuse me for this late response.
In your example the ejbStore method is never called because
all the methods of your beans have the NotSupported transactional
attribute.
When you set this attribute the ejbStore is only called :
- when the EJBServer shutdown,
- when you call JonasAdmin -sync,
- when you call JonasAdmin -r for removing the JOnAS container in which
your beans are living,
- periodicaly if you have set a passivation timeout in the jonas
specific deployment
  descriptor with a non mandatory tag
   <passivation-timeout>. Example: 

    <jonas-entity>
      <ejb-name>Item</ejb-name>
      <passivation-timeout>5</passivation-timeout>
      .....
    </jonas-entity>
    You can have a look in the "passivation timeout for entity beans" §
in the 
    JOnAS Bean Programmer's Guide
    http://www.objectweb.org/jonas/jonas_root/doc/Program.html

The question is why the business methods have NotSupported transactional
attribute
instead of Required. The response is in your mail you have sent
 ( validity of ejb-jar.xml fragment Thu, 4 Jan 2001).

When you write your ejb-jar.xml like this:
<assembly-descriptor>
<container-transaction>
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-intf>Home</method-intf>
  <method-name>*</method-name>
</method>
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-intf>Remote</method-intf>
  <method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>

the part :
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-intf>Remote</method-intf>
  <method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>

is most specific than :
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>

and then overloads it, so a ejb-jar.xml like this is equivalent to :
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>


May be, your intention was to write the ejb-jar.xml like this:

<assembly-descriptor>
<container-transaction>
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
  <ejb-name>enClientBean</ejb-name>
  <method-intf>Remote</method-intf>
  <method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>


Best regards,

-- 
        Philippe

Philippe Coq  Evidian   Phone: (33) 04 76 29 78 49
Bull S.A  - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
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