[jboss-jira] [JBoss JIRA] Commented: (JBAS-8110) backwards-incompatible Profile Service management API change in {MCBean:JTA} managed components exposed by AS 6.0 M3 as compared to those exposed by AS 5.1
Jonathan Halliday (JIRA)
jira-events at lists.jboss.org
Fri Jul 2 17:16:46 EDT 2010
[ https://jira.jboss.org/browse/JBAS-8110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12537819#action_12537819 ]
Jonathan Halliday commented on JBAS-8110:
-----------------------------------------
> Can this management interface please be updated so that it is backwards-compatible with what is in AS 5.1?
Stop trying to stand in the way of progress. Put an adaptor layer round it if you have to. The AS currently exposes the com.arjuna stuff directly because that's the easiest thing to do, but transaction-jboss-beans.xml could have additional beans to wrap the com.arjuna stuff and expose whatever api you like.
> It is not practical for RHQ to have to update its AS5 plugin for each new AS release, because management APIs keep changing.
Which is why JBossTS decided to have our own rhq plugin for transactions - it's the only feasible way to keep the plugin directly synched with the underlying tx code.
The only alternative is the heavier weight one outlined above - put an abstraction layer into the intermediate (JBossAS) repository. The jboss-transactions-spi already does that for java level stuff, but there is no equivalent for the beans level wiring at present, which means you are basically tight coupling against component implementation details, which is bad. This is not just a transactions issue - the wider problem is under TAG discussion.
> Specifically, can "TransactionStatistics" be renamed to "TransactionManager"
No, they are logically separate things. I separated them because the tx manager can be either jta or jts and that difference should not affect things that just need tx stats. Nor should having multiple tx managers as may happen in later releases. The recovery manager is likewise separate as we may wish to run that out of process or in a cluster aware configuration in the future and don't want that to impact the transaction manager or stats pieces.
> can "TransactionManager"'s type be changed to something other than {MCBean:JTA} so it has a different type than "TransactionStatistics" as it should?
yeah, that one is just a cut and paste error. feel free to change the -beans.xml.
> backwards-incompatible Profile Service management API change in {MCBean:JTA} managed components exposed by AS 6.0 M3 as compared to those exposed by AS 5.1
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-8110
> URL: https://jira.jboss.org/browse/JBAS-8110
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Management services, Transaction Manager (Arjuna)
> Affects Versions: 6.0.0.M3
> Reporter: Ian Springer
> Assignee: Brian Stansberry
> Fix For: 6.0.0.Final
>
>
> Here is what managed components of type {MCBean:JTA}: that AS 6.0 trunk (post-M3) has deployed:
> ManagedDeployment: vfs:///work/TRUNK/trunk/build/target/jboss-6.0.0-SNAPSHOT/server/all/deploy/transaction-jboss-beans.xml
> +++ ManagedComponent(name=TransactionManager, type=(ComponentType{type=MCBean, subtype=JTA}), compName=TransactionManager, attachment: com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean, state: RUNNING
> ++++++ properties: {userTransaction="CompositeValueSupport: metaType=[MutableCompositeMetaType{javax.transaction.UserTransaction items=[name=status type=int], [name=transactionTimeout type=int]}] items=[status=SimpleMetaType:int:6,transactionTimeout=null]", XATerminator="CompositeValueSupport: metaType=[MutableCompositeMetaType{org.jboss.tm.JBossXATerminator}] items=[]", state="null", transactionManager="CompositeValueSupport: metaType=[MutableCompositeMetaType{javax.transaction.TransactionManager items=[name=status type=int], [name=transaction type=javax.transaction.Transaction], [name=transactionTimeout type=int]}] items=[status=SimpleMetaType:int:6,transaction=null,transactionTimeout=null]", transactionSynchronizationRegistry="null", }
> +++ ManagedComponent(name=TransactionStatistics, type=(ComponentType{type=MCBean, subtype=JTA}), compName=TransactionStatistics, attachment: com.arjuna.ats.arjuna.coordinator.TxStatsMBean, state: RUNNING
> ++++++ properties: {numberOfHeuristics="0", numberOfResourceRollbacks="0", numberOfInflightTransactions="0", numberOfApplicationRollbacks="0", state="null", numberOfTransactions="0", numberOfTimedOutTransactions="0", numberOfNestedTransactions="0", numberOfAbortedTransactions="0", numberOfCommittedTransactions="0", }
> And here is what AS 5.1 has of type {MCBean:JTA}:
> +++ ManagedComponent(name=TransactionManager, type=(ComponentType{type=MCBean, subtype=JTA}), compName=TransactionManager, attachment: com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean
> ++++++ properties: [rollbackCount, XATerminator, transactionCount, state, propagateFullContext, transactionStatusManagerInetAddress, timedoutCount, runningTransactionCount, transactionManager, transactionSynchronizationRegistry, transactionStatusManagerPort, userTransaction, nestedTransactonCount, transactionTimeout, socketProcessIdPort, commitCount, statisticsEnabled, applicationRollbackCount, objectStoreDir, recoveryPort, heuristicCount, recoveryInetAddress, runInVMRecoveryManager, resourceRollbackCount]
> So, to summarize the changes since 5.1, the component that has the tx stats that RHQ exposes as metrics has been renamed from "TransactionManager" to "TransactionStatistics". On top of that, each of the individual properties has been renamed as well (commitCount -> numberOfCommittedTransactions, etc.). In addition, a new component of the same type but named "TransactionManager" has been added. This component has a completely different set of properties from the component of the same type named "TransactionStatistics". This is bad - I don't think the Profile Service should even allow multiple components of the same type but with different sets of properties and/or operations to be deployed. A management client should be able to rely on the component's type to know which properties and/or operations should be present (i.e. a type should be similar to a Java class). In this case, the component name must be used in addition to the type to figure out the component's interface. I also think that the AS team should try, if at all possible, to keep the managed components APIs backwards-compatible (i.e. so clients written for older versions (such as RHQ) will not break).
> Can this management interface please be updated so that it is backwards-compatible with what is in AS 5.1? It is not practical for RHQ to have to update its AS5 plugin for each new AS release, because management APIs keep changing. Specifically, can "TransactionStatistics" be renamed to "TransactionManager" and can its properties be renamed to the names they had in 5.1 (I don't care if the new properties are kept as well and/or the old properties deprecated)? And can "TransactionManager"'s type be changed to something other than {MCBean:JTA} so it has a different type than "TransactionStatistics" as it should?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list