[Design of Messaging on JBoss (Messaging/JBoss)] - Re: http://jira.jboss.org/jira/browse/JBMESSAGING-808 - Fail
by clebert.suconic@jboss.com
I'm about to commit the fix for http://jira.jboss.org/jira/browse/JBMESSAGING-809
But I realized something..
If I disable the retry detection (I mean... the query to verify the duplication). I get a PrimaryKey duplication exception... but the JDBCPersistentManager can always perform the update after a retry:
I don't have any other thread receiving messages (the receive would happen afterwards the send is completed). I don't know what would delete the reference allowing the retry to work.
11:23:01,267 WARN @WorkerThread#1[127.0.0.1:45094] [JDBCPersistenceManager] SQLException caught - assuming deadlock detected, try:1
| java.sql.BatchUpdateException: Duplicate entry '10-4353' for key 1
| at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:648)
| at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:517)
| at org.jboss.messaging.core.plugin.JDBCPersistenceManager.updateWithRetry(JDBCPersistenceManager.java:3454)
| at org.jboss.messaging.core.plugin.JDBCPersistenceManager.updateWithRetryBatch(JDBCPersistenceManager.java:3337)
| at org.jboss.messaging.core.plugin.JDBCPersistenceManager.handleBeforeCommit1PC(JDBCPersistenceManager.java:2021)
| at org.jboss.messaging.core.plugin.JDBCPersistenceManager$TransactionCallback.beforeCommit(JDBCPersistenceManager.java:3709)
| at org.jboss.messaging.core.tx.Transaction.commit(Transaction.java:201)
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:436)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:99)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)
| at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:81)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:125)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:715)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:553)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:378)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:158)
| 11:23:01,268 WARN @WorkerThread#1[127.0.0.1:45094] [JDBCPersistenceManager] Trying again after a pause
| 11:23:01,765 WARN @WorkerThread#1[127.0.0.1:45094] [JDBCPersistenceManager] Update worked after retry
| 11:23:01,766 TRACE @WorkerThread#1[127.0.0.1:45094] [JDBCPersistenceManager] Batch update INSERT INTO JMS_MESSAGE_REFERENCE (CHANNELID, MESSAGEID, TRANSACTIONID, STATE, ORD, PAGE_ORD, DELIVERYCOUNT, RELIABLE, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), inserted
| total of 0 rows
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012074#4012074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012074
19 years, 2 months
[Design of JBoss jBPM] - Re: commands & EJB 3
by tom.baeyens@jboss.com
just checked JACC. this is my current line of thinking:
a AuthorizationService should be configurable. this service knows how to check permissions. there is already such service in the core sources. not currently used though :-)
now when a command is presented to the command execution service, it should check the jbpmContext for the presence of a AuthorizationService. If such a service is present, the command execution service creates a CommandPermission and passes the command-to-be-executed in the constructor of the CommandPermission. Then, the authorization service is asked to check this permission.
Now, the authorization service can still decide to map the command to specific permissions. e.g. One impl of the authorization service could map the commands to a set of roles and use jacc EJBRoleRefPermission's or WebRoleRefPermission's before it delegates the authorization check to AccessControlContext or SecurityManager.
makes sense ?
this approach also allows for the default set up to be without any authorization service and hence without any authorization. easy to get going. but it also allows for flexible authorization based on the current java standards if desired.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012027#4012027
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012027
19 years, 2 months