Examples of EJBLocator


Examples of org.apache.aries.ejb.modelling.EJBLocator

public class EJBLocatorFactoryTest {

  @Test
  public void testGetEJBLocator() {
    EJBLocator locator = EJBLocatorFactory.getEJBLocator();
   
    assertNotNull(locator);
    assertTrue(locator.getClass().getName(), locator instanceof OpenEJBLocator);
  }
View Full Code Here

Examples of org.apache.aries.ejb.modelling.EJBLocator

        return super.loadClass(className);
      }
     
    }.loadClass(EJBLocatorFactory.class.getName());
   
    EJBLocator locator = (EJBLocator) elf.getMethod("getEJBLocator").invoke(null);
   
    assertNotNull(locator);
    assertTrue(locator.getClass().getName(), locator instanceof EJBLocationUnavailable);
  }
View Full Code Here

Examples of org.apache.aries.ejb.modelling.EJBLocator

 
  @Before
  public void setup() {
    modeller = new EJBModeller();

    EJBLocator locator = Skeleton.newMock(EJBLocator.class);
    modeller.setLocator(locator);
   
    ejbLocator = Skeleton.getSkeleton(locator);
   
    bundleLocation = Skeleton.newMock(IDirectory.class);
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

        }
    }

    @Override
    protected void processInvocation(final EJBClientInvocationContext invocation, final EJBReceiverInvocationContext receiverContext) throws Exception {
        final EJBLocator locator = invocation.getLocator();
        final EjbDeploymentInformation ejb = findBean(locator.getAppName(), locator.getModuleName(), locator.getDistinctName(), locator.getBeanName());
        final EJBComponent ejbComponent = ejb.getEjbComponent();

        final Class<?> viewClass = invocation.getViewClass();
        final ComponentView view = ejb.getView(viewClass.getName());
        if (view == null) {
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

                viewClass = Class.forName(this.viewClass, false, viewClassLoader.getValue());
            } catch (ClassNotFoundException ce) {
                throw MESSAGES.failToLoadViewClassEjb(beanName, ce);
            }
        }
        EJBLocator ejbLocator = null;
        if (EJBHome.class.isAssignableFrom(viewClass) || EJBLocalHome.class.isAssignableFrom(viewClass)) {
            ejbLocator = new EJBHomeLocator(viewClass, appName, moduleName, beanName, distinctName);
        } else if (stateful) {
            try {
                ejbLocator = EJBClient.createSession(viewClass, appName, moduleName, beanName, distinctName);
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

            SecurityActions.setContextClassLoader(ejbDeploymentInformation.getDeploymentClassLoader());
            // now switch the CL to the EJB deployment's CL so that the unmarshaller can use the
            // correct CL for the rest of the unmarshalling of the stream
            classLoaderProvider.switchClassLoader(ejbDeploymentInformation.getDeploymentClassLoader());
            // read the Locator
            final EJBLocator locator;
            try {
                locator = (EJBLocator) unMarshaller.readObject();
            } catch (ClassNotFoundException e) {
                throw new RuntimeException(e);
            }
            final String viewClassName = locator.getViewType().getName();
            if (!ejbDeploymentInformation.getViewNames().contains(viewClassName)) {
                this.writeNoSuchEJBFailureMessage(channel, invocationId, appName, moduleName, distinctName, beanName, viewClassName);
                return;
            }
            // TODO: Add a check for remote view
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

        try {
            viewClass = Class.forName(this.viewClass, false, tccl);
        } catch (ClassNotFoundException e) {
            throw MESSAGES.failToLoadViewClassEjb(beanName,e);
        }
        EJBLocator ejbLocator = null;
        if (stateful) {
            final SessionID sessionID;
            try {
                sessionID = EJBClient.createSession(appName, moduleName, beanName, distinctName);
            } catch (Exception e) {
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

        this.contexts.add(context);
    }

    @Override
    protected void processInvocation(final EJBClientInvocationContext<Void> invocation, final EJBReceiverInvocationContext receiverContext) throws Exception {
        final EJBLocator locator = invocation.getLocator();
        final EjbDeploymentInformation ejb = findBean(locator.getAppName(), locator.getModuleName(), locator.getDistinctName(), locator.getBeanName());
        final EJBComponent ejbComponent = ejb.getEjbComponent();

        final Class<?> viewClass = invocation.getViewClass();
        final ComponentView view = ejb.getView(viewClass.getName());
        if (view == null) {
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

                viewClass = Class.forName(this.viewClass, false, viewClassLoader.getValue());
            } catch (ClassNotFoundException ce) {
                throw EjbLogger.ROOT_LOGGER.failToLoadViewClassEjb(beanName, ce);
            }
        }
        EJBLocator ejbLocator = null;
        if (EJBHome.class.isAssignableFrom(viewClass) || EJBLocalHome.class.isAssignableFrom(viewClass)) {
            ejbLocator = new EJBHomeLocator(viewClass, appName, moduleName, beanName, distinctName);
        } else if (stateful) {
            try {
                ejbLocator = EJBClient.createSession(viewClass, appName, moduleName, beanName, distinctName);
View Full Code Here

Examples of org.jboss.ejb.client.EJBLocator

        }
    }

    @Override
    protected void processInvocation(final EJBClientInvocationContext invocation, final EJBReceiverInvocationContext receiverContext) throws Exception {
        final EJBLocator locator = invocation.getLocator();
        final EjbDeploymentInformation ejb = findBean(locator.getAppName(), locator.getModuleName(), locator.getDistinctName(), locator.getBeanName());
        final EJBComponent ejbComponent = ejb.getEjbComponent();

        final Class<?> viewClass = invocation.getViewClass();
        final ComponentView view = ejb.getView(viewClass.getName());
        if (view == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.