[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4543 Design
by JerryGauth
Just to document what I found -
The original discussion of JBMICROCONT-192 suggested that a "name-method" attribute would be used to expose the bean name. It appears that this was either not implemented or was rolled back. The bean name is available using "inject fromContext".
For example, adding the following to the HASingletonDeployer bean will cause the bean name to be injected into serviceHAName.
<property name="serviceHAName"><inject fromContext="name"/></property>
|
It looks like the version of jboss-kernel.jar containing this support hasn't been updated in the repository yet. I built the jar from latest microcontainer source and confirmed that this technique works for HAServiceMBeanSupport.
Once the jar is available, I'll modify deploy-hasingleton-beans.xml to use this capability. If annotation support subsequently becomes available, I'll revisit the issue as it might be preferable to handle this in the base class rather than in the configuration.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067111#4067111
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067111
17 years, 6 months
[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4574 and JBAS-1476
by adrian@jboss.org
"bstansberry(a)jboss.com" wrote : "adrian(a)jboss.org" wrote : "bstansberry(a)jboss.com" wrote :
| | | [OT] Re: 'the "view change" is less than it previously was" after a cluster restart. No. The viewId passed between the server and HA clients is not a counter. It is a hash of the service's cluster topology.
| |
| | Nice fix. You just broke all the old clients that assume its a counter.
|
| What fix? I never changed anything; this is the way viewId has worked in any clustering code I've looked at. I have no idea where this counter concept you have comes from; maybe some early version. It's not the way it works at least since 4.0.3 (and I didn't touch it there).
You calling me an old timer? :-)
My guess is Sacha changed it when refactored the whole thing to do his
cluster family stuff?
Either that or I'm just going senile. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067106#4067106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067106
17 years, 6 months
[Design of JCA on JBoss] - Re: Allow setAutoCommit(false) on managed connections
by adrian@jboss.org
"bill.burke(a)jboss.com" wrote : I don't think you are listening to me. connection.commit() /rollback()SHOULD fail as it is a state change. setAutoCommit(false) should succeed as there is no state change to the connection if auto commit is already false.
|
| Thirdparty code may not be doing commit(), rollback(), but may only be doing setAutoCommit(false). Which should be perfectly fine, again, because there is no state change to the connection. This could be what the user is running into. I don't know.
|
Impossible. The code would never work without a commit() outside a JTA transaction.
connection.close() does a rollback if there was no commit.
anonymous wrote :
| Weston/myself had similar spec religiousness debates with Mark Little around allowing multiple non-XA resources in a transaction.
|
| Morale of the story? You may know something is wrong and not the right way to do it, but there may be no other way because you don't control all the variables.
|
But using non-XA resources works in most cases (there are some failures
that don't).
What's important is that it doesn't break code using XA resources to support it.
There's absolutely no way
| Connection c = datasource.getConnection();
| try
| {
| c.setAutoCommit(false)
| // do stuff but don't commit
| }
| finally
| {
| c.close();
| }
|
works in any environment. It's just broken code.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067098#4067098
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067098
17 years, 6 months