WebSphere Liberty excessive startup time -


i'm trying configure ibm websphere liberty server (16.0.0.3) 1 of our applications runs there, but, besides obvious unreliability, server takes time start. clear on log files:

[17-11-2016 15:54:16:231 gmt] 0000001c com.ibm.ws.webcontainer.security.servletstartedlistener      cwwks9122i:  url /* in application com.ibm.ws.jmx.connector.server.rest, following http methods uncovered, , accessible: head options trace  [17-11-2016 15:56:18:349 gmt] 0000001b org.jboss.weld.event                                         weld-000411: observer method [backedannotatedmethod] public org.omnifaces.vetoannotatedtypeextension.processannotatedtype(@observes processannotatedtype<t>) receives events annotated types. consider restricting events using @withannotations or generic type bounds. [17-11-2016 15:56:19:798 gmt] 0000001b com.ibm.ws.ejbcontainer.osgi.internal.ejbruntimeimpl         cntr4000i: allplexejbeans-v2.jar ejb module in ecc application starting. 

as can see, there more 2 minutes separating first 2 lines, ridiculous, considering small application.

what can speed before giving on liberty profile?

cdi useful, cross-cutting technology, part of cdi engine potentially needs scan every single class in application see , isn't cdi bean , interpret other annotations, etc.

to improve liberty startup time limiting cdi scanning

two approaches:

1. if wish use cdi in applications, not in others

tell cdi scan applications contain beans.xml file. disable "implicit" bean archives in liberty including in server config (server.xml)

<cdi12 enableimplicitbeanarchives="false"/>

see here bit more discussion.

2. if don't wish use cdi @ all, remove cdi feature server config.

as brett kail pointed out, if application in server and/or don't want or need cdi @ all, can remove cdi-1.2 feature altogether <featuremanager>. pointed out, aware of features webprofile-7.0 or javaee-7.0 include cdi-1.2 feature.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -