Examples of TransactionRequest


Examples of org.jboss.jms.tx.TransactionRequest

     
      public void testConnectionSendTransactionRequest() throws Exception
      {
         ClientTransaction tx = new ClientTransaction();
        
         TransactionRequest tr = new TransactionRequest(TransactionRequest.ONE_PHASE_COMMIT_REQUEST, null, tx);
        
         RequestSupport req =
            new ConnectionSendTransactionRequest("23", (byte)77, tr, false);
                
         testPacket(req, PacketSupport.REQ_CONNECTION_SENDTRANSACTION);                          
View Full Code Here

Examples of org.jboss.jms.tx.TransactionRequest

   public void read(DataInputStream is) throws Exception
   {
      super.read(is);
     
      req = new TransactionRequest();

      final boolean supportsRecovered = ConnectionCapabilities.doesConnectionSupportRecoveryRollback(version) ;
      req.setSupportsRecovered(supportsRecovered) ;
     
      req.read(is);
View Full Code Here

Examples of org.jboss.jms.tx.TransactionRequest

      ConnectionAdvised del = (ConnectionAdvised)invocation.getTargetObject();
      ServerConnectionEndpoint ce = (ServerConnectionEndpoint)del.getEndpoint();

      MethodInvocation mi = (MethodInvocation)invocation;

      TransactionRequest t = (TransactionRequest)mi.getArguments()[0];

      ClientTransaction txState = t.getState();

      if (txState != null)
      {
         // distinct list of destinations...
         HashSet destinations = new HashSet();
View Full Code Here

Examples of org.jboss.jms.tx.TransactionRequest

      ConnectionAdvised del = (ConnectionAdvised)invocation.getTargetObject();
      ServerConnectionEndpoint ce = (ServerConnectionEndpoint)del.getEndpoint();

      MethodInvocation mi = (MethodInvocation)invocation;

      TransactionRequest t = (TransactionRequest)mi.getArguments()[0];

      ClientTransaction txState = t.getState();

      if (txState != null)
      {
         // distinct list of destinations...
         HashSet destinations = new HashSet();
View Full Code Here

Examples of org.jboss.jms.tx.TransactionRequest

/* 164 */     ConnectionAdvised del = (ConnectionAdvised)invocation.getTargetObject();
/* 165 */     ServerConnectionEndpoint ce = (ServerConnectionEndpoint)del.getEndpoint();
/*     */
/* 167 */     MethodInvocation mi = (MethodInvocation)invocation;
/*     */
/* 169 */     TransactionRequest t = (TransactionRequest)mi.getArguments()[0];
/*     */
/* 171 */     ClientTransaction txState = t.getState();
/*     */     Iterator iterDestinations;
/* 173 */     if (txState != null)
/*     */     {
/* 176 */       HashSet destinations = new HashSet();
/*     */
View Full Code Here

Examples of org.jboss.jms.tx.TransactionRequest

/*    */
/*    */   public void read(DataInputStream is) throws Exception
/*    */   {
/* 63 */     super.read(is);
/*    */
/* 65 */     this.req = new TransactionRequest();
/*    */
/* 67 */     this.req.read(is);
/*    */
/* 69 */     this.checkForDuplicates = is.readBoolean();
/*    */   }
View Full Code Here

Examples of org.jboss.jms.tx.TransactionRequest

     
      public void testConnectionSendTransactionRequest() throws Exception
      {
         ClientTransaction tx = new ClientTransaction();
        
         TransactionRequest tr = new TransactionRequest(TransactionRequest.ONE_PHASE_COMMIT_REQUEST, null, tx);
        
         RequestSupport req =
            new ConnectionSendTransactionRequest("23", (byte)77, tr, false);
                
         testPacket(req, PacketSupport.REQ_CONNECTION_SENDTRANSACTION);                          
View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.TransactionRequest

     * @throws WfsException If no type is found, if filter length doesn't match
     *         feature length, or if no filter is found.  We don't want  users
     *         to accidentally delete their whole db.
     */
    public Request getRequest(HttpServletRequest request) throws WfsException {
        TransactionRequest parentRequest = new TransactionRequest();
        parentRequest.setHttpServletRequest(request);
        boolean releaseAll = true;

        // set global request parameters
        LOGGER.finest("setting global request parameters");

        if (keyExists("VERSION")) {
            parentRequest.setVersion(getValue("VERSION"));
        }

        if (keyExists("REQUEST")) {
            parentRequest.setRequest(getValue("REQUEST"));
        }

        //REVISIT: This is not in spec, but really should be.  Waiting to hear
        //about features like this, that were just accidentally left out.
        if (keyExists("LOCKID")) {
            parentRequest.setLockId(getValue("LOCKID"));
        }

        // declare tokenizers for repeating elements
        LOGGER.finest("setting query request parameters");

        List typeList = readFlat(getValue("TYPENAME"), INNER_DELIMETER);
        LOGGER.finest("type list size: " + typeList.size());

        List filterList = null;
        filterList = readFilters(getValue("FEATUREID"), getValue("FILTER"),
                getValue("BBOX"));

        if (typeList.size() == 0) {
            typeList = getTypesFromFids(getValue("FEATUREID"));

            if (typeList.size() == 0) {
                throw new WfsException("The typename element is mandatory if "
                    + "no FEATUREID is present");
            }
        }

        int featureSize = typeList.size();
        int filterSize = (filterList == null) ? 0 : filterList.size();

        // prepare the release action boolean for all delete transactions
        if (keyExists("RELEASEACTION")) {
            String lockAction = getValue("RELEASEACTION");
            parentRequest.setReleaseAction(lockAction);
        }

        // check for errors in the request
        if (((filterSize != featureSize) && (filterSize > 0))
                || ((filterSize > 0) && (featureSize == 0))) {
            throw new WfsException("Filter size does not match"
                + " feature types.  Filter size: " + filterSize
                + " Feature size: " + featureSize);
        } else if (filterSize == featureSize) {
            for (int i = 0, n = featureSize; i < n; i++) {
                DeleteRequest childRequest = new DeleteRequest();
                childRequest.setTypeName((String) typeList.get(i));
                childRequest.setFilter((Filter) filterList.get(i));
                childRequest.setReleaseAll(releaseAll);
                parentRequest.addSubRequest(childRequest);
            }
        } else if (filterSize == 0) {
            String message = "No filter found.  If you are sure you want to "
                + "wipe out your database, then use a filter that is always true"
                + ".  We just don't want you to inadvertantly wipe everything "
View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.TransactionRequest

        InsertRequest insert = new InsertRequest();

        insert.setHandle("insert 1");
        insert.addFeature(testFeature);

        TransactionRequest baseRequest = new TransactionRequest();
        baseRequest.addSubRequest(insert);
        baseRequest.setHandle("my insert");

        // run test      
        //assertTrue(runXmlTest(baseRequest, "insert1", true));
    }
View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.TransactionRequest

        // make base comparison objects       
        InsertRequest insert = new InsertRequest();
        insert.setHandle("insert 2");
        insert.addFeature(testFeature);

        TransactionRequest baseRequest = new TransactionRequest();
        baseRequest.addSubRequest(insert);

        Coordinate[] points = {
            new Coordinate(5, 5), new Coordinate(5, 15), new Coordinate(15, 15),
            new Coordinate(15, 5), new Coordinate(5, 5)
        };
        PrecisionModel precModel = new PrecisionModel();
        int srid = 2035;
        LinearRing shell = new LinearRing(points, precModel, srid);
        Polygon the_geom = new Polygon(shell, precModel, srid);

        Integer featureId = new Integer(23);
        String name = "polygon2";
        Object[] attributes = { featureId, the_geom, name };

        //try{
        Feature feature2 = schema.create(attributes, String.valueOf(featureId));

        insert.addFeature(feature2);
        baseRequest.setHandle("my second insert");

        // run test      
        //assertTrue(runXmlTest(baseRequest, "insert2", true));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.