public ClientModule deploy(final ClientModule clientModule) throws OpenEJBException { clientModule.setApplicationClient(new ApplicationClient()); if (clientModule.getApplicationClient() != null && clientModule.getApplicationClient().isMetadataComplete()) { return clientModule; clientModule.setApplicationClient(new ApplicationClient());
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); } }
private void validateRemoteClientRefs(ClassLoader classLoader, ApplicationClient client, Set<Class> remoteClients) { for (EjbLocalRef ref : client.getEjbLocalRef()) { for (InjectionTarget target : ref.getInjectionTarget()) { try { for (PersistenceContextRef ref : client.getPersistenceContextRef()) { for (InjectionTarget target : ref.getInjectionTarget()) { try { unusableTypes.remove("javax.jms.Queue"); for (ResourceEnvRef ref : client.getResourceEnvRef()) {
private void validateRemoteClientRefs(final ClassLoader classLoader, final ApplicationClient client, final Set<Class> remoteClients) { for (final EjbLocalRef ref : client.getEjbLocalRef()) { for (final InjectionTarget target : ref.getInjectionTarget()) { try { for (final PersistenceContextRef ref : client.getPersistenceContextRef()) { for (final InjectionTarget target : ref.getInjectionTarget()) { try {
Map<String,org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap(); ejbRef.setEjbRefName(refName); refMap.put(refName, ejbRef); applicationClient.getEjbRef().add(ejbRef); resEnvMap.putAll(applicationClient.getResourceEnvRefMap()); resEnvMap.putAll(applicationClient.getMessageDestinationRefMap()); Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap(); for (org.apache.openejb.jee.sun.ServiceRef ref : sunApplicationClient.getServiceRef()) { String refName = ref.getServiceRefName();
for (MessageDestination destination : clientModule.getApplicationClient().getMessageDestination()) { destinationResolver.add(moduleId, destination.getMessageDestinationName(), destination); for (MessageDestinationRef ref : clientModule.getApplicationClient().getMessageDestinationRef()) { String destinationId = resolveDestinationId(ref, moduleUri, destinationResolver, destinationTypes); if (destinationId != null) {
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; } }
final Map<String, org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap(); ejbRef.setEjbRefName(refName); refMap.put(refName, ejbRef); applicationClient.getEjbRef().add(ejbRef); resEnvMap.putAll(applicationClient.getResourceEnvRefMap()); resEnvMap.putAll(applicationClient.getMessageDestinationRefMap()); final Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap(); for (final org.apache.openejb.jee.sun.ServiceRef ref : sunApplicationClient.getServiceRef()) { String refName = ref.getServiceRefName();
for (final MessageDestination destination : clientModule.getApplicationClient().getMessageDestination()) { destinationResolver.add(appModule.getModuleUri(), destination.getMessageDestinationName(), destination); for (final MessageDestinationRef ref : clientModule.getApplicationClient().getMessageDestinationRef()) { final String destinationId = resolveDestinationId(ref, moduleUri, destinationResolver, destinationTypes); if (destinationId != null) {
private void validateRemoteClientRefs(final ClassLoader classLoader, final ApplicationClient client, final Set<Class> remoteClients) { for (final EjbLocalRef ref : client.getEjbLocalRef()) { for (final InjectionTarget target : ref.getInjectionTarget()) { try { for (final PersistenceContextRef ref : client.getPersistenceContextRef()) { for (final InjectionTarget target : ref.getInjectionTarget()) { try {
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; } }
final Map<String, org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap(); ejbRef.setEjbRefName(refName); refMap.put(refName, ejbRef); applicationClient.getEjbRef().add(ejbRef); resEnvMap.putAll(applicationClient.getResourceEnvRefMap()); resEnvMap.putAll(applicationClient.getMessageDestinationRefMap()); final Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap(); for (final org.apache.openejb.jee.sun.ServiceRef ref : sunApplicationClient.getServiceRef()) { String refName = ref.getServiceRefName();
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); } }
public ClientModule deploy(ClientModule clientModule) throws OpenEJBException { clientModule.setApplicationClient(new ApplicationClient()); if (clientModule.getApplicationClient() != null && clientModule.getApplicationClient().isMetadataComplete()) return clientModule; clientModule.setApplicationClient(new ApplicationClient());
for (final MessageDestination destination : clientModule.getApplicationClient().getMessageDestination()) { destinationResolver.add(appModule.getModuleUri(), destination.getMessageDestinationName(), destination); for (final MessageDestinationRef ref : clientModule.getApplicationClient().getMessageDestinationRef()) { final String destinationId = resolveDestinationId(ref, moduleUri, destinationResolver, destinationTypes); if (destinationId != null) {
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; } }
final Map<String, org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap(); ejbRef.setEjbRefName(refName); refMap.put(refName, ejbRef); applicationClient.getEjbRef().add(ejbRef); resEnvMap.putAll(applicationClient.getResourceEnvRefMap()); resEnvMap.putAll(applicationClient.getMessageDestinationRefMap()); final Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap(); for (final org.apache.openejb.jee.sun.ServiceRef ref : sunApplication.getServiceRef()) { String refName = ref.getServiceRefName();
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); } }
public ClientModule deploy(final ClientModule clientModule) throws OpenEJBException { clientModule.setApplicationClient(new ApplicationClient()); if (clientModule.getApplicationClient() != null && clientModule.getApplicationClient().isMetadataComplete()) { return clientModule; clientModule.setApplicationClient(new ApplicationClient());
private void readAppClient(ClientModule clientModule, AppModule appModule) throws OpenEJBException { if (clientModule.getApplicationClient() != null) return; Object data = clientModule.getAltDDs().get("application-client.xml"); if (data instanceof ApplicationClient) { clientModule.setApplicationClient((ApplicationClient) data); } else if (data instanceof URL) { URL url = (URL) data; ApplicationClient applicationClient = readApplicationClient(url); clientModule.setApplicationClient(applicationClient); } else { if (!clientModule.isEjbModuleGenerated()) { DeploymentLoader.logger.debug("No application-client.xml found assuming annotations present: " + appModule.getJarLocation() + ", module: " + clientModule.getModuleId()); clientModule.setApplicationClient(new ApplicationClient()); } } }