Skip to main content

Posts

Showing posts from April, 2013

What you may need to know while calling Application Module methods from Java EE components such as EJB and MDB

Update on 11 Dec 2014

While discussing some weird issues centered around invocation of AM from non ADF client such as EJB, MDB etc, ADF development team pointed our that more safer way of calling AM is through ADF binding as discussed here: https://blogs.oracle.com/jdevotnharvest/entry/when_to_use_createrootapplicationmodule_in_oracle_adf
----------------------------------------------------------------------------------------------------------------------

A couple of years back I blogged about Calling Application Module Methods from EJB and MDB. Recently I learned that when a non web client invokes methods defined in EJB or MDB that uses Application Module, it may results in some unexpected ClassCastException  for DefLocaleContext. The error stack may look like as listed below.
Caused by: java.lang.ClassCastException: oracle.jbo.common.DefLocaleContext cannot be cast to oracle.jbo.common.DefLocaleContext at oracle.jbo.common.DefLocaleContext.getInstance(DefLocaleContext.java:84) 

The…