Examples of copy()


Examples of org.apache.activemq.ActiveMQXAConnectionFactory.copy()

public class ActiveMQXAConnectionFactoryTest extends CombinationTestSupport {
   
    public void testCopy() throws URISyntaxException, JMSException {
        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory("vm://localhost?");
        ActiveMQConnectionFactory copy = cf.copy();
        assertTrue("Should be an ActiveMQXAConnectionFactory", copy instanceof ActiveMQXAConnectionFactory);
    }
   
       
    public void testUseURIToSetOptionsOnConnectionFactory() throws URISyntaxException, JMSException {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQMapMessage.copy()

        }
        String bigString = bigSB.toString();
       
        msg.setString("bigString", bigString);
       
        msg = (ActiveMQMapMessage) msg.copy();
       
        assertEquals(msg.getBoolean("boolean"), true);
        assertEquals(msg.getByte("byte"), (byte) 1);
        assertEquals(msg.getBytes("bytes").length, 1);
        assertEquals(msg.getChar("char"), 'a');
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQMessage.copy()

            // destination format is provider specific so only set on transformed message
            msg.setJMSDestination(destination);

            msg.setTransactionId(txid);
            if (connection.isCopyMessageOnSend()) {
                msg = (ActiveMQMessage)msg.copy();
            }
            msg.setConnection(connection);
            msg.onSend();
            msg.setProducerId(msg.getMessageId().getProducerId());
            if (LOG.isTraceEnabled()) {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQObjectMessage.copy()

    public void testBytes() throws JMSException, IOException {
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        String str = "testText";
        msg.setObject(str);
       
        msg = (ActiveMQObjectMessage) msg.copy();
        assertEquals(msg.getObject(), str);

    }

    public void testSetObject() throws JMSException {
View Full Code Here

Examples of org.apache.activemq.command.ConsumerInfo.copy()

                if(log.isDebugEnabled())
                    log.debug(localBrokerName  + " Ignoring sub " + info + " destination " + info.getDestination() + " is not permiited");
                return;
            }
            // Update the packet to show where it came from.
            info=info.copy();
            addRemoteBrokerToBrokerPath(info);
            DemandSubscription sub=createDemandSubscription(info);
            if (sub != null){
                addSubscription(sub);
                if(log.isDebugEnabled())
View Full Code Here

Examples of org.apache.activemq.command.DestinationInfo.copy()

    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
        super.removeDestination(context, destination, timeout);
        DestinationInfo info = destinations.remove(destination);
        if (info != null) {
            // ensure we don't modify (and loose/overwrite) an in-flight add advisory, so duplicate
            info = info.copy();
            info.setDestination(destination);
            info.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE);
            ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destination);
            fireAdvisory(context, topic, info);
            ActiveMQTopic[] advisoryDestinations = AdvisorySupport.getAllDestinationAdvisoryTopics(destination);
View Full Code Here

Examples of org.apache.activemq.command.Message.copy()

                            // vm://
                            // md.getMessage() == null to signal end of queue
                            // browse.
                            Message msg = md.getMessage();
                            if (msg != null) {
                                msg = msg.copy();
                                msg.setReadOnlyBody(true);
                                msg.setReadOnlyProperties(true);
                                msg.setRedeliveryCounter(md.getRedeliveryCounter());
                                msg.setConnection(ActiveMQConnection.this);
                                md.setMessage(msg);
View Full Code Here

Examples of org.apache.ambari.view.pig.utils.HdfsApi.copy()

  }

  @Test
  public void testSubmitJob() throws Exception {
    HdfsApi hdfsApi = createNiceMock(HdfsApi.class);
    expect(hdfsApi.copy(eq("/tmp/script.pig"), startsWith("/tmp/.pigjobs/"))).andReturn(true);

    ByteArrayOutputStream do_stream = new ByteArrayOutputStream();

    FSDataOutputStream stream = new FSDataOutputStream(do_stream);
    expect(hdfsApi.create(anyString(), eq(true))).andReturn(stream);
View Full Code Here

Examples of org.apache.bval.model.MetaBean.copy()

          if (copy == null) { // ist noch nicht kopiert
            MetaBean meta = all.get(xmlMeta.getId());
            if (meta == null) { // gibt es nicht
              copy = createMetaBean(xmlMeta);
            } else { // gibt es, jetzt kopieren
              copy = meta.copy();
            }
            copies.put(xmlMeta.getId(), copy);
          }
          carrier.xmlMeta = xmlMeta;
          xmlFactory.enrichMetaBean(copy, carrier);
View Full Code Here

Examples of org.apache.camel.Exchange.copy()

    public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
        Exchange answer = super.aggregate(oldExchange, newExchange);
        if (oldExchange == null) {
            // for the first time we must do a copy as the answer, so the outgoing
            // exchange is not one of the grouped exchanges, as that causes a endless circular reference
            answer = answer.copy();
        }
        return answer;
    }

    @Override
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.