> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Rafal > Kedziorski > Sent: Tuesday, July 01, 2003 5:40 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-user] design questions > > > hi, > > we are developing application for mutimedia content management. a java > client communicates with an JBoss 3.2.2 instance. in about one week we go > in production mode. in first phase we habe only one JBoss > instance, but we > should be able to run our application in an JBoss cluster. and for this > reason I have two questions. > > 1. in or applications we have some modules. i.e. project module. > users can > create new projects. this project can be changes. a project which > should be > edited by a user should be locked. for this operation we have this method > in our project session bean: > > public synchronized boolean lockProject(Long user_id, Long project_id) > throws ProjectException { > // ... > } > > in this method we are checking in the database if a lock for the given > project_id exists or not. if there isn't any lock, the we set one in the > database for the given user. > > works synchronized methods in an clustered environment? >
No, synchronized methods don't lock the entire cluster. > 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? 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). 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. Bill > > Best Regards, > 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 ------------------------------------------------------- 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