> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Vinay
> Menon
> Sent: Saturday, August 04, 2001 11:31 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-dev] Select for update : Question for Bill
>
>
> Hello Bill,
>     Apologies for not following this up earlier than this but I
> was going to
> take a look at the no wait option for select for update
> operations. First of
> all is the select for update dynamic? i.e. can I start off in regular mode
> and then come back and load the same bean in a select for update mode?

No it is not dynamic.  I don't think it should be.  If it was you would have
to expose jboss internals to the application logic and that is not portable
across J2EE apps.

>     What I am looking for is simply the option to specify the wait option.
> May be a <wait-option> flag in jaws.xml to specify this on a per
> dbms type -
> in oracle its no wait - not sure what it is called in others. What do you
> think?
>

What do you think of these ideas?  What I wanted to do was extend the
database typemappings in standardjaws.xml.

    <type-mappings>
        <type-mapping-definition>
            <name>Oracle8</name>
                <select-for-update-supported>true</select-for-update-supported>
                <select-for-update-format>![CDATA[SELECT %i FROM %t WHERE %w FOR
UPDATE]]</select-for-update-format>
<select-for-update-no-wait-supported>true</select-for-update-supported>
                <select-for-update-no-wait-format>![CDATA[SELECT %i FROM %t WHERE %w 
FOR
UPDATE NOWAIT ]]</select-for-update-format>                     <mapping>
                <java-type>java.lang.Boolean</java-type>
                <jdbc-type>BIT</jdbc-type>
                <sql-type>SMALLINT</sql-type>
            </mapping>

where "%i" is the items to be select, "%t" is the tablename, and "%w" is the
where clause.  If a bean turns on select-for-update and it is not supported
by the type-mapping, then an exception should be thrown on deployment.
Maybe your rowid thingy should be put in there as well in the same manner.

And then in jaws.xml

<select-for-update wait="true">true</select-for-update>

Bill



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to