I've created an ejbSelect statement that uses the following ejbQL:
      <query-method>
            <method-name>ejbSelectMaxDBID</method-name>
            <method-params/>
          </query-method>
          <result-type-mapping>Local</result-type-mapping>
          <ejb-ql>select max( o.orderdbid ) from OrderTable o</ejb-ql>

I've set this bean with <row-locking> true because I would like the bean to lock the 
rows whenever its loaded. However I get the error below.... How do I turn off Row 
locking for this ejb-select method only? Is this possible with declared-sql or 
jboss-ql?

Isnt this a jboss bug? I dont think for update should be used in methods where any 
function is present...

18:11:59,131 DEBUG [OrderTable#ejbSelectMaxOrderId] Find failed
java.sql.SQLException: ORA-01786: FOR UPDATE of this query expression is not all
owed

        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
        at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:12
55)
        at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.jav
a:2391)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:2672)
        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:589)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:527)
        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery
(WrappedPreparedStatement.java:314)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCA
bstractQueryCommand.java:198)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCA
bstractQueryCommand.java:117)
        at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBC
SelectorBridge.java:96)
        at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.invoke(JDBCS
electorBridge.java:69)
        at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke
(EntityBridgeInvocationHandler.java:91)
        at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:62)
        at com.tullib.otcee.ejb.orders.OrderTableBean$Proxy.ejbSelectMaxOrderId(
)
        at com.tullib.otcee.ejb.orders.OrderTableBean.ejbHomeLoadMaxDBID(OrderTa
bleBean.java:71)


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852335#3852335

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852335


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to