Examples of ApplicationClient


Examples of org.apache.openejb.jee.ApplicationClient

                    appModule.getClientModules().remove(clientModule);
                } else if (clientModule.getApplicationClient() == null) {
                    // If we're keeping it, make sure it has an ApplicationClient object.
                    // Several places in the deploy chain check the contents of the JndiConsumer,
                    // which is the ApplicationClient JAXB object for this module type.
                    clientModule.setApplicationClient(new ApplicationClient());
                }
            }

            return appModule;
        }
View Full Code Here

Examples of org.apache.openejb.jee.ApplicationClient

        }

        public ClientModule deploy(final ClientModule clientModule) throws OpenEJBException {

            if (clientModule.getApplicationClient() == null) {
                clientModule.setApplicationClient(new ApplicationClient());
            }

            // Lots of jars have main classes so this might not even be an app client.
            // We're not going to scrape it for @LocalClient or @RemoteClient annotations
            // unless they flag us specifically by adding a META-INF/application-client.xml
            //
            // ClientModules that already have a AnnotationFinder have been generated automatically
            // from an EjbModule, so we don't skip those ever.
            if (clientModule.getFinder() == null && clientModule.getAltDDs().containsKey("application-client.xml")) {
                if (clientModule.getApplicationClient() != null && clientModule.getApplicationClient().isMetadataComplete()) {
                    return clientModule;
                }
            }


            IAnnotationFinder finder = clientModule.getFinder();

            if (finder == null) {
                try {
                    finder = FinderFactory.createFinder(clientModule);
                } catch (final MalformedURLException e) {
                    startupLogger.warning("startup.scrapeFailedForClientModule.url", clientModule.getJarLocation());
                    return clientModule;
                } catch (final Exception e) {
                    startupLogger.warning("startup.scrapeFailedForClientModule", e, clientModule.getJarLocation());
                    return clientModule;
                }
            }

            // This method is also called by the deploy(EjbModule) method to see if those
            // modules have any @LocalClient or @RemoteClient classes
            for (final Annotated<Class<?>> clazz : finder.findMetaAnnotatedClasses(LocalClient.class)) {
                clientModule.getLocalClients().add(clazz.get().getName());
            }

            for (final Annotated<Class<?>> clazz : finder.findMetaAnnotatedClasses(RemoteClient.class)) {
                clientModule.getRemoteClients().add(clazz.get().getName());
            }

            if (clientModule.getApplicationClient() == null) {
                if (clientModule.getRemoteClients().size() > 0 || clientModule.getLocalClients().size() > 0) {
                    clientModule.setApplicationClient(new ApplicationClient());
                }
            }

            return clientModule;
        }
View Full Code Here

Examples of org.apache.openejb.jee.ApplicationClient$JAXB

* @version $Rev$ $Date$
*/
public class ApplicationClientXml {

    public static ApplicationClient unmarshal(final InputStream inputStream) throws Exception {
        return Sxc.unmarshalJavaee(new ApplicationClient$JAXB(), inputStream);
    }
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.