Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.NotifyingTransactionManager$Notification


    ExternalContentV2 content = request.getContent();
    Assert.assertEquals( message.getMessageTitle(), content.getMessageTitle() );
    Assert.assertEquals( message.getMessageBody(), content.getMessageBody() );
    Assert.assertEquals( message.getMessageSummary(), content.getMessageSummary() );
    Assert.assertEquals( settings.getLanguageCode(), content.getLanguageCode() );
    Notification notification = request.getNotifications().getNotification().get( 0 );
    List<ReceiverEndPoint> receiverEndPoints = notification.getReceiverEndPoints().getReceiverEndPoint();
    for (ReceiverEndPoint receiverEndPoint : receiverEndPoints) {
      TransportType transportType = receiverEndPoint.getTransportType();
      if (TransportType.EMAIL.equals( transportType )) {
      } else if (TransportType.SMS.equals( transportType )) {
      } else {
View Full Code Here


      cache3.getConfiguration().setSyncRollbackPhase(syncCommitRollback);

      TransactionManager mgr1 = cache1.getTransactionManager();
      TransactionManager mgr2 = cache2.getTransactionManager();
      assertTrue(cache3.getTransactionManager() instanceof NotifyingTransactionManager);
      NotifyingTransactionManager mgr3 = (NotifyingTransactionManager) cache3.getTransactionManager();
      mgr3.setCache(cache3);

      assertSame(mgr1, mgr2);
      assertNotSame(mgr1, mgr3);
      assertNotSame(mgr2, mgr3);

      assertTrue(mgr1 instanceof DummyTransactionManager);
      assertTrue(mgr2 instanceof DummyTransactionManager);

      cache1.put("/test", "key", "value");

      assertEquals("value", cache1.get("/test", "key"));
      assertEquals("value", cache2.get("/test", "key"));
      assertEquals("value", cache3.get("/test", "key"));

      mgr3.setNotification(new TestNotification(abortBeforeCompletion));

      mgr1.begin();
      cache1.put("/test", "key", "value2");
      mgr1.commit();
View Full Code Here

      cache3.getConfiguration().setSyncRollbackPhase(syncCommitRollback);

      TransactionManager mgr1 = cache1.getTransactionManager();
      TransactionManager mgr2 = cache2.getTransactionManager();
      assertTrue(cache3.getTransactionManager() instanceof NotifyingTransactionManager);
      NotifyingTransactionManager mgr3 = (NotifyingTransactionManager) cache3.getTransactionManager();
      mgr3.setCache(cache3);

      assertSame(mgr1, mgr2);
      assertNotSame(mgr1, mgr3);
      assertNotSame(mgr2, mgr3);

      assertTrue(mgr1 instanceof DummyTransactionManager);
      assertTrue(mgr2 instanceof DummyTransactionManager);

      ReplicationListener cacheLister2 = ReplicationListener.getReplicationListener(cache2);
      ReplicationListener cacheLister3 = ReplicationListener.getReplicationListener(cache3);

      cacheLister2.expect(PutKeyValueCommand.class);
      cacheLister3.expect(PutKeyValueCommand.class);

      cache1.put("/test", "key", "value");
      cacheLister2.waitForReplicationToOccur();
      cacheLister3.waitForReplicationToOccur();

      assertEquals("value", cache1.get("/test", "key"));
      assertEquals("value", cache2.get("/test", "key"));
      assertEquals("value", cache3.get("/test", "key"));

      mgr3.setNotification(new TestNotification(abortBeforeCompletion));

      cacheLister2.expectWithTx(PutKeyValueCommand.class);
      cacheLister3.expectWithTx(PutKeyValueCommand.class);
      mgr1.begin();
      cache1.put("/test", "key", "value2");
View Full Code Here

    public void commitOperation(
        @WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification commit = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

    public void rollbackOperation(
        @WebParam(name = "Rollback", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification rollback = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

    public void committedOperation(
        @WebParam(name = "Committed", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification committed = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

    public void abortedOperation(
        @WebParam(name = "Aborted", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification aborted = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

    public void prepareOperation(
        @WebParam(name = "Prepare", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification prepare = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

    public void commitOperation(
        @WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification commit = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

    public void rollbackOperation(
        @WebParam(name = "Rollback", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters")
        Notification parameters)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification rollback = parameters;
        final AddressingProperties inboundAddressProperties
            = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);

        TaskManager.getManager().queueTask(new Task() {
View Full Code Here

TOP

Related Classes of org.jboss.cache.transaction.NotifyingTransactionManager$Notification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.