Application scope should be fine for the above examples if you do the initial
work in @Create and then just access it. Of course provided the data is the
same for all users.
Be aware of threading issues in application scope tho as multiple threads may
access it at the same time. If you do all your loading in @Create it should be
fine.
| @Name( "cache" )
| @Scope( ScopeType.APPLICATION )
| @Intercept( InterceptionType.NEVER )
| public class Cache
| {
| private Map cache;
|
| @Create
| public void create()
| {
| // build cache here...
| }
|
| public Map getCache()
| {
| return cache;
| }
| }
|
HTH.
Mike.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032085#4032085
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032085
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user