Ejemplo n.º 1
0
    static void Main(String[] args)
    {
        var type = typeof(EExceptionHandling);

        foreach (String p in sArray("windows", "android"))
        {
            String[] enumNames = Enum.GetNames(type);

            project("out_ehtest_" + p);
            platforms("Win32");

            foreach (String name in enumNames)
            {
                EExceptionHandling eh = (EExceptionHandling)Enum.Parse(type, name);
                if (eh == EExceptionHandling.ProjectDefault)
                {
                    continue;
                }
                kind("DynamicLibrary", p);
                String file = name.ToLower() + ".cpp";
                files("?" + file);
                filter("files:" + file);
                CCpp_CodeGeneration_EnableCppExceptions(eh);
            }
        }
    } //Main
Ejemplo n.º 2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="destination">Destionation to connect with OpenEngSB</param>
 protected JmsPort(string destination, EExceptionHandling handling)
 {
     this.connection = null;
     this.factory = null;
     this.session = null;
     this.destination = null;
     this.string_destination=destination;
     this.handling=handling;
     this.nbrretry = 0;
     Configure();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="destination">URL to OpenEngSB</param>
 public JmsOutgoingPort(string destination, EExceptionHandling handling)
     : base(destination, handling)
 {
     producer = session.CreateProducer(this.destination);
     producer.DeliveryMode = MsgDeliveryMode.Persistent;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Configurate the Connection
        /// </summary>
        /// <param name="destination">Destionation</param>
        protected void Configure()
        {
            if (close) return;
            if (nbrretry++ >= maxretries)
                handling = EExceptionHandling.ForwardException;

            try
            {
                Destination dest = new Destination(string_destination);
                Uri connectionUri = new Uri(dest.Host);
                factory = new Apache.NMS.ActiveMQ.ConnectionFactory(connectionUri);
                connection = factory.CreateConnection();
                session = connection.CreateSession();
                connection.Start();
                this.destination = session.GetDestination(dest.Queue);
                nbrretry = 0;
            }
            catch
            {
                switch (handling)
                {
                    case EExceptionHandling.ForwardException:
                        {
                            throw;
                        }
                    case EExceptionHandling.Retry:
                        {
                            Configure();
                            break;
                        }
                }
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="destination">URL to OpenEngSB</param>
 public JmsIncomingPort(string destination, EExceptionHandling exceptionhandling)
     : base(destination,exceptionhandling)
 {
     consumer = session.CreateConsumer(this.destination);
 }