What is the ejb-jar.xml equivalent of @Postconstruct?
I have an MDB with a meth开发者_如何学JAVAod 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.
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
精彩评论