on 09-19-2013 6:00 PM
I have an EAR containing 9 WARs, which is being deployed to a NetWeaver cluster. I am witnessing some unexpected behavior with what seems to be beans being created for each WAR in the EAR. Here is a snippet from the logs:
09/17/13-17:19:26,262 INFO [Application [46]] com.abc.config.AbcApplicationContextInitializer -
09/17/13-17:19:27,156 INFO [Application [46]] com.abc.config.DataSourceJndiConfig - java:comp/env/jdbc/AbcPool is bound to: com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl@56569660
09/17/13-17:19:27,158 INFO [Application [46]] com.abc.config.DataSourceJndiConfig - Lookup class name: com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl
09/17/13-17:19:28,617 INFO [Application [46]] com.abc.s.json.JacksonContextResolver - Initializing JacksonContextResolver...
09/17/13-17:19:28,924 INFO [Application [46]] com.abc.config.ServiceConfig - Printing out AMQP properties...
09/17/13-17:19:28,925 INFO [Application [46]] com.abc.config.ServiceConfig - queue.jobs-runner.computation.prefix:ServiceSetting(super=BaseDomain(key=1, createdDate=null, lastModifiedDate=null, createdByKey=null, lastModifiedByKey=null), name=queue.jobs-runner.computation.prefix, categoryType=General, value=abc-perf.netweaver.queue.jobs-runner.computation)
09/17/13-17:19:28,925 INFO [Application [46]] com.abc.config.ServiceConfig - queue.jobs-runner.notification.prefix:ServiceSetting(super=BaseDomain(key=2, createdDate=null, lastModifiedDate=null, createdByKey=null, lastModifiedByKey=null), name=queue.jobs-runner.notification.prefix, categoryType=General, value=abc-perf.netweaver.queue.jobs-runner.notification)
09/17/13-17:19:29,716 INFO [Application [46]] com.abc.config.AbcServiceConfig - Binding AbcJobsRunnerMessageConsumer to queue.jobs-runner.compute.abc
09/17/13-17:19:29,716 INFO [Application [46]] com.abc.config.AbcServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:29,725 INFO [Application [46]] com.abc.config.AbcServiceConfig - Binding AbcLoadDataMessageConsumer to queue.abc.loadData
09/17/13-17:19:29,725 INFO [Application [46]] com.abc.config.AbcServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:29,727 INFO [Application [46]] com.abc.config.AbcServiceConfig - Binding AbcCalculationMessageConsumer to queue.abc.calculate
09/17/13-17:19:29,727 INFO [Application [46]] com.abc.config.AbcServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:29,731 INFO [Application [46]] com.abc.config.XyzServiceConfig - Binding LoadDataMessageConsumer to queue.ijk.loadData
09/17/13-17:19:29,731 INFO [Application [46]] com.abc.config.XyzServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:29,732 INFO [Application [46]] com.abc.config.XyzServiceConfig - Binding XyzCalculationMessageConsumer to queue.ijk.calculate
09/17/13-17:19:29,732 INFO [Application [46]] com.abc.config.XyzServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:29,734 INFO [Application [46]] com.abc.config.XyzServiceConfig - Binding IjkJobsRunnerMessageConsumer to queue.jobs-runner.compute.ijk
09/17/13-17:19:29,734 INFO [Application [46]] com.abc.config.XyzServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:29,736 INFO [Application [46]] com.abc.s.config.JobsRunnerServiceConfig - Binding JobsRunnerNotificationMessageConsumer to queue.jobs-runner.notification
09/17/13-17:19:29,736 INFO [Application [46]] com.abc.s.config.JobsRunnerServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:30,218 INFO [Application [51]] com.abc.config.AbcApplicationContextInitializer -
09/17/13-17:19:31,051 INFO [Application [51]] com.abc.config.DataSourceJndiConfig - java:comp/env/jdbc/AbcPool is bound to: com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl@56569660
09/17/13-17:19:31,052 INFO [Application [51]] com.abc.config.DataSourceJndiConfig - Lookup class name: com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl
09/17/13-17:19:32,485 INFO [Application [51]] com.abc.s.json.JacksonContextResolver - Initializing JacksonContextResolver...
09/17/13-17:19:32,589 INFO [Application [51]] com.abc.config.ServiceConfig - Printing out AMQP properties...
09/17/13-17:19:32,589 INFO [Application [51]] com.abc.config.ServiceConfig - queue.jobs-runner.computation.prefix:ServiceSetting(super=BaseDomain(key=1, createdDate=null, lastModifiedDate=null, createdByKey=null, lastModifiedByKey=null), name=queue.jobs-runner.computation.prefix, categoryType=General, value=abc-perf.netweaver.queue.jobs-runner.computation)
09/17/13-17:19:32,589 INFO [Application [51]] com.abc.config.ServiceConfig - queue.jobs-runner.notification.prefix:ServiceSetting(super=BaseDomain(key=2, createdDate=null, lastModifiedDate=null, createdByKey=null, lastModifiedByKey=null), name=queue.jobs-runner.notification.prefix, categoryType=General, value=abc-perf.netweaver.queue.jobs-runner.notification)
09/17/13-17:19:33,229 INFO [Application [51]] com.abc.config.AbcServiceConfig - Binding AbcJobsRunnerMessageConsumer to queue.jobs-runner.compute.abc
09/17/13-17:19:33,230 INFO [Application [51]] com.abc.config.AbcServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:33,238 INFO [Application [51]] com.abc.config.AbcServiceConfig - Binding AbcLoadDataMessageConsumer to queue.abc.loadData
09/17/13-17:19:33,238 INFO [Application [51]] com.abc.config.AbcServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:33,240 INFO [Application [51]] com.abc.config.AbcServiceConfig - Binding AbcCalculationMessageConsumer to queue.abc.calculate
09/17/13-17:19:33,240 INFO [Application [51]] com.abc.config.AbcServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:33,244 INFO [Application [51]] com.abc.config.XyzServiceConfig - Binding LoadDataMessageConsumer to queue.ijk.loadData
09/17/13-17:19:33,244 INFO [Application [51]] com.abc.config.XyzServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:33,246 INFO [Application [51]] com.abc.config.XyzServiceConfig - Binding XyzCalculationMessageConsumer to queue.ijk.calculate
09/17/13-17:19:33,246 INFO [Application [51]] com.abc.config.XyzServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:33,247 INFO [Application [51]] com.abc.config.XyzServiceConfig - Binding IjkJobsRunnerMessageConsumer to queue.jobs-runner.compute.ijk
09/17/13-17:19:33,247 INFO [Application [51]] com.abc.config.XyzServiceConfig - Setting number of consumers to: 1
09/17/13-17:19:33,249 INFO [Application [51]] com.abc.s.config.JobsRunnerServiceConfig - Binding JobsRunnerNotificationMessageConsumer to queue.jobs-runner.notification
09/17/13-17:19:33,250 INFO [Application [51]] com.abc.s.config.JobsRunnerServiceConfig - Setting number of consumers to: 1
...
It appears that each WAR is able to see the classpath of all the other WARs. Thus, when Spring initializes our ApplicationContextInitializer<AnnotationConfigWebApplicationContext> and subsequently does a scan for Spring annotations, each web.xml is creating beans that they should not be creating. How can I get NetWeaver to honor that the contents of a WAR are shielded from other WARs in an EAR?
This may have be an issue with Spring not liking the classloader(s) used by NetWeaver. In order to move on, I had to move the WARs into their own EARs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.