繁体   English   中英

WebSphere Liberty 8.5.5.5和8.5.5.6+之间的巨大启动差异

[英]Huge startup difference between WebSphere Liberty 8.5.5.5 and 8.5.5.6+

我有一个标准的Java EE应用程序,我已经将其部署到WAS Liberty 8.5.5.5,但是由于Liberty 8.5.5.6引入了对Java EE 7的支持,因此我决定移植代码。

我不需要进行任何代码更改即可使用WebProfile 7.0功能将项目部署在Liberty 8.5.5.6中。 该项目使用JSF 2.0 +,JPA 2.0 +,EJB 3.1+。

我的问题是,启动时间为何有很大差异? 以前,同一应用程序在8.5.5.5中大约需要12秒才能启动,但现在在8.5.5.6+中需要50+秒的时间才能启动。

注意:我正在使用Oracle JDK 1.8.0_45。

8.5.5.5的控制台日志

Launching vamsServer (WebSphere Application Server 8.5.5.5/wlp-1.0.8.cl50520150221-0034) on Java HotSpot(TM) Client VM, version 1.8.0_45-b15 (en_US)
[AUDIT   ] CWWKE0001I: The server vamsServer has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/8.5.5.5/lafiles/en.html
[INFO    ] TRAS0018I: The trace state has been changed. The new trace state is *=audit.
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications. 
[WARNING ] DSRA0174W: Warning: GenericDataStoreHelper is being used.
04:03:55.179 [Default Executor-thread-2] INFO  org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension - Activating CDI extension for Spring Data JPA repositories.
04:03:55.349 [Default Executor-thread-2] INFO  org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension - Activating CDI extension for Spring Data JPA repositories.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/vams-web/
[AUDIT   ] CWWKZ0001I: Application vams started in 12.187 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [jsf-2.0, ejbLite-3.1, jsp-2.2, managedBeans-1.0, servlet-3.0, ssl-1.0, jndi-1.0, cdi-1.0, localConnector-1.0, jdbc-4.0, appSecurity-2.0, jaxrs-1.1, json-1.0, webProfile-6.0, distributedMap-1.0, beanValidation-1.0, jpa-2.0].
[AUDIT   ] CWWKF0011I: The server vamsServer is ready to run a smarter planet.

8.5.5.6的控制台日志

Launching defaultServer (WebSphere Application Server 8.5.5.6/wlp-1.0.9.cl50620150610-1749) on Java HotSpot(TM) Client VM, version 1.8.0_45-b15 (en_US)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/8.5.5.6/lafiles/en.html
[INFO    ] CWWKE0002I: The kernel started after 1.485 seconds
[INFO    ] CWWKF0007I: Feature update started.
[INFO    ] CWWKS0007I: The security service is starting...
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications. 
[INFO    ] CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host localhost  (IPv4: 127.0.0.1) port 9081.
[INFO    ] CWWKS4105I: LTPA configuration is ready after 0.219 seconds.
[INFO    ] DYNA1001I: WebSphere Dynamic Cache instance named baseCache initialized successfully.
[INFO    ] DYNA1071I: The cache provider default is being used.
[INFO    ] DYNA1056I: Dynamic Cache (object cache) initialized successfully.
[INFO    ] CWWKZ0018I: Starting application labtracker.
[INFO    ] CWWJP9990I: Detected server platform: org.eclipse.persistence.platform.server.was.WebSphere_Liberty_Platform.
[INFO    ] CWWJP9990I: EclipseLink, version: Eclipse Persistence Services - 2.6.0.WAS-v20150513-26196d2
[INFO    ] CWWJP9990I: Not able to detect platform for vendor name [Generic Component Context DataSource0Generic Component Context DataSource : jdbc/labtracker-db]. Defaulting to [org.eclipse.persistence.platform.database.DatabasePlatform]. The database dialect used may not match with the database you are using. Please explicitly provide a platform using property "eclipselink.target-database".
[INFO    ] WELD-000900: SNAPSHOT
[AUDIT   ] CWWKZ0022W: Application labtracker has not started in 29.953 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [jsp-2.3, ejbLite-3.2, managedBeans-1.0, jsf-2.2, beanValidation-1.1, servlet-3.1, ssl-1.0, jndi-1.0, jsonp-1.0, appSecurity-2.0, jdbc-4.1, jaxrs-2.0, javaMail-1.5, jaxrsClient-2.0, el-3.0, json-1.0, cdi-1.2, distributedMap-1.0, webProfile-7.0, websocket-1.1, jpa-2.1].
[INFO    ] CWWKF0008I: Feature update completed in 33.496 seconds.
[AUDIT   ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
05:11:32.977 [Default Executor-thread-13] INFO  org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension - Activating CDI extension for Spring Data JPA repositories.
[WARNING ] WELD-000411: Observer method [BackedAnnotatedMethod] public org.omnifaces.VetoAnnotatedTypeExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[WARNING ] WELD-000411: Observer method [BackedAnnotatedMethod] public com.ibm.ws.beanvalidation.v11.cdi.internal.ValidationExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[WARNING ] WELD-000411: Observer method [BackedAnnotatedMethod] private com.ibm.ws.beanvalidation.v11.cdi.internal.ValidationExtension.internalProcessAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[WARNING ] WELD-000411: Observer method [BackedAnnotatedMethod] protected org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[INFO    ] CNTR4000I: The labtracker.war EJB module in the labtracker application is starting.
[INFO    ] CNTR0167I: The server is binding the au.com.ibm.labtracker.service.impl.UserSvc interface of the UserSvc enterprise bean in the labtracker.war module of the labtracker application.  The binding location is: java:global/labtracker/UserSvc!au.com.ibm.labtracker.service.impl.UserSvc
[INFO    ] CNTR0167I: The server is binding the au.com.ibm.labtracker.service.IUserSvc interface of the UserSvc enterprise bean in the labtracker.war module of the labtracker application.  The binding location is: java:global/labtracker/UserSvc!au.com.ibm.labtracker.service.IUserSvc
[INFO    ] CNTR4001I: The labtracker.war EJB module in the labtracker application has started successfully.
[INFO    ] SRVE0169I: Loading Web Module: labtracker.
[INFO    ] SRVE0250I: Web Module labtracker has been bound to default_host.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9081/labtracker/
[AUDIT   ] CWWKZ0001I: Application labtracker started in 50.783 seconds.

更新如果将以下xml添加到liberty server.xml中,则启动时间将得到显着改善

<cdi12 enableImplicitBeanArchives="false"/>

我想知道减速是否与EclipseLink有关。 请注意,jpa-2.0功能使用Open JPA作为底层JPA提供程序,而jpa-2.1使用EclipseLink。

似乎经过时间的消息与控制台日志中的消息一致(尽管这不能证明任何事情)。 而且我不是专家,但我想知道消息是否:

CWWJP9990I:无法检测供应商名称的平台...

可能与放缓有关。

由于无法同时使用webProfile-7.0功能(包括jpa-2.1)和jpa-2.0,因此遗憾的是,您要么坚持使用EE 6级别功能,要么更深入地了解速度降低的问题。

更不用说CDI也没有区别。 不过,您的应用似乎实际上正在使用CDI注释,因此您可能无法完全将其关闭。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM