Reputation: 38978
I have an MDB with a method annotated as @Postconstruct
. It was being executed OK.
Today I needed to create an ejb-jar.xml
file to configure an <activation-config-property>
at build time (as I can't figure out how to configure an @ActivationConfigProperty
at deploy time - see this question).
After creating the ejb-jar.xml
the container is no longer calling the @Postconstruct
method.
What is the ejb-jar.xml
equivalent of @Postconstruct
? EDIT: Or is it possible to merge annotations with XML config?
I am using WebSphere 7.
Upvotes: 1
Views: 797
Reputation: 38978
I solved my issue by ensuring that the <ejb-name>
matched the MDB class name (sans package). With this in place the @Postconstruct
method is found. See this thread
Upvotes: 1