开发者

What is the ejb-jar.xml equivalent of @Postconstruct?

开发者 https://www.devze.com 2023-02-08 13:06 出处:网络
I have an MDB with a meth开发者_如何学JAVAod annotated as @Postconstruct. It was being executed OK.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消