Hi,

(this is slightly off-topic but)
I want to use the latest bug fix releases of JBoss in my production
environment, so I have to tackle the removed MethodOnlyEJBLock
situation.

Could please someone who knows (Bill?) comment on the new NoLock and
SimpleReadWriteEJBLock classes?
What is the idea behind these changes? (Ok, I could speculate - nomen
est omen - ...)
Does the SimpleReadWriteEJBLock already work and how is it used
correctly?

Any hints would be much appreciated.

BTW, JBoss does not support optimistic locking yet, and does not have a
distributed object cache.
If you cannot use the QueuedPessimisticEJBLock (which is usually the
case when you need concurrent access to CMP EBs), and you need to
synchronize your EBs, you can use the "row-locking" setting in the
jbosscmp-jdbc.xml config file (in defaults or per EB) and let the
database handle the synchronization.

The SimpleReadWriteEJBLock may provide an alternative, but there seems
to be no documentation yet (the last time I search the forums for it, it
didn't turn up a single hit).

Regards
Georg



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Sacha
Labourey
Sent: Monday, October 07, 2002 13:24
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] How to avoid entity beans read lock ?


Could you please try the read-only tag at the method level, as described
by Bill. It does work. If it doesn't, it is a bug and it would be good
to know about it.

Cheers,


                        Sacha

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Horia 
> Muntean Envoyé : lundi, 7 octobre 2002 13:18
> À : [EMAIL PROTECTED]
> Objet : Re: [JBoss-user] How to avoid entity beans read lock ?
>
>
> Thanks, but there could be some problems , problems that are coming 
> from the fact the my EBs are not RO entirely. They have update methods

> also. So, here are my questions again:
>
> 1. I can't apply "read-only" to the entire bean 'cause I have other 
> methods that perfom updates on the bean.
>
> 2. I took a look at jboss.dtd, jboss_3_0.dtd and jboss_2_4.dtd but all

> I could understand from here is that a "read-only" attribute can be 
> applied only for the entire bean. I saw in this mail list an example 
> provided by  Bill Burke at 
> http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg18
> 814.html,
> but since in the jboss.dtd there are no entries related to 
> <method_attributes> tags. Anyway, someone before be tried this 
> solution and it seems it doesn't work: 
> http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg19786.
> html
>
> 3. I saw "Instance Per Transaction CMP 2.x EntityBean" configuration 
> in jboss-3.0.3 using 
> <locking-policy>org.jboss.ejb.plugins.lock.NoLock</locking-policy>
> What does that mean?
> Is this the path to Optimistic locking implementation?
> Does jboss keep DB consistency with this configuration (even if it 
> could rollback TXs that are trying to commit modified data)?
>
> 4. I tryed to apply "NotSupported" TX attibute on all get* methods of 
> my EB. But this doesn't seem to work either. My EB are locked during
get*
> operations and in some circumstances   I get  DeadLock exceptions too.
I
> solved the problem with facade beans that use only EBs get* methods, 
> by declaring "NotSupported" TX for the facade method. In this way, 
> every time an  EB get* method is called by the facade a new TX starts 
> and that is OK. But if in the facade method I want to use update 
> methods of the EBs, I can't affort to set the TX to "NotSupported" 
> cause I will loose the control  of the DB consistency.
>
> Sory for talking to much. I just try to understand if I can get what I

> want from jboss or is the case to move on to other J2EE containers?
>
> Thanks.
>
>
> Georg Schmid wrote:
>
> >Hi,
> >
> >Take a look at the "Instance Per Transaction CMP2.x" configuration 
> >settings in standarjboss.xml.  o You can make your EBs use that 
> >configuration by setting the <configuration-name> element in your 
> >jboss.xml.  o You can mark your EB readonly.
> > o You can mark certain methods of the EB read-only.
> >
> >Look through the jboss.xml DTD.
> >
> >Moreover, in JBoss3.0.3 there is a NoLock locking policy 
> >(MethodOnlyEJBLock has been deprecated/removed in that release), as 
> >well as a SimpleReadWriteEJBLock class, but I could not find any 
> >documentation that (except the source code, of course).
> >
> >Maybe this gives you a start.
> >
> >Regards
> >Georg
> >
> >
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED] 
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to