Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Cache coordination issue - Eclipselink merge command creating uninitialized object on remote servers

Hello!

 

I have an application deployed in WebLogic cluster having EL cache coordination using RMI. Below is the configuration in the persistence.xml

 

              <property name="eclipselink.cache.coordination.protocol" value="rmi" />

              <property name="eclipselink.cache.coordination.rmi.announcement-delay" value="10000" />           

              <property name="eclipselink.cache.coordination.propagate-asynchronously" value="false" />   

              <property name="eclipselink.cache.coordination.remove-connection-on-error" value="true" />                             

 

 

In the application’s model, I’ve 2 entities - Parent and Child with following relationships

 

Parent:

       @OneToMany(mappedBy = "parent", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)

       private List<Child> childs;

 

Child:

    @ManyToOne(fetch = FetchType.EAGER)

    @JoinColumn(name = "PARENT_ID", nullable = false)

    private Parent parent;

 

When the application creates a new child entity object on one server and calls .persist() call and when the txn is committed, I see following logs on that server (ServerA) showing the EL is  initiating merge command:

 

ServerA log:

[EL Finest]: 2015-09-04 09:07:49.014--ServerSession(30638017)--Thread(Thread[[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Propagating command org.eclipse.persistence.sessions.coordination.MergeChangeSetCommand to Service[EclipseLinkCommandChannel, 7ef181a1-2464-41f7-96d2-0af5ddc33b7b, null]

 

On the other server (ServerB), I also see that the it has received the merge command:

 

ServerB

[EL Finer]: propagation: 2015-09-04 09:07:49.029--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Received updates from Remote Server

[EL Finest]: propagation: 2015-09-04 09:07:49.029--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Merging Parent: 1,761 from remote server

[EL Finest]: propagation: 2015-09-04 09:07:49.029--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Merging Child: 3,583 from remote server

 

 

However, in the logs on ServerB, created by Cache.print() that I have added in application, I see that the child object newly created on ServerB, just after above log statements is uninitialized:

 

Before merge() command:
[EL Severe]: cache: 2015-09-04 09:07:48.951--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--

SoftCacheWeakIdentityMap for: Parent

Key: 1,761    Identity Hash Code: 12876513      Object: Parent{id=1761, childs=[Child{id=3582, parentId=1761}, Child{id=3581, parentId=1761}]}

1 elements

[EL Severe]: cache: 2015-09-04 09:07:48.951--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--

SoftCacheWeakIdentityMap for: Child

Key: 3,581    Identity Hash Code: 20133130      Object: Child{id=3581,  parentId=1761}

Key: 3,582    Identity Hash Code: 15014518      Object: Child{id=3582,  parentId=1761}

 

 

After merge() command:

[EL Severe]: cache: 2015-09-04 09:07:49.964--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--

SoftCacheWeakIdentityMap for: Parent

Key: 1,761    Identity Hash Code: 12876513      Object: Parent{id=1761, childs=[Child{id=3582, parentId=1761}, Child{id=3581, parentId=1761}, Child{id=0, parentId=null}]}

1 elements

[EL Severe]: cache: 2015-09-04 09:07:49.967--ServerSession(29936277)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--

SoftCacheWeakIdentityMap for: Child

Key: 3,581    Identity Hash Code: 20133130      Object: Child{id=3581, parentId=1761}

Key: 3,582    Identity Hash Code: 15014518      Object: Child{id=3582, parentId=1761}

Key: 3,583    Identity Hash Code: 13833764      Object: Child{id=0, parentId=null}

3 elements

 

 

These objects won’t get initialized correctly, until I call refresh().

 

Am I missing anything?

 

Any help/clues are greatly appreciated!

 

Regards,

Anvay

 

 

 

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.

Back to the top