At 23:08 01.07.2003 -0400, you wrote:
> works synchronized methods in an clustered environment?
>

No, synchronized methods don't lock the entire cluster.

what will be the best solution in an cluster environment to reimplement this?


> 2. out clients are communicating thru stateless session bean facade. in
> some important our facades check the ACL's bevor calls other
> session beans
> which implements this special business logic. this ACL's is our own
> implementation. we can have some groups ans some users. each user belongs
> (defined by valid_from and expired date) to some groups. each group has
> some ACL's. this informations will be cached in an singelton while first
> login to the system.
>
> how should caching be implemented in an clustered environment?
>

What do you use for your persistences? Straight JDBC? BMP? CMP?

Our beans are CMP based. but for checking the ACL's we do thru straight JDBC, while our query look so:


protected void checkAclPermission(Long user_id, String acl, String permission) {
..
String query = "select distinct u.users_id " +
"from users_2_groups u2g, groups g, users u, permission p, acl a, acl_entry ae, groups_2_acl_entry g2ae " +
"where u.users_id = ? and " +
"a.name = ? and " +
"p.name = ? and " +
"u2g.users_id = u.users_id and " +
sysdate + " >= u2g.valid_from and (u2g.expired is null or " + sysdate + " <= u2g.expired) and " +
"ae.acl_id = a.acl_id and " +
"ae.permission_id = p.permission_id and " +
"g2ae.acl_entry_id = ae.acl_entry_id and " +
"u2g.groups_id = g.groups_id and " +
"g2ae.groups_id = g.groups_id";


for that reason we don't use CMR. values in users_2_group and groups

If you're using entity beans you need to define a strategy for each bean.

1. If the bean is read-only, Commit-Option 'A' (caching).

we are using already this commit option.


2. If the bean can be updated but is not concurrently accessed, then you can
use cache-invalidation.
3. Otherwise you have to use Instance Per Transaction + some form of row
locking (in CMP <row-locking) on ejbLoad.


Rafal



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to