Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.EnterpriseBean


//      one(facade).addClassAnnotation("test.TestBean", TransactionAttribute.class, createNameValuePair("value", TransactionAttributeType.MANDATORY)); //$NON-NLS-1$ //$NON-NLS-2$
//      one(facade).addMethodAnnotation("test.TestBean", "test", new String[] { "java.lang.String" }, TransactionAttribute.class, createNameValuePair("value", TransactionAttributeType.MANDATORY)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    }});


    EnterpriseBean enterpriseBean = new StatefulBean();
    enterpriseBean.setEjbName("TestBean"); //$NON-NLS-1$
    enterpriseBean.setEjbClass("test.TestBean"); //$NON-NLS-1$
    enterpriseBean.setTransactionType(TransactionType.BEAN);
   
    AssemblyDescriptor descriptor = new AssemblyDescriptor();
   
    addMethodTransactionToDescriptor(descriptor, "TestBean", "*", new String[0]); //$NON-NLS-1$ //$NON-NLS-2$
    addMethodTransactionToDescriptor(descriptor, "TestBean", "test", new String[] { "java.lang.String" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
View Full Code Here


    }
  }

  private EnterpriseBean addStatefulBeanToEjbJar(EjbJar ejbJar, String beanName,
      String beanClass) {
    EnterpriseBean enterpriseBean = new StatefulBean();
    enterpriseBean.setEjbName(beanName);
    enterpriseBean.setEjbClass(beanClass);
    ejbJar.addEnterpriseBean(enterpriseBean);
   
    return enterpriseBean;
  }
View Full Code Here

    context.checking(new Expectations(){{
      one(facade).addClassAnnotation("test.TestBean", RunAs.class, createNameValuePair("value", "Administrator")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    SecurityIdentity securityIdentity = new SecurityIdentity();
    securityIdentity.setRunAs("Administrator"); //$NON-NLS-1$
    bean.setSecurityIdentity(securityIdentity);
   
    // execute
    converter.processBeanSecurityIdentity(bean);

    // verify
View Full Code Here

    context.checking(new Expectations(){{
      one(facade).addClassAnnotation("test.TestBean", DeclareRoles.class, createNameValuePair("value", new String[] { "Admin" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$

    RemoteBean remoteBean = (RemoteBean) bean;
    remoteBean.getSecurityRoleRef().add(new SecurityRoleRef("Admin")); //$NON-NLS-1$
   
    // execute
View Full Code Here

    context.checking(new Expectations(){{
      one(facade).addClassAnnotation("test.TestBean", Interceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    Interceptor interceptor = new Interceptor(SessionBeanConverterTest.class);
    ejbJar.addInterceptor(interceptor);
    List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
   
View Full Code Here

    context.checking(new Expectations(){{
      one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], Interceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    Interceptor interceptor = new Interceptor(SessionBeanConverterTest.class);
    ejbJar.addInterceptor(interceptor);
    List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
   
View Full Code Here

      one(facade).addClassAnnotation("test.TestBean", Interceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$
      one(facade).addClassAnnotation("test.TestBean", ExcludeDefaultInterceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    Interceptor interceptor = new Interceptor(SessionBeanConverterTest.class);
    ejbJar.addInterceptor(interceptor);
    List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
   
View Full Code Here

      one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], ExcludeDefaultInterceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], Interceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    Interceptor interceptor = new Interceptor(SessionBeanConverterTest.class);
    ejbJar.addInterceptor(interceptor);
    List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
   
View Full Code Here

      one(facade).addClassAnnotation("test.TestBean", Interceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$
      one(facade).addClassAnnotation("test.TestBean", ExcludeClassInterceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    Interceptor interceptor = new Interceptor(SessionBeanConverterTest.class);
    ejbJar.addInterceptor(interceptor);
    List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
   
View Full Code Here

      one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], ExcludeClassInterceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      one(facade).addMethodAnnotation("test.TestBean", "test", new String[0], Interceptors.class, createNameValuePair("value", new String[] { SessionBeanConverterTest.class.getCanonicalName() })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }});

    EjbJar ejbJar = new EjbJar();
    EnterpriseBean bean = addStatefulBeanToEjbJar(ejbJar, "TestBean", "test.TestBean"); //$NON-NLS-1$ //$NON-NLS-2$
   
    Interceptor interceptor = new Interceptor(SessionBeanConverterTest.class);
    ejbJar.addInterceptor(interceptor);
    List<InterceptorBinding> interceptorBindings = ejbJar.getAssemblyDescriptor().getInterceptorBinding();
   
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.EnterpriseBean

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.