[JBossCache] - Exclusive lock on bottom (leaf) node only?
by atijms
Hi,
I'm in a situation where I would like to have an exclusive lock on only the leaf node in a tree.
E.g. suppose I have a tree with entries "/a/b/n1" and "/a/b/n2". When Tx1 accesses "/a/b/n1", Tx2 should not be able to also access (either read or write) "/a/b/n1" until Tx1 has completed and released its locks. However, meanwhile Tx3 should be able to access "/a/b/n2".
With isolation level SERIALIZABLE, the entire tree is exclusively locked. E.g. when Tx1 in the above example accesses "/a/b/n1" and writes to n1, it has a read lock on a and b and a write lock on n1. If meanwhile Tx3 wants to access "/a/b/n2", it already fails to acquire the read lock on "/a", making it impossible to reach "/a/b" and "a/b/n2"
The lower isolation levels also don't work for my usecase. E.g. when Tx1 accesses "/a/b/n1" and reads n1, Tx2 is also able to read n1 at the same time, which is what should not be allowed.
In short, I would like to be able to have SERIALIZABLE semantics per specific sub-tree instead of the whole tree.
Is something like that possible with JbossCache?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049461#4049461
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049461
18 years, 11 months
[JBoss Messaging] - Re: Viewing message contents in a queue
by parressh
Hi Tim. I've written a QueueBrowser to look at the messages on the queue. But it's not quite working if I have an MDB configured to listen on the queue. Once I do that, I no longer see the messages on the queue. It does show the messages when I remove the MDB. On the JMX console, it shows the message counts properly whether I have the MDB or not, but the QueueBrowser only shows the messages without the MDB.
My feeling is that this is a bug, another issue of JBM + MDB's. However, is there something differently that I need to be doing? Here's more or less the code snippet I'm using:
| QueueConnection conn = null;
| QueueSession session = null;
| QueueBrowser browser = null;
| conn = qcf.createQueueConnection();
| session = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
| List<String> leads = new ArrayList<String>();
| browser = session.createBrowser(leadQueue);
| Enumeration messages = browser.getEnumeration();
| while (messages.hasMoreElements()) {
| TextMessage message = (TextMessage) messages.nextElement();
| leads.add(message.getText());
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049459#4049459
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049459
18 years, 11 months
[JBoss AOP] - Re: JBoss AOP problem
by laurentSalse
I follows all yours advices.
In fact I work on eclipse. When I launch directly the run.bat file there are others errors :
java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalArgumentException
at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
at java.lang.reflect.Field.set(Field.java:656)
at org.jboss.aop.ClassAdvisor.initializeMethodChain(ClassAdvisor.java:464)
at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:594)
at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:82)
at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:299)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:271)
at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
I really don't understand what am I supposed to do with these errors and mostly what are these origin. Could you help me please ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049449#4049449
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049449
18 years, 11 months
[JNDI/Naming/Network] - Re: javax.naming.NamingException: userEntity not bound
by v_anusuya
jboss.xml:-
| <?xml version = '1.0' encoding = 'windows-1252'?>
| <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
| <jboss>
| <enterprise-beans>
| <session>
| <ejb-name>ejb/userSession</ejb-name>
| <local-jndi-name>ejb/userSession</local-jndi-name>
|
| <resource-ref>
| <res-ref-name>queue/MessageQueue</res-ref-name>
| <jndi-name>queue/MessageQueue</jndi-name>
|
| </resource-ref>
| </session>
| <session>
| <ejb-name>ejb/userSession</ejb-name>
| <local-jndi-name>ejb/userSession</local-jndi-name>
|
| <resource-ref>
| <res-ref-name>queue/SystemQueue</res-ref-name>
| <jndi-name>queue/SystemQueue</jndi-name>
|
| </resource-ref>
| </session>
| <message-driven>
| <ejb-name>ejb/messageServerMessage</ejb-name>
| <local-jndi-name>ejb/messageServerMessage</local-jndi-name>
| <destination-jndi-name>queue/MessageQueue</destination-jndi-name>
| <resource-ref>
| <res-ref-name>topic/MessageTopic</res-ref-name>
| <jndi-name>topic/MessageTopic</jndi-name>
|
| </resource-ref>
| </message-driven>
| </enterprise-beans>
| </jboss>
|
|
ejb-jar.xml. I am only pasting the relevant section of the ejb-jar file because the whole file is very big and I am not sure if you would really need the entire file.
|
| <session>
| <display-name>ACLSessionBean</display-name>
| <ejb-name>ejb/aclSession</ejb-name>
| <home>com.wdp.workflow.sessions.aclsession.ACLSessionHome</home>
| <remote>com.wdp.workflow.sessions.aclsession.ACLSession</remote>
| <ejb-class>com.wdp.workflow.sessions.aclsession.ACLSessionBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Bean</transaction-type>
| <ejb-local-ref>
| <ejb-ref-name>ejb/sessionEntity</ejb-ref-name>
| <ejb-ref-type>Entity</ejb-ref-type>
| <local-home>com.wdp.workflow.entities.sessionentity.SessionEntityHome</local-home>
| <local>com.wdp.workflow.entities.sessionentity.SessionEntity</local>
| <ejb-link>ejb/sessionEntity</ejb-link>
| </ejb-local-ref>
| <ejb-local-ref>
| <ejb-ref-name>ejb/userEntity</ejb-ref-name>
| <ejb-ref-type>Entity</ejb-ref-type>
| <local-home>com.wdp.workflow.entities.userentity.UserEntityHome</local-home>
| <local>com.wdp.workflow.entities.userentity.UserEntity</local>
| <ejb-link>ejb/userEntity</ejb-link>
| </ejb-local-ref>
| <resource-ref>
| <res-ref-name>jdbc/Workflow</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
| </session>
| <!-- UserEntityBean -->
| <entity>
| <display-name>UserEntityBean</display-name>
| <ejb-name>ejb/userEntity</ejb-name>
| <local-home>com.wdp.workflow.entities.userentity.UserEntityHome</local-home>
| <local>com.wdp.workflow.entities.userentity.UserEntity</local>
| <ejb-class>com.wdp.workflow.entities.userentity.UserEntityBean</ejb-class>
| <persistence-type>Bean</persistence-type>
| <prim-key-class>java.lang.String</prim-key-class>
| <reentrant>False</reentrant>
| <resource-ref>
| <res-ref-name>jdbc/Workflow</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
| </entity>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049443#4049443
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049443
18 years, 11 months