private boolean isStandAlone(final ApplicationClientDescriptor ac) { /* * For a non-deployed app (this case), the descriptor for a stand-alone * app client has a null application value. */ return (ac.getApplication() == null || ac.isStandalone()); }
private boolean isStandAlone(final ApplicationClientDescriptor ac) { /* * For a non-deployed app (this case), the descriptor for a stand-alone * app client has a null application value. */ return (ac.getApplication() == null || ac.isStandalone()); }
private void addOtherNondeployedScanTargets(final ReadableArchive clientArchive, final ApplicationClientDescriptor acDescr, final Map<String,ReadableArchive> candidates) { /* * The archive is a non-deployed one. We know from an earlier check * that this is not a stand-alone app client, so we can use the * app client archive's parent archive to get to the containing EAR for * use in a subarchive scanner. */ final ReadableArchive earArchive = clientArchive.getParentArchive(); EARBasedPersistenceHelper.addLibraryAndTopLevelCandidates(earArchive, acDescr.getApplication(), true, candidates); }
private void addOtherNondeployedScanTargets(final ReadableArchive clientArchive, final ApplicationClientDescriptor acDescr, final Map<String,ReadableArchive> candidates) { /* * The archive is a non-deployed one. We know from an earlier check * that this is not a stand-alone app client, so we can use the * app client archive's parent archive to get to the containing EAR for * use in a subarchive scanner. */ final ReadableArchive earArchive = clientArchive.getParentArchive(); EARBasedPersistenceHelper.addLibraryAndTopLevelCandidates(earArchive, acDescr.getApplication(), true, candidates); }
public static Application getApplicationFromEnv(JndiNameEnvironment env) { Application app = null; if (env instanceof EjbDescriptor) { // EJB component EjbDescriptor ejbEnv = (EjbDescriptor) env; app = ejbEnv.getApplication(); } else if (env instanceof EjbBundleDescriptor) { EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) env; app = ejbBundle.getApplication(); } else if (env instanceof WebBundleDescriptor) { WebBundleDescriptor webEnv = (WebBundleDescriptor) env; app = webEnv.getApplication(); } else if (env instanceof ApplicationClientDescriptor) { ApplicationClientDescriptor appEnv = (ApplicationClientDescriptor) env; app = appEnv.getApplication(); } else if (env instanceof ManagedBeanDescriptor) { ManagedBeanDescriptor mb = (ManagedBeanDescriptor) env; app = mb.getBundle().getApplication(); } else if (env instanceof Application) { app = ((Application) env); } else { throw new IllegalArgumentException("IllegalJndiNameEnvironment : env"); } return app; }
private Application getApplicationFromEnv(JndiNameEnvironment env) { Application app = null; if (env instanceof EjbDescriptor) { // EJB component EjbDescriptor ejbEnv = (EjbDescriptor) env; app = ejbEnv.getApplication(); } else if ( env instanceof EjbBundleDescriptor ) { EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) env; app = ejbBundle.getApplication(); } else if (env instanceof WebBundleDescriptor) { WebBundleDescriptor webEnv = (WebBundleDescriptor) env; app = webEnv.getApplication(); } else if (env instanceof ApplicationClientDescriptor) { ApplicationClientDescriptor appEnv = (ApplicationClientDescriptor) env; app= appEnv.getApplication(); } else if ( env instanceof ManagedBeanDescriptor ) { ManagedBeanDescriptor mb = (ManagedBeanDescriptor) env; app = mb.getBundle().getApplication(); } else if ( env instanceof Application ) { app = ((Application)env); } else { throw new IllegalArgumentException("IllegalJndiNameEnvironment : env"); } return app; }
@Override public void accept(ApplicationClientDescriptor appclientdescriptor) { bundleDescriptor = appclientdescriptor; application = appclientdescriptor.getApplication(); // set the default lifecycle callback class for (LifecycleCallbackDescriptor next : appclientdescriptor.getPreDestroyDescriptors()) { next.setDefaultLifecycleCallbackClass( appclientdescriptor.getMainClassName()); } for (LifecycleCallbackDescriptor next : appclientdescriptor.getPostConstructDescriptors()) { next.setDefaultLifecycleCallbackClass( appclientdescriptor.getMainClassName()); } } }