Package org.jboss.metadata.ejb.jboss

Examples of org.jboss.metadata.ejb.jboss.MethodAttributeMetaData


            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here


            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here

            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here

            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here

      JBossConsumerBeanMetaData original = new JBossConsumerBeanMetaData();
      original.setEjbName("consumer");
     
      MethodAttributesMetaData curMsg = new MethodAttributesMetaData();
      original.setCurrentMessage(curMsg);
      MethodAttributeMetaData mAttr = new MethodAttributeMetaData();
      mAttr.setMethodName("method1");
      mAttr.setTransactionTimeout(1000);
      curMsg.add(mAttr);
      mAttr = new MethodAttributeMetaData();
      mAttr.setMethodName("method2");
      mAttr.setTransactionTimeout(2000);
      curMsg.add(mAttr);
     
      JBossConsumerBeanMetaData override = new JBossConsumerBeanMetaData();
      override.setEjbName("consumer");
      curMsg = new MethodAttributesMetaData();
      override.setCurrentMessage(curMsg);
      mAttr = new MethodAttributeMetaData();
      mAttr.setMethodName("method2");
      mAttr.setTransactionTimeout(2500);
      curMsg.add(mAttr);
      mAttr = new MethodAttributeMetaData();
      mAttr.setMethodName("method3");
      mAttr.setTransactionTimeout(3000);
      curMsg.add(mAttr);
     
      JBossConsumerBeanMetaData merged = new JBossConsumerBeanMetaData();
      merged.merge(override, original);
      curMsg = merged.getCurrentMessage();
      assertNotNull(curMsg);
      mAttr = curMsg.get("method1");
      assertNotNull(mAttr);
      assertEquals(1000, mAttr.getTransactionTimeout());
      mAttr = curMsg.get("method2");
      assertNotNull(mAttr);
      assertEquals(2500, mAttr.getTransactionTimeout());
      mAttr = curMsg.get("method3");
      assertNotNull(mAttr);
      assertEquals(3000, mAttr.getTransactionTimeout());
   }
View Full Code Here

      original.setMessageProperties(msgProps);
      MessagePropertiesMetaData msgProp = new MessagePropertiesMetaData();
      msgProp.setClassName("class1");
      msgProp.setDelivery("NonPersistent");
      msgProp.setPriority(1);
      MethodAttributeMetaData method = new MethodAttributeMetaData();
      method.setMethodName("method1");
      method.setIdempotent(false);
      method.setReadOnly(false);
      method.setTransactionTimeout(1000);
      msgProp.setMethod(method);
      msgProps.add(msgProp);
      msgProp = new MessagePropertiesMetaData();
      msgProp.setClassName("class2");
      msgProp.setDelivery("NonPersistent");
      msgProp.setPriority(1);
      method = new MethodAttributeMetaData();
      method.setMethodName("method2");
      method.setIdempotent(false);
      method.setReadOnly(false);
      method.setTransactionTimeout(1000);
      msgProps.add(msgProp);
      msgProp.setMethod(method);
     
      JBossConsumerBeanMetaData override = new JBossConsumerBeanMetaData();
      override.setEjbName("consumer");

      msgProps = new ArrayList<MessagePropertiesMetaData>();
      override.setMessageProperties(msgProps);
      msgProp = new MessagePropertiesMetaData();
      msgProp.setClassName("class2");
      msgProp.setDelivery("Persistent");
      msgProp.setPriority(2);
      method = new MethodAttributeMetaData();
      method.setMethodName("method2");
      method.setIdempotent(true);
      method.setReadOnly(true);
      method.setTransactionTimeout(2000);
      msgProp.setMethod(method);
      msgProps.add(msgProp);
      msgProp = new MessagePropertiesMetaData();
      msgProp.setClassName("class3");
      msgProp.setDelivery("Persistent");
      msgProp.setPriority(3);
      method = new MethodAttributeMetaData();
      method.setMethodName("method3");
      method.setIdempotent(true);
      method.setReadOnly(true);
      method.setTransactionTimeout(3000);
      msgProp.setMethod(method);
      msgProps.add(msgProp);
     
      JBossConsumerBeanMetaData merged = new JBossConsumerBeanMetaData();
      merged.merge(override, original);
      msgProps = merged.getMessageProperties();
      assertNotNull(msgProps);
      // shouldn't it be 3?
      assertEquals(4, msgProps.size());
     
      msgProp = msgProps.get(0);
      assertNotNull(msgProp);
      assertEquals("class2", msgProp.getClassName());
      assertEquals("Persistent", msgProp.getDelivery());
      assertEquals(new Integer(2), msgProp.getPriority());
      method = msgProp.getMethod();
      assertNotNull(method);
      assertEquals("method2", method.getMethodName());
      assertEquals(2000, method.getTransactionTimeout());
      assertTrue(method.isIdempotent());
      assertTrue(method.isReadOnly());

      msgProp = msgProps.get(1);
      assertNotNull(msgProp);
      assertEquals("class3", msgProp.getClassName());
      assertEquals("Persistent", msgProp.getDelivery());
      assertEquals(new Integer(3), msgProp.getPriority());
      method = msgProp.getMethod();
      assertNotNull(method);
      assertEquals("method3", method.getMethodName());
      assertEquals(3000, method.getTransactionTimeout());
      assertTrue(method.isIdempotent());
      assertTrue(method.isReadOnly());

      msgProp = msgProps.get(2);
      assertNotNull(msgProp);
      assertEquals("class1", msgProp.getClassName());
      assertEquals("NonPersistent", msgProp.getDelivery());
      assertEquals(new Integer(1), msgProp.getPriority());
      method = msgProp.getMethod();
      assertNotNull(method);
      assertEquals("method1", method.getMethodName());
      assertEquals(1000, method.getTransactionTimeout());
      assertFalse(method.isIdempotent());
      assertFalse(method.isReadOnly());

      msgProp = msgProps.get(3);
      assertNotNull(msgProp);
      assertEquals("class2", msgProp.getClassName());
      assertEquals("NonPersistent", msgProp.getDelivery());
      assertEquals(new Integer(1), msgProp.getPriority());
      method = msgProp.getMethod();
      assertNotNull(method);
      assertEquals("method2", method.getMethodName());
      assertEquals(1000, method.getTransactionTimeout());
      assertFalse(method.isIdempotent());
      assertFalse(method.isReadOnly());
   }
View Full Code Here

   {
      JBossSessionBeanMetaData original = new JBossSessionBeanMetaData();
      original.setEjbName("session");

      MethodAttributesMetaData methodAttrs = new MethodAttributesMetaData();
      MethodAttributeMetaData methodAttr = new MethodAttributeMetaData();
      methodAttr.setMethodName("method1");
      methodAttr.setTransactionTimeout(1000);
      methodAttrs.add(methodAttr);
      methodAttr = new MethodAttributeMetaData();
      methodAttr.setMethodName("method2");
      methodAttr.setTransactionTimeout(1000);
      methodAttrs.add(methodAttr);
      original.setMethodAttributes(methodAttrs);
     
      // override
      JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
      override.setEjbName("session");

      methodAttrs = new MethodAttributesMetaData();
      methodAttr = new MethodAttributeMetaData();
      methodAttr.setMethodName("method2");
      methodAttr.setTransactionTimeout(2000);
      methodAttrs.add(methodAttr);
      methodAttr = new MethodAttributeMetaData();
      methodAttr.setMethodName("method3");
      methodAttr.setTransactionTimeout(2000);
      methodAttrs.add(methodAttr);
      override.setMethodAttributes(methodAttrs);
     
      // merged
      JBossSessionBeanMetaData merged = new JBossSessionBeanMetaData();
      merged.merge(override, original);
     
      methodAttrs = merged.getMethodAttributes();
      assertNotNull(methodAttrs);
      assertEquals(3, methodAttrs.size());
      methodAttr = methodAttrs.get("method1");
      assertNotNull(methodAttr);
      assertEquals(1000, methodAttr.getTransactionTimeout());
      methodAttr = methodAttrs.get("method2");
      assertNotNull(methodAttr);
      assertEquals(2000, methodAttr.getTransactionTimeout());
      methodAttr = methodAttrs.get("method3");
      assertNotNull(methodAttr);
      assertEquals(2000, methodAttr.getTransactionTimeout());
   }
View Full Code Here

            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here

            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here

            {
               Class<?> clazz = di.getClassLoader().loadClass(interfac);
               annotation.setInterface(clazz);
            }
  
            MethodAttributeMetaData method = properties.getMethod();
            addAnnotations(MessageProperties.class, annotation, container, method);
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.jboss.MethodAttributeMetaData

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.