Thursday, August 28, 2014

Problems with CDI in Websphere 8.5.5 during startup? the hidden solution... #websphere #ibm

This is not something I invented or discovered on my own, with this post I just want to raise the awareness of this 'major' missing point IMHO in standard Websphere 8.5.5 configuration (and it's fix) and post about it, so it can be indexed and people can find the solution easily, rather than spend countless hours trying to find why their code does not work!!!

Thanks to this IBM forum post, and the user bpaskin who actually spotted the solution in one of the many fixes on Websphere 8.5.5 update releases.(so yes make sure you follow the release fixes)

To cut a long story short, if you are developing towards Websphere 8.5.5 (or 8)  and you have resources like Startup EJB's or startup Servlet listeners and these resources are making use of CDI beans, then you will most probably have problems. Assuming that your deployable archive configuration and the classloading order of your deployed application is correct, make sure to edit your Webpshere's JVM settings and add the following.

Go to Application Application servers > serverX > Process definition > Java Virtual Machine >  
Custom properties and Add
Name: com.ibm.ws.cdi.immediate.ejb.start
Value: true

This will actually initialize the CDI engine soon enough so that CDI functionality is eventually available during startup!

IMHO again, this behavior should become standard when creating a new server /profile rather than making the application server admin, change it.

2 comments:

  1. Περιμενω να δω, ποτε θα μεταναστεύσεις!

    ReplyDelete
  2. Thanks for Information Java is an object-oriented programming language with a built-in application programming interface (API) that can handle graphics and user interfaces and that can be used to create applications or applets. There are many websites and lots of applications that will not work unless you have Java installed, and more are created every day. Java is the fast, secure and more reliable. Java applications are used everywhere from laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet etc. JAVA Online Training

    ReplyDelete