EPM*_*eam 1 startup websphere-liberty
我正在尝试配置IBM WebSphere Liberty服务器(16.0.0.3),以便在其中运行我们的应用程序之一,但是,除了明显的不可靠性之外,该服务器还需要花费很多时间才能启动。这在日志文件中很清楚:
[17-11-2016 15:54:16:231 GMT] 0000001c com.ibm.ws.webcontainer.security.ServletStartedListener I CWWKS9122I: For URL /* in application com.ibm.ws.jmx.connector.server.rest, the following HTTP methods are uncovered, and accessible: HEAD OPTIONS TRACE
[17-11-2016 15:56:18:349 GMT] 0000001b org.jboss.weld.Event I WELD-000411: Observer method [BackedAnnotatedMethod] public org.omnifaces.VetoAnnotatedTypeExtension.processAnnotatedType(@Observes ProcessAnnotatedType<T>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[17-11-2016 15:56:19:798 GMT] 0000001b com.ibm.ws.ejbcontainer.osgi.internal.EJBRuntimeImpl I CNTR4000I: The ALLPLEXEJBeans-v2.jar EJB module in the ECC application is starting.
Run Code Online (Sandbox Code Playgroud)
如您所见,前两行之间的间隔时间超过2分钟,这很荒谬,尤其是考虑到这是一个非常小的应用程序。
在放弃Liberty个人资料之前,我该怎么做才能加快速度?
CDI是一项非常有用的跨领域技术,但作为其中的一部分,CDI引擎可能需要扫描应用程序中的每个类,以查看什么是CDI bean和什么不是CDI bean以及解释其他注释等。
两种方法:
告诉CDI仅扫描包含bean.xml文件的应用程序。通过在服务器配置(server.xml)中包含“隐式” Bean归档文件来禁用Liberty
<cdi12 enableImplicitBeanArchives="false"/>
看到这里更多的讨论。
正如Brett Kail指出的那样,如果这是服务器中唯一的应用程序,并且/或者您根本不需要CDI,则可以从中cdi-1.2完全删除该功能<featureManager>。正如他还指出的那样,请注意诸如webProfile-7.0或javaee-7.0其中包含的cdi-1.2功能。
| 归档时间: |
|
| 查看次数: |
1153 次 |
| 最近记录: |