[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1502) cannot remove a node in JTA

Manik Surtani (JIRA) jira-events at lists.jboss.org
Fri Apr 3 07:37:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBCACHE-1502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460457#action_12460457 ] 

Manik Surtani commented on JBCACHE-1502:
----------------------------------------

Do you have a unit test for this?  I tried the following and it works as expected:

 public void testRemoveChild() throws Exception
   {
      TransactionManager tm = cache.getTransactionManager();
      cache.put("/a/b/c/d", "k", "v");
      tm.begin();
      Node n = cache.getNode("/a/b/c");
      assert n != null;
      assert n.removeChild("d");
      assert !n.removeChild("d");

      n = cache.getNode("/a/b");
      assert n != null;
      assert n.removeChild(Fqn.fromString("/c"));
      assert !n.removeChild(Fqn.fromString("/c"));
      tm.commit();

      assert cache.getNode("/a/b/c/d") == null;
      assert cache.getNode("/a/b/c") == null;
      assert cache.getNode("/a/b") != null;
   }


> cannot remove a node in JTA
> ---------------------------
>
>                 Key: JBCACHE-1502
>                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1502
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Transactions
>    Affects Versions: 3.0.3.GA
>         Environment: Windows XP, 2003 Server
>            Reporter: Jiayi Gu
>            Assignee: Manik Surtani
>             Fix For: 3.1.0.GA
>
>
> We use the following code to remove a node. The cache is wrapped in Atomikos JTA transaction. The code works fine in JBoss Cache 2.1. However the same code and configuration does not work with JBoss Cache 3.0.3. "Does not work" means that the node is not removed using "node.removeChild" method. 
>                 Node<String, T> node = (Node<String, T>) getNode("/Workflow/Filter/Objects/");  <== node returns correctly
>                 Fqn<String> fqn = Fqn.fromString(id + "/");
>                 node.removeChild(fqn);   <== "removeChild" method returns false

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosscache-issues mailing list