Global Application Environment Entries

In declaring environment entries, is there a way to declare one that is global
to all the beans in an application?.. Currently, I'm declaring them as follows:
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>LMRPackageBQEJB</ejb-name>
<home>LMRPackageBQSLBean.LMRPackageBQHome</home>
<remote>LMRPackageBQSLBean.LMRPackageBQ</remote>
<ejb-class>LMRPackageBQSLBean.LMRPackageBQBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
     <env-entry-name>DB_SCHEMA_NAME_BQ</env-entry-name>
     <env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>lmrdba</env-entry-value>
     </env-entry>
     <resource-ref>
<res-ref-name>jdbc/LMR_DB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
<session>.....
How can this be changed?
Thanks

Hi,
I never tried it, but I think you should be able to set it up as a datasource configured in teh j2ee/home/config directory of OC4J. There is an existing datasources file already
Frank

Similar Messages

  • JNDI Environment Entries

    We're porting a web application from Tomcat 4.1.x to WL 7.x. The application requires
    several environment entries that we would like to keep outside of property files...
    In Tomcat, we used the <Environment> tag of the <Context>. TC would bind these
    entries into the application's local JNDI tree and the application would access
    them through java:comp/env. We would like to do something similar in WL, but we
    haven't been able to spot the mechanism in the docs.
    Even if we have to create the environment values in the global JNDI tree and map
    them locally through weblogic.xml, it would be fine. What we want to achieve is
    making these changes part of the post-build deployment process.
    Any help or a slap upside the head is appreciated - not mention needed. :) Thanks.
    Bon

    Can you refer this page, it might help.
    http://docs.sun.com/source/816-7156-10/agj2eres.html
    http://forum.java.sun.com/thread.jspa?threadID=499983&messageID=2362672
    I am not an expert. Still Cant we use
    <env-entry>
    <env-entry-name>...</env-entry-name>
    ETC
    </env-entry>
    in your web.xml
    and you can use it.
    Check this tag also and see if you can use it.
    Hope this helps

  • Sys_context not working from APEX application / environment

    I am struggling to retrieve a user-defined context value using sys_context(...) from APEX application / environment
    I have created a global context to be used as a storage mechanism for log severity to be recorded.
    CREATE OR REPLACE CONTEXT PA_LOGGER_CTX USING PA_LOGGER ACCESSED GLOBALLY;It is seeded through a function pa_logger.set_severity(1) within the package pa_logger through (excerpt):
      dbms_session.set_context(c_ctx_context_label, c_ctx_severity_label, TO_CHAR(p_severity_in));
      with:
      c_ctx_context_label     CONSTANT NVARCHAR2(16) := 'PA_LOGGER_CTX';
      c_ctx_severity_label    CONSTANT NVARCHAR2(8) := 'SEVERITY';
      p_severity_in   IN  PLS_INTEGERusing the following from sqlplus, other DB-tools, works as expected:
    -- setting it
    BEGIN
      pa_logger.set_severity(2);
    END;
    -- displaying it
    SELECT sys_context('PA_LOGGER_CTX', 'SEVERITY') FROM DUAL;returns 2
    This works from different sessions, different users ... no problem.
    Using it from within an APEX (accessed via embedded gateway/XE11.2 or OHS/11.2.0.2.0 ) application or even from the "SQL Commands" from the APEX Workspace returns a NULL value for :
    SELECT sys_context('PA_LOGGER_CTX', 'SEVERITY') FROM DUAL;And
       SELECT value  FROM GLOBAL_CONTEXT WHERE NAMESPACE='PA_LOGGER_CTX' and ATTRIBUTE = 'SEVERITY';returns the right value, which obviously defies the purpose of using the CONTEXT.
    It is as well possible to set the CONTEXT to a different value, which is picked up outside APEX, but even so using sys_context does not work, always returning NULL
    As a note aside: using sys_context with a standard CONTEXT, e.g. SELECT sys_context('USERENV', 'NLS_DATE_FORMAT') from DUAL works without any problems.
    I guess I have a conceptual break somewhere. Does this have to do with the APEX user used, wrapping within the APEX environment, the way the context is defined ....
    Any help is appreciated.
    Many thanks,
    - Thomas

    Hi Rod,
    Thanks for the time to answer. Meanwhile I found some more hints on the subject (Retrieve values from my own global context in Apex and I do now understand the concept.
    I understand that I can even clear the specific CLIENT_IDENTIFIER by issuing a "dbms_session.clear_identifier()", which then subsequently works
    Looking at the CLIENT_IDENTIFIER as set by APEX it is "<apex_login_user><apex_session>";
    I understand it is set for every DISPLAY-SUBMIT it is reset by the APEX framework.
    Hence it is not sufficient to set it for a user session; it needs to be changed for every display-submit. I can achieve this through application processes, but I am really reluctant to do so, because I do not know, if APEX relies on the CLIENT_IDENTIFIER to be set the way it is done. I suspect a purpose behind this, causing me problems elsewhere. I post this as a seprate question as this question has been answered.
    On to your point about: Using a table variable. This is the way it works currently, but allegedly using the CONTEXT would give us for the logging configuration a performance gain of about 1 dimension..... but unfortunately other problems..
    Thanks!
    - Thomas

  • Global Application Parameters for EJB

    Hello all, I did a search for this on these forums and there are there a TON of threads of developers wanting to implement the classic Singleton pattern so that all EJB's of an application can access "Global Application Parameters". Most of these I've been reading achieve this by workarounds that breakdown at the clustering level, since Singletons won't span multiple JVMs.
    Suppose you deploy an EAR that only has EJB jars, so you don't have access to all the convenience of the web tier (context parameters, context Initialization, etc.), so there is no way for your EJB's to detect/intercept an "Application Startup" event and load any necessary values into a Global Application parameter repository.
    This seems such a widely demanded functionality that I wonder if there now a "best practice" way to achieve equivalent of the Singleton pattern in the EJB world that works nicely in a clustered environment?

    I have the same problem
    Thanks

  • Global Application Contexts - Where to set Client Identifier?

    Hi,
    I am trying to use global application contexts as part of an implementation of fine grain access control.
    This is within an eBusiness Suite environment, specifically CRM, so is a multi-tiered environment.
    Users access both Forms based screens and OA framework screens.
    I believe I need to use global application contexts as users may have multiple database sessions.
    Also, all users will login using the same database login account.
    Provided I can set a unique identifier for a user that persists throughout all their sessions I can make use of the username and client_id parameters of set_context, below:-
    DBMS_SESSION.set_context (namespace => 'XXUOM_CONTEXTS',
    attribute => 'EXEMPT_FROM_VPD_POLICIES',
    VALUE => l_exempt,
    username => USER,
    client_id => pi_user_id);
    The difficulty I am having is finding a suitable place to set the client identifier.
    I am not sure if the value is being cleared by some other code or if the value isn't being set in all sessions.
    I am using:-
    DBMS_SESSION.set_identifier (pi_user_id)
    That I call from after insert triggers on either tables icx_sessions or fnd_logins.
    However, the client identifier is always null when I query it from within the application, via:-
    SELECT SYS_CONTEXT ('USERENV', 'CLIENT_IDENTIFIER') from dual
    If I set the value via a personalisation rule within a Form, then the value remains.
    I would greatly appreciate it if someone can advise me on where I am going wrong.
    Andy

    It's a different patch.
    The patch support have given me is 9275708, FND_GLOBAL.ORG_NAME RETURNS ENGLISH, EVEN WHEN SESSION LANGUAGE IS NOT.
    This patch has been superceded by 12875860, HR SECURITY PROFILE IS NOT SET CORRECTLY.
    So we have applied patch 12875860.
    I've tried to find out from support what happened to the original patch and why it was removed/deleted rather than superceded.
    I have not found it possible to find out what each of these patches does. There's very little documentation on them.
    I have raised an SR.
    The details are 3-4943519401: How to add DBMS_SESSION.SET_IDENTIFIER() to FND_GLOBAL.INITIALIZE.
    The results of:
         select fnd_profile.value('FND_CONNECTION_TAGGING') from dual
         gives nothing on our Release 11 environment.
    select * from fnd_profile_options where profile_option_name = 'FND_CONNECTION_TAGGING';
    gives nothing.
    On Release 12, the results are:
         select fnd_profile.value('FND_CONNECTION_TAGGING') from dual;
         ENABLED
         select * from fnd_profile_options where profile_option_name = 'FND_CONNECTION_TAGGING';
         returns a record.
    Many thanks for continuing to look into this for me.
    Andy

  • Question on clustering and J2EE Environment Entries

    Does anyone know if changes made through the admin server console to J2EE
              environment entries are propagated to the managed servers without
              redeploying the entire app. I can find a reference similar to this for
              things in the config.xml which states they are propagated in memory (in most
              cases) and can optionally be written permanently to the confg.xml file. I
              can't find a reference that tells me how/what is done for J2EE environment
              values.
              If this is not possible, how does one do dynamic configuration setting for a
              J2EE application in a clustered environment?
              Kent
              

    What I'm talking about is the environment entries that are set in the web
              application deployment descriptor (web.xml) from the admin server console.
              You go to a specific web-app in the console and then click on "edit web
              application deployment descriptor". From there (towards the bottom of the
              tree on the left) is Env Entry. You can change Environment Entries in the
              DD. What is unclear is if the values are propagated to the running app
              (in memory). For example, if I have a servlet that reads this environment
              entry and I change it in the admin console is the new value reflected
              (relatively) immediately? It's not entirely clear.
              Since there is an option to "persist" these changes (in the top of the tree)
              that would seem to imply that the changes are propagated to the running
              instances in memory otherwise why would I not want to persist the change?
              On the other hand, I would have also expected a button to let me decide when
              to push the changes so I could control when the managed server know about
              the change (for example, if I had to set more than one property to configure
              something).
              So ... does this make my question clearer? And if so is there any
              documentation the describes this? If not how do people handle configuration
              of a running application in a cluster if it not through DD environment
              entries?
              Kent
              "Cameron Purdy" <[email protected]> wrote in message
              news:[email protected]...
              > > Actually I'm talking about what I would call "environment variables" if
              > this
              > > was unix. I am not talking about files (gifs, html, etc) but rather
              > porpety
              > > settings. It is my understanding that these are call "environment
              > entries"
              > > (but I may remembered the name wrong) and are typed values that can be
              > > looked up vi JNDI.
              >
              > You can programmatically set JNDI entries, and they will usually be
              > propagated (although they are not designed to be reliably replicated).
              > Furthermore, the death of the registering server will cause the death of
              the
              > JNDI entries.
              >
              > I don't know how to set them from the console.
              >
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol, Inc.
              > Clustering Weblogic? You're either using Coherence, or you should be!
              > Download a Tangosol Coherence eval today at http://www.tangosol.com/
              >
              >
              >
              > "Kent Mitchell" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              >
              >
              >
              

  • Utilizing EJB Environment Entries in different runtime env

    Hello
    We are in the process of moving to the NWDI environment.
    Most of our EJBs are using the EJB Environment Entries (defined in the deployment descriptors)
    Some of those EJBs rely on the fact that the same property will have different values in different runtime environments.
    I have noticed that during the import process (from one env to another) done by the CMS there is no option to change those environment varialbles.
    I have also noticed that there is no option to change the values of those environment entries during runtime in the SAPJ2EE 6.40 (that option existed in SAPJ2EE 6.20)
    I just need to get an official answer;
    Is there no way to control the values of the environment entries during deployment with NWDI?
    Do we have to change our code (that relied on J2EE standards) so it does not expect different values in different runtime environments?
    I have an open CSN about this, but no answer there yet...
    <a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smp_custmsg/main.do?event=LOAD&smpsrv=h">CSN 0120025231 0001708443 2005</a>

    hi
    I have the same problem describewd in this <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=45460">SDN thread</a>
    to save you the time, it says that You must add the declaration within the sda-dd.xml
    <substitution-variable>
    <variable-name>com.vendor.yourVarName</variable-name>
    </substitution-variable>
    Note that if you write a Server library this file is displayed by the NWDS
    However, if you are using a J2EE application module, this file is generated during the build and stored into the ear.
    if you try using a substitution variable in your deployment descriptor without specifying it in the sda-dd.xml you get a deployment error -
    com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable
    (see full log message below)
    As a workaround, I edited the sda-dd.xml after the EAR was generated (added the required entry), repacked it and deployed it.
    Then it worked.
    The problem is, if I use NWDI, I CANNOT edit the EAR that gets generated!
    any idea of how to solve this?
    <u>full log message of deployment error</u>
    02/01/2006 13:58:13 /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:
    [001]Deployment aborted
    Settings
    SDM host : zaksrv2
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME1/zak/LOCALS1/Temp/temp19284checkpoint.comtimeofftest5substear.ear
    Result
    => deployment aborted : file:/C:/DOCUME1/zak/LOCALS1/Temp/temp19284checkpoint.comtimeofftest5substear.ear
    Aborted: development component 'timeoff/test5/subst/ear'/'checkpoint.com'/'DEV_TIMEOFF6_D'/'20060102135547':
    Caught exception during application deployment from SAP J2EE Engine's deploy API:
    com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [com.cp.sapGRP].
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).DMEXC)
    Deployment exception : The deployment of at least one item aborted

  • Environment entries

    I store a couple of environment entries in my web.xml file. These are basically a username/password for my OID connection.
    I want other applications to use similar environment entries.
    Is there a file where I can put these entries so any application stored in a paticular container can see them?
    Could I then still do a JNDI lookup to get their values ?
    Thanks Richard

    Hi,
    I never tried it, but I think you should be able to set it up as a datasource configured in teh j2ee/home/config directory of OC4J. There is an existing datasources file already
    Frank

  • Application environment

         Hi,
    my stateless session EJB read application environment (a string)
    from jndi.
    This string value is prepared for saving to jndi by ejb-jar.xml DD :
    <env-entry>
    <env-entry-name>myName</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>myValue</env-entry-value>
    </env-entry>
    SunONE Server 7 writes to log during deployment time :
    FINE ( 1892): Binding name:`java:comp/env/myName`
    but the code (invoked from setSessionContext() method) :
    String value (String)(new InitialContext()).lookup("java:comp/env/myName");
    produces javax.naming.NameNotFoundException
    The session EJB is part of simple application and it works fine
    with J2EE RI 1.3.1 and WebLogic 5.1 too
    (the application is compliant with EJB1.1 and it has been adapted
    for SunONE 7 app-server by asmt migration tool)
    My simple question - where is a problem ?
    Thanks ...
    Libor

    Przemek:
    If you are using the embedded pl/sql gateway with Oracle XE then you might want to read this post. Joel Kallman provides a nice explanation of what needs to be done to improve APEX performance when using the pl/sql gateway.
    Annoying Apex performance problem
    Varad

  • How to add environment entry in EJB3 ejb-jar.xml

    Hi,
    Is that a build in way of add environment entries in JDev for EJB 3 beans? For EJB 2 beans you can do that using properties. But the bean properties is not available in EJB 3. Please help.
    Thanks
    Kenny

    Thank you for the reply. But I need a way to enter env-entry value in ejb-jar.xml for EJB 3 in Jdev. In EJB 2, Jdev generate ejb-jar.xml for the bean and also let you add env-entry through bean's properties menu. But in there in no properties menu for EJB 3, also generated ejb-jar.xml is only a empty file doesn't contain any EJB depolyment information. That means you have to code ejb-jar.xml all manually.
    If I am wrong, can someone show me how to do this right?

  • Best way to manage global application data

    Hello,
    I'm looking for the best way to manage my global application data. I have a program containing about 70 application settings which are loaded from an ini file and organised as clusters and loose variables. I want to be able to use these settings across multiple vi's. The application settings can be modified during execution. Some vi's can change settings and these changes need to be visible accros all vi's.
    What is the best way to manage this. Ideally, I would have one cluster or class containing all the application settings but since the sub vi's run independend, I can't wire them through. 
    From what I've read so far, global variables ain't really well suited for this due to race conditions. The FGV might be a solution but it is not clear to me how to implement this for many variables. (One FGV or multiple FGV's, etc... Does anyone have a good example of this?)
    Are there any other good solutions? Any advice is welcome!
    Best regards,
    Wouter

    You can also create a singleton LVOOP object (maybe a few if you want to logically organize your settings). When you initialize the system you create the object and it uses a DVR internally to store your data. Since this is a singleton object you do not need to wire it through your code. Your subVIs simply call the appropriate methods and it will interact with the class data. A FGV is basically the same thing except that you only have a single VI so you are more limited with your inputs and outputs. A singleton object let's you refine the connector pains based on the methods and what they are doing.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Admin UI for editing environment entries (i.e. env-entry in web.xml)

    Hi there,
    just wanted to know if Weblogic nowadays features a UI for post-deployment editing of environment entries such as the ones declared via <env-entry> in web.xml ( [http://download.oracle.com/docs/cd/E21764_01/web.1111/e13712/web_xml.htm#autoId30] ). So far, I'm using a deployment plan to re-configure these things at the time of each deployment, which works but which is also probably not the most flexible solution.
    Thanks in advance,
    Chris

    Ah, I was trying to do a lookup from session bean for the env-entry defined in
    the web.xml. After reading the J2EE spec, I see this just won't work. env-entries
    are only accessible from within the component where they are defined.
    Still the error message with "comp.env" instead of the expected "comp/env" is
    a bit confusing.
    Not much traffic in this newsgroup, is there?
    Steve
    "Steve Ditlinger" <[email protected]> wrote:
    >
    >
    >
    If I create an "env-entry" block for a name (e.g. "MySchemaName") in
    my web.xml
    file and deploy the web app, I should be able to look up the name from
    my webapp
    with the line:
    <br>
    myInitialContext.lookup("java:comp/env/MySchemaName");
    <br>
    However when I do that I get the error message:
    <br>
    javax.naming.NameNotFoundException: Unable to resolve 'java:comp.env/MySchemaName'
    <br>
    Note that the "comp/env" prefix has been changed to "comp.env". This
    worked under
    WL 6.1. Is this a bug in WL 7's JNDI or a bug in the error message or
    both or
    something else altogether?
    The immediately previous line successfully performs an EJBHome lookup
    using the
    same Initial Context object. The main difference is that the EJBHome
    name is defined
    thru the EJB deployment descriptors, not the web.xml.
    Thanks,
    Steve

  • Global application context available in Real Application Clusters 11G R1?

    Does anyone know if Global application context is availble is 11G R1? We have an application that uses it and I cannot retrieve context from node two for a client_id that was created and set on node one. I thought this was availbale after 10g? Is anyone else doing this?

    found the answer. It's available in 11G R2
    http://download.oracle.com/docs/cd/E11882_01/network.112/e10574/whatsnew.htm#CJADFCBF

  • FORMS in ORACLE APPLICATION environment

    Hello,
    I want to know if a document explaining how to develop a FORM in a ORACLE APPLICATION environment ? ( librairies, package, ... templates ).
    Thanks.
    Romeo.

    I have found :
    http://download-west.oracle.com/docs/cd/B11454_01/11.5.9/acrobat/115devg.pdf
    Romeo.

  • Global Application variable

    How do I set a global application variable in a Swing application?
    Namely
    MDI display opens a new window
    new window sets a variable
    close the new window and return to the MDI window
    MDI window needs to use the variable.
    Note: the new window is is its own class object.

    What are you talking about?
    Static variables are "global".
    In some class (it does not really matter which) define
    a static variable. O.K. now you have a "global"
    variable.
    Some people may say that this is "bad" programming
    practice, but it is what you asked for.public static variables of public classes are 'global' in the sense you can refer to them if anywhere in an application. Public classes are also 'global' in this sense.
    However, we don't call them global variables, they are class variables. A global variable is generally defined to be one that is associated with the running application. It has no context other than that. It can be used anywhere at any time without any qualifications. In other words, the are terrible.
    I had to maintain an application that had 50 or so global variables. Some of these variables represented the exact same piece of information so it was cruicial during modifications to make sure that they were kept in sync. Don't use this type of design.

Maybe you are looking for

  • NH1005, only one device at a time connects to internet

    I just switched my net to suddenlink cable (4mb/down, 512k/up) from a 756k clearwire broadband connection. I'm using the same network setup as before, all my machines set to auto-acquire IP and DNS addresses. Now though, I can only get on the interne

  • Need help choosing Software for a Slide Presentation

    I'd really appreciate some advice....I need to make a slide presentation with an audio soundtrack. There don't need to be any fancy special effects as the slides transition. A simple fade in & out is all I'm looking for. All I need is for some of the

  • Still can't iChat

    Hello again. I just can't get iChat to work with video although text is fine. I'm using a BT Voyager 205 router and my parents (who I'm trying to chat with) have another type of BT Voyager router (I forget the number). We can both connect to appleu3t

  • Deep structure help

    hi I am trying to insert values from a deep structure into a database table. if I have a structure xixi_stvalues which has id which is of type char7 type of type char20 results of type xixi_ttresults <- this is a table, implying that the xixi_stvalue

  • FMS on linux

    hello, i recently installed FMS on my centos, but actually i am having difficult to start the server. #Fields: date   time    x-pid   x-status        x-ctx   x-comment 2012-04-18      18:58:25        2513    (i)2581173      FMS detected IPv6 protocol