質問

I have two deployment environments - Websphere 7.0 and Glassfish 3.1. I have to include a work manager resource reference in the web.xml of my applications for the Websphere environment like so:

<resource-ref>
    <description>WorkManager</description>
    <res-ref-name>wm/default</res-ref-name>
    <res-type>commonj.work.WorkManager</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

However, I do not need it for GlassFish since GlassFish doesn't force the j2ee specifications about having the application server manage all the threads. (Besides GlassFish doesn't have commonj either...)

I found that there is a glassfish-web.xml for specifying additional components to the web.xml for a GlassFish-specific environment. Something like this for Websphere would be ideal.

Does an equivalent exist for Websphere?

Thanks.

役に立ちましたか?

解決

The IBM descriptor files (such as ibm-web-bnd.xml, as @david mentioned) only allow you to map existing resources that are already defined in your application (i.e. via deployment descriptors such as web.xml or annotations such as @Resource), to my knowledge. @faffy, you want the ability to add a new resource reference that is not already defined in your application, correct? If so, I don't believe that the ibm-web-bnd.xml or any other IBM descriptors let you do that.

It's less than ideal, but since WorkManagers are not yet part of the EE spec, you may need to create an alternate EAR/WAR assembly for deploying your application to app servers (such as WAS) where you need the WorkManager. To help minimize some duplication and effort, you could consider using an alternate deployment descriptor (alt-dd) so that you only need to reassemble the EAR, but not the WAR.

他のヒント

It's the ibm-web-bnd.xml. This redbook seems to describe app packaging for WAS, including structure of that file.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top