Issue Details (XML | Word | Printable)

Key: ADFEMG-110
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: chriscmuir
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
adfemg

ADF Code Guidelines - ApplicationScope vs clusters

Created: 25/Feb/13 02:15 AM   Updated: 02/Jan/14 01:35 AM   Resolved: 02/Jan/14 01:35 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Tags:
Participants: chriscmuir


 Description  « Hide

Discovered interesting fact via Jobinesh Purushothaman that JSF Application Scope beans are backed by a Servlet Context which can only have one instance per cluster node and there is no synchronization across nodes (at least from WLS, we're not sure if any other Java EE vendor has a custom solution to this).

The implication is for Application Scoped managed beans, that for a single design time configured bean, there will be at runtime as many instances of the Application Scoped bean as you have nodes in the cluster. Each instance of your application running on each node therefore when accessing the Application Scoped bean is indeed getting separate values.

This makes using the Application Scoped bean dubious for carrying application "wide" values to be shared across all nodes. Rather the bean is probably best for carrying constants or values to reflect the state of a single node (such as number of users on a single node).

As a result this guideline is flagged to be added to the ADF Code Guideline available here: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfarchitect-1639592.html



chriscmuir added a comment - 27/Mar/13 07:09 AM

Doc team has addressed this issue in the upcoming 12.1.2 document set. Closing issue.


chriscmuir added a comment - 27/Mar/13 07:10 AM

Oops, closed wrong issue, reopening. Closing 111 instead.


chriscmuir added a comment - 29/Dec/13 08:23 AM

Note to self, added rule to v2.00 draft.


chriscmuir added a comment - 02/Jan/14 01:35 AM