Package org.jboss.as.ejb3.component

Examples of org.jboss.as.ejb3.component.EJBComponentDescription$Ejb2ViewTypeConfigurator


    private final boolean stateful;
    private final boolean singleton;
    private final boolean messageDriven;

    public EjbDescriptorImpl(EJBComponentDescription componentDescription, BeanDeploymentArchiveImpl beanDeploymentArchive, final DeploymentReflectionIndex reflectionIndex) {
        final SessionBeanComponentDescription description = componentDescription instanceof SessionBeanComponentDescription ? (SessionBeanComponentDescription) componentDescription : null;
        final Set<BusinessInterfaceDescriptor<?>> localInterfaces = new HashSet<BusinessInterfaceDescriptor<?>>();
        final Set<BusinessInterfaceDescriptor<?>> remoteInterfaces = new HashSet<BusinessInterfaceDescriptor<?>>();
        final ResourceLoader loader = beanDeploymentArchive.getServices().get(ResourceLoader.class);

        ejbClass = (Class<T>) loader.classForName(componentDescription.getEJBClassName());
View Full Code Here


        }
    }

    private static EJBEndpoint newEjbEndpoint(final PortComponentMetaData portComponentMD, final EEModuleDescription moduleDescription, final Set<String> securityRoles) {
        final String ejbName = portComponentMD.getEjbLink();
        final SessionBeanComponentDescription sessionBean = (SessionBeanComponentDescription)moduleDescription.getComponentByName(ejbName);
        final String seiIfaceClassName = portComponentMD.getServiceEndpointInterface();
        final EJBViewDescription ejbViewDescription = sessionBean.addWebserviceEndpointView(seiIfaceClassName);
        // JSR 109 - Version 1.3 - 6.2.2.4 Security
        // For EJB based service implementations, Handlers run after method level authorization has occurred.
        // JSR 109 - Version 1.3 - 6.2.2.5 Transaction
        // Handlers run under the transaction context of the component they are associated with.
        sessionBean.getConfigurators().addLast(new JAXRPCHandlersConfigurator());
        final ServiceName ejbViewName = ejbViewDescription.getServiceName();

        return new EJBEndpoint(sessionBean, ejbViewName, securityRoles, null, false, null);
    }
View Full Code Here

/**
* @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
*/
public class StatefulSessionSynchronizationInterceptorTestCase {
    private static AccessTimeoutDetails defaultAccessTimeout() {
        return new AccessTimeoutDetails(5, TimeUnit.MINUTES);
    }
View Full Code Here

    public void test1() {
        StatelessObjectFactory<MockBean> factory = new MockFactory();
        Pool<MockBean> pool = new StrictMaxPool<MockBean>(factory, 10, 1, TimeUnit.SECONDS);
        pool.start();

        MockBean beans[] = new MockBean[10];
        for (int i = 0; i < beans.length; i++) {
            beans[i] = pool.get();
        }

        for (int i = 0; i < beans.length; i++) {
View Full Code Here



        Callable<Void> task = new Callable<Void>() {
            public Void call() throws Exception {
                MockBean bean = pool.get();
                ready.countDown();
                in.await();
                pool.release(bean);

                bean = null;
View Full Code Here

    public void testTooMany() {
        StatelessObjectFactory<MockBean> factory = new MockFactory();
        Pool<MockBean> pool = new StrictMaxPool<MockBean>(factory, 10, 1, TimeUnit.SECONDS);
        pool.start();

        MockBean beans[] = new MockBean[10];
        for (int i = 0; i < beans.length; i++) {
            beans[i] = pool.get();
        }

        try {
View Full Code Here

        MockBean.reset();
        used = new AtomicInteger(0);
    }

    public void test1() {
        StatelessObjectFactory<MockBean> factory = new MockFactory();
        Pool<MockBean> pool = new StrictMaxPool<MockBean>(factory, 10, 1, TimeUnit.SECONDS);
        pool.start();

        MockBean beans[] = new MockBean[10];
        for (int i = 0; i < beans.length; i++) {
View Full Code Here

    /**
     * More threads than the pool size.
     */
    public void testMultiThread() throws Exception {
        StatelessObjectFactory<MockBean> factory = new MockFactory();
        final Pool<MockBean> pool = new StrictMaxPool<MockBean>(factory, 10, 60, TimeUnit.SECONDS);
        pool.start();

        final CountDownLatch in = new CountDownLatch(1);
        final CountDownLatch ready = new CountDownLatch(10);
View Full Code Here

        assertEquals(10, MockBean.getPostConstructs());
        assertEquals(10, MockBean.getPreDestroys());
    }

    public void testTooMany() {
        StatelessObjectFactory<MockBean> factory = new MockFactory();
        Pool<MockBean> pool = new StrictMaxPool<MockBean>(factory, 10, 1, TimeUnit.SECONDS);
        pool.start();

        MockBean beans[] = new MockBean[10];
        for (int i = 0; i < beans.length; i++) {
View Full Code Here

        ScheduleExpression everySecondExpression = this.getTimezoneSpecificScheduleExpression();
        everySecondExpression.second("*");
        everySecondExpression.minute("*");
        everySecondExpression.hour("*");

        CalendarBasedTimeout calendarTimeout = new CalendarBasedTimeout(everySecondExpression);

        Calendar firstTimeout = calendarTimeout.getFirstTimeout();
        Calendar nextTimeout = calendarTimeout.getNextTimeout(firstTimeout);

        Assert.assertNotNull("Next timeout is null", nextTimeout);
        Assert.assertNotNull("Next timeout is *before* the current time", nextTimeout.after(firstTimeout));
        logger.debug("Previous timeout was: " + firstTimeout.getTime() + " Next timeout is " + nextTimeout.getTime());
        long diff = nextTimeout.getTimeInMillis() - firstTimeout.getTimeInMillis();
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.component.EJBComponentDescription$Ejb2ViewTypeConfigurator

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.