2

Spring で SPEL を使用して、Resource Environment Entries カスタム プロパティにアクセスできますか? それとも、参照可能なリソース プロバイダーへの jndi ルックアップで構成されたものを使用しますか?

コンテナーの詳細

リソース環境プロバイダー:プロバイダー

参照可能なもの: com.ibm.acme.ree.lib.ConfigNoCache

リソース環境 JNDI 名: rep/provider/TestEntry/ResourceReference

カスタム プロパティ: mqPort

ibm-ejb-jar-bnd.xml 内の構成

    <session name="testBean">
    <resource-env-ref name="config"
        binding-name="rep/provider/TestEntry/ResourceReference" />
</session>

このようなことを試みてリソース環境参照をロードするので、春にプレースホルダーを使用します。

<bean id="envConfig" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
   <!-- add JNDI based properties exposed by the container -->
   <property name="properties">
        <bean class="java.util.Properties">
            <constructor-arg>
                <map>
                    <entry key="mqPort">
                        <jee:jndi-lookup jndi-name="java:rep/provider/TestEntry/ResourceReference"/>
                    </entry>
                </map>
            </constructor-arg>
        </bean>
    </property>
</bean>

古い方法で行う参照記事: https://blogs.perficient.com/ibm/2012/05/01/using-wps-style-resource-environment-providers-with-spring/

4

0 に答える 0