Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Stateful mode best practices struts/bc4j

445150Oct 19 2005 — edited Oct 20 2005
When using Application modules in stateful mode in struts, is it still best practice to set the releasemode to stateless at the end of a unit of work so that the app module is released back into the pool?

I have experienced some weirdness in general with things like 'collisions' where it appears one user has 'stolen' another user's vo and I'm wondering if not ever changing the releasemode to stateless in a large app could account for this.

Here's how we use BC4J.

We always define the releasemode in the struts-config like this:

<action path="/bedtype" type="xxxxx">
<set-property property="viewobject" value="xxxView"/>
<set-property property="application" value="appModule"/>
<set-property property="releasemode" value="Stateful"/>
<set-property property="roles" value="Administrator"/>
<forward name="success" path="/WEB-INF/jsp/xxxx.jsp"/>
</action>

Then in the view object we'll get a handle on the vo either by calling context.getViewObject() where context is the BC4JContext or context.getApplicaitonModule().findViewObject("voname");


This works fine 90% of the time, however now and again the vo's tend to go a bit bonkers, where a vo will lose it's row set or other strange things.

So, is this the right way to work with BC4J? Should I be doing any special cleanup?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2005
Added on Oct 19 2005
4 comments
469 views