Package org.jboss.test.cluster.ejb3.clusteredsession.ejbthree921

Examples of org.jboss.test.cluster.ejb3.clusteredsession.ejbthree921.Person


   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
     
      runner = new NestedBeanTestRunner(getInitialContext(0), getLog());
      runner.setUp();
      // Use a sleep time equal to 2 thread runs + a 100 ms fudge
      runner.setSleepTime(10100L);
      // For clustered beans, an invocation is a passivation
      runner.setPassivationPerInvocation(1);
View Full Code Here


   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
     
      runner = new NestedBeanTestRunner(getInitialContext(0), getLog());
      runner.setUp();
      // Use a sleep time equal to 2 thread runs + a 100 ms fudge
      runner.setSleepTime(10100L);
      // For clustered beans, an invocation is a passivation
      runner.setPassivationPerInvocation(1);
View Full Code Here

   throws Exception
   {
      getLog().debug("Test Nested Stateful Bean Counter Failover with Remote");
      getLog().debug("======================================================");
     
      NestedBeanSet beanSet = runner.getNestedBeanSet();
      ParentStatefulRemote stateful = beanSet.parent;
      VMID node1 = stateful.getVMID();
      assertNotNull("State node: ", node1);
      getLog ().debug ("Node 1 ID: " +node1);
View Full Code Here

   throws Exception
   {
      getLog().debug("Test Nested Stateful Bean Counter Failover");
      getLog().debug("==========================================");
     
      NestedBeanSet beanSet = runner.getNestedBeanSet();
      ParentStatefulRemote stateful = beanSet.parent;
      VMID node1 = stateful.getVMID();
      assertNotNull("State node: ", node1);
      getLog ().debug ("Node 1 ID: " +node1);
View Full Code Here

     
      NestedStateful nested = (NestedStateful) parent.getNested();
      parentInv++;
      runner.addRemovable(nested);
     
      NestedBeanSet beanSet = runner.getNestedBeanSet();
     
      int attempts = 0;
      while (beanSet.parent.getVMID().equals(beanSet.nested.getVMID()))
      {
         if (++attempts == 20)
View Full Code Here

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
     
      runner = new XPCTestRunner(getInitialContext(0), getLog());
      runner.setUp();
      // Use a sleep time equal to 2 thread runs + a 100 ms fudge
      runner.setSleepTime(10100L);
   }
View Full Code Here

   }
  
   private void failoverTest(boolean passivate, boolean passivateAgain, boolean repeated)
   throws Exception
   {
      BeanSet beanSet = runner.getBeanSet();
      ShoppingCart parent = beanSet.cart;
      NestedXPCMonitor monitor = beanSet.monitor;
     
      // Confirm the nested beans are there
      String deepId = monitor.getDeepNestedId();
View Full Code Here

    public void test_Person_binding() throws IOException, SAXException {
        XMLBinding xmlBinding = new XMLBinding().add(getClass().getResourceAsStream("config5/person-binding-config.xml"));
        xmlBinding.intiailize();

        Person person = xmlBinding.fromXML("<person name='Max' age='50' />", Person.class);
        String xml = xmlBinding.toXML(person);
        XMLUnit.setIgnoreWhitespace(true);
        XMLAssert.assertXMLEqual("<person name='Max' age='50' />", xml);

    }
View Full Code Here

  private static final long serialVersionUID = 1L;

  public HomePage(final PageParameters parameters) {
    super(parameters);

    setDefaultModel(new CompoundPropertyModel<Person>(new Person()));
   
    Form<Void> form = new Form<Void>("form");
   
    form.add(new TextField("name").add(new PropertyValidator()));
    form.add(new TextField("email").add(new PropertyValidator()));
View Full Code Here

  private static Log log = LogFactory.getInstance().getLog("firefly-system");
  public static ApplicationContext xmlApplicationContext = new XmlApplicationContext();

  @Test
  public void testXmlInject() {
    Person person = xmlApplicationContext.getBean("person");
    Assert.assertThat(person.getName(), is("Jack"));
    PersonService personService = xmlApplicationContext
        .getBean("personService");
    List<Object> l = personService.getTestList();
    Assert.assertThat(l.size(), greaterThan(0));
    int i = 0;
    for (Object p : l) {
      if (p instanceof Person) {
        person = (Person) p;
        i++;
        log.debug(person.getName());
      } else if (p instanceof Map) {
        @SuppressWarnings("unchecked")
        Map<Object, Object> map = (Map<Object, Object>)p;
        log.info(map.toString());
        Assert.assertThat(map.entrySet().size(), greaterThan(0));
View Full Code Here

TOP

Related Classes of org.jboss.test.cluster.ejb3.clusteredsession.ejbthree921.Person

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.