2 Replies Latest reply: Jan 17, 2013 7:18 AM by vanna RSS

    Shared application module datasource and EnvInfoProvider

    vanna
      Hi,
      I have 2 different applications deployed on weblogic server. These applications use different datasources.

      I also have one ADF Library Jar which has shared application module for lookup data. Datasource in this appModule is dynamicaly set with EnvInfoProvider as explained here:
      http://dailydevfixes.blogspot.com/2011/09/using-environment-info-provider-to.html

      When application is deployed, this Library is packaged within application war file and put on server. At first both of the applications work fine, but after a while (one day),
      the Shared appModule of second application gets connected to the wrong datasource: (to the datasource of first application). This problem occurs only with Shared application module.

      JDeveloper Version: 11.1.2.1.0
      weblogic: 10.3.5.0
        • 1. Re: Shared application module datasource and EnvInfoProvider
          Frank Nimphius-Oracle
          Hi,

          have you verified (e.g. using a print statement) that the two applications run their own instance of the shared AM ?

          Frank
          • 2. Re: Shared application module datasource and EnvInfoProvider
            vanna
            I did. It looks like each application uses its own instance of shared appModule but this module gets connected to the wrong datasource.

            I think the problem is in this method:
            createRootApplicationModule(java.lang.String qualifiedAMDefName, java.lang.String configName).

            I changed it to
            createRootApplicationModule(java.lang.String qualifiedAMDefName, java.lang.String configName, EnvInfoProvider envInfo)
            where envInfo = new MyDynamicEnvInfoProvider().
            It seems to be working so far.

            I am using this method because I have:
            - Localized labels of view attributes in the database.
            - Adf Library with Shared Application module to get those labels.
            - CommonCode project with MyViewDefImpl class which is extended by View Definition. In this class createRootApplicationModule is called, to get labels from database.