Stephan Bauer wrote:
> 
> Hi,
> 
> another short question:
> 
> I have deployed my CMP-Entity-EJBs successfully.
> In my TestClient, I have the following code:
> 
>    AddressHome home = (AddressHome) initialContext.lookup(beanName);
>    Address addr = home.create(new Integer(3));
>    addr.setCity("Straubing");
>    addr.setCountry("Deutschland");
>    ...
>    ...
> 
> But in my Database, the newly inserted row consists only
> of the id, which I provided with the create-Method, all
> the other fields are NULL.
> Is there anything else I have to do to make the
> CMP-Entity-Bean synchronize with the Database ?
> I thought, that in CMP, I don't have to do something
> in ejbStore(), because the synchronization is done by
> the container...?
> 
> [PS: the <trans-attribute> is set to "NotSupported" in
> the deployment desc., because I'm using MySQL ! ]
> 
> Thanks,
> 
> Stephan
You are not using transactions. In this case, entity beans
will be written in the database only when one of these event
occur:
- you stop the server. (JonasAdmin -s)
- you unload your container (JonasAdmin -r ...)
- a transaction is started on your bean instance (not your case)
- you run manually JonasAdmin -sync
- you have defined a non null passivation timeout in your bean deployment
  descriptor:

    <jonas-entity>
      <ejb-name>Item</ejb-name>
      <passivation-timeout>5</passivation-timeout>
      .....
    </jonas-entity>
    
In all other cases, the bean state is kept in memory for efficiency.

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

Reply via email to