tricky EJB access intent proved uncool

A continuation of DB2 deadlock hunting revealed that the EJB container (WAS 5) generated a "UPDATE" for remote getter method (with no READ access intent) on the CMP entity bean.

Someone added an interface (with only 1 method) to the bean’s remote but forgot to mark the method as "READ".

According to someone familiar with EJB container in WAS, the container will issue an "UPDATE" to DB2. This is the root cause of our extra UPDATE and actually caused deadlocks for us. It ‘s good to know and make me more frustrated and wonder why it has been designed this way. It doesn’t seem be coming from EJB spec. sigh.. i guess welcome to the real and dark side of EJB which doesn’t seem to be cool at all.

The complexity of EJB esp. CMP implementation can easily go beyond what average developer’s brain can handle. I don’t feel I’d love to program this way but being forced to.

Advertisements
This entry was posted in websphere. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s