public AppModule deploy(final AppModule appModule) throws OpenEJBException { final List<ClientModule> clientModules = new ArrayList<ClientModule>(appModule.getClientModules()); for (final ClientModule clientModule : clientModules) { // we automatically add a ClientModule to every EjbModule // if there didn't turn out to be any clients in the module // just ingore it and remove it from the clientModule list final boolean haveMainClassAndDescriptor = clientModule.getMainClass() != null && clientModule.getApplicationClient() != null; final boolean haveAnnotatedClients = clientModule.getLocalClients().size() > 0 || clientModule.getRemoteClients().size() > 0; if (clientModule.isEjbModuleGenerated() && !haveMainClassAndDescriptor && !haveAnnotatedClients) { 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; } }
public AppModule deploy(final AppModule appModule) throws OpenEJBException { final List<ClientModule> clientModules = new ArrayList<ClientModule>(appModule.getClientModules()); for (final ClientModule clientModule : clientModules) { // we automatically add a ClientModule to every EjbModule // if there didn't turn out to be any clients in the module // just ingore it and remove it from the clientModule list final boolean haveMainClassAndDescriptor = clientModule.getMainClass() != null && clientModule.getApplicationClient() != null; final boolean haveAnnotatedClients = clientModule.getLocalClients().size() > 0 || clientModule.getRemoteClients().size() > 0; if (clientModule.isEjbModuleGenerated() && !haveMainClassAndDescriptor && !haveAnnotatedClients) { 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; } }
public AppModule deploy(AppModule appModule) throws OpenEJBException { List<ClientModule> clientModules = new ArrayList<ClientModule>(appModule.getClientModules()); for (ClientModule clientModule : clientModules) { // we automatically add a ClientModule to every EjbModule // if there didn't turn out to be any clients in the module // just ingore it and remove it from the clientModule list boolean haveMainClassAndDescriptor = clientModule.getMainClass() != null && clientModule.getApplicationClient() != null; boolean haveAnnotatedClients = clientModule.getLocalClients().size() > 0 || clientModule.getRemoteClients().size() > 0; if (clientModule.isEjbModuleGenerated() && !haveMainClassAndDescriptor && !haveAnnotatedClients) { 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; } }
private void buildClientModules(AppModule appModule, AppInfo appInfo, JndiEncInfoBuilder jndiEncInfoBuilder) throws OpenEJBException { for (ClientModule clientModule : appModule.getClientModules()) { ApplicationClient applicationClient = clientModule.getApplicationClient(); ClientInfo clientInfo = new ClientInfo(); clientInfo.description = applicationClient.getDescription(); clientInfo.displayName = applicationClient.getDisplayName(); clientInfo.codebase = clientModule.getJarLocation(); clientInfo.mainClass = clientModule.getMainClass(); clientInfo.localClients.addAll(clientModule.getLocalClients()); clientInfo.remoteClients.addAll(clientModule.getRemoteClients()); clientInfo.callbackHandler = applicationClient.getCallbackHandler(); clientInfo.moduleId = getClientModuleId(clientModule); clientInfo.watchedResources.addAll(clientModule.getWatchedResources()); clientInfo.jndiEnc = jndiEncInfoBuilder.build(applicationClient, clientModule.getJarLocation(), clientInfo.moduleId); appInfo.clients.add(clientInfo); } }
if (clientModule.getMainClass() != null) { final String className = realClassName(clientModule.getMainClass()); if (clientModule.getMainClass().contains("/")) { // className can't be null here clientModule.setMainClass(className);
private void buildClientModules(final AppModule appModule, final AppInfo appInfo, final JndiEncInfoBuilder jndiEncInfoBuilder) throws OpenEJBException { for (final ClientModule clientModule : appModule.getClientModules()) { final ApplicationClient applicationClient = clientModule.getApplicationClient(); final ClientInfo clientInfo = new ClientInfo(); clientInfo.description = applicationClient.getDescription(); clientInfo.displayName = applicationClient.getDisplayName(); clientInfo.path = clientModule.getJarLocation(); clientInfo.mainClass = clientModule.getMainClass(); clientInfo.localClients.addAll(clientModule.getLocalClients()); clientInfo.remoteClients.addAll(clientModule.getRemoteClients()); clientInfo.callbackHandler = applicationClient.getCallbackHandler(); clientInfo.moduleId = getClientModuleId(clientModule); clientInfo.watchedResources.addAll(clientModule.getWatchedResources()); clientInfo.validationInfo = ValidatorBuilder.getInfo(clientModule.getValidationConfig()); clientInfo.uniqueId = clientModule.getUniqueId(); jndiEncInfoBuilder.build(applicationClient, clientModule.getJarLocation(), clientInfo.moduleId, clientModule.getModuleUri(), clientInfo.jndiEnc, clientInfo.jndiEnc); appInfo.clients.add(clientInfo); } }
private void buildClientModules(final AppModule appModule, final AppInfo appInfo, final JndiEncInfoBuilder jndiEncInfoBuilder) throws OpenEJBException { for (final ClientModule clientModule : appModule.getClientModules()) { final ApplicationClient applicationClient = clientModule.getApplicationClient(); final ClientInfo clientInfo = new ClientInfo(); clientInfo.description = applicationClient.getDescription(); clientInfo.displayName = applicationClient.getDisplayName(); clientInfo.path = clientModule.getJarLocation(); clientInfo.mainClass = clientModule.getMainClass(); clientInfo.localClients.addAll(clientModule.getLocalClients()); clientInfo.remoteClients.addAll(clientModule.getRemoteClients()); clientInfo.callbackHandler = applicationClient.getCallbackHandler(); clientInfo.moduleId = getClientModuleId(clientModule); clientInfo.watchedResources.addAll(clientModule.getWatchedResources()); clientInfo.validationInfo = ValidatorBuilder.getInfo(clientModule.getValidationConfig()); clientInfo.uniqueId = clientModule.getUniqueId(); jndiEncInfoBuilder.build(applicationClient, clientModule.getJarLocation(), clientInfo.moduleId, clientModule.getModuleUri(), clientInfo.jndiEnc, clientInfo.jndiEnc); appInfo.clients.add(clientInfo); } }
if (clientModule.getMainClass() != null){ String className = clientModule.getMainClass();
if (clientModule.getMainClass() != null) { final String className = realClassName(clientModule.getMainClass()); if (clientModule.getMainClass().contains("/")) { // className can't be null here clientModule.setMainClass(className);