Defining server specific properties for EJB app

I need to define some properties for my app which have different values depending on the server to which I deploy. Eg. the LDAP server name and port.
When I deploy to my development server it should find the local values of the properties, when I deploy to the live server it needs a different set of values.
What is the simplest way to do this? I obviously don't want the properties to be part of my deployment.
Rob

EJBs are not allowed to read or write files. But they are allowed to read from the JNDI context. The idea is to provide a symbolic name, ie <resource-env-ref>, which contains the value you need.
The startup-classes which could set this value in the JNDI context are best documented in the OC4J User's Guide.
--olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • [svn:bz-trunk] 7643: Add app server specific excludes for jboss5 and websphere7.

    Revision: 7643
    Author:   [email protected]
    Date:     2009-06-08 13:32:14 -0700 (Mon, 08 Jun 2009)
    Log Message:
    Add app server specific excludes for jboss5 and websphere7.
    Modified Paths:
        blazeds/trunk/qa/features/excludes.properties

  • Storing property values specific to an ejb app

    On a Weblogic 102 , how can I store atrributes specific to an ejb. This could contain passwords for other system. Connection Pooling is not an option for the external system, so the password has to be stored some where the EJB can read, preferably not in clear text ? I am trying to keep this property file out of the source code ....

    Hi Mat,
    Not sure whether the following will suit your requirement or not but you can try the following:
    <font color=maroon>Step1). </font>run the "setDomainEnv.sh" in the command Shell.
    <font color=maroon>Step2).</font> Run the following command to encrypt the your EJBUsername and EJBUserPassword
    java weblogic.security.Encrypt ${Clear_Text_Password}
    Example:
    $ java weblogic.security.Encrypt <font color=red>MyEJBUser</font>
    {3DES}0HYiEySifDiz0IcqDhelGA==
    $ java weblogic.security.Encrypt <font color=red>MyEJBPassword</font>
    {3DES}0HYiEySif12hhaqDheSa==
    <font color=maroon>Step3). </font>Now store the above Encrypted USername and Passwords in a properties file (myEjbUsers.properties) like following:
    userOneName={3DES}0HYiEySifDiz0IcqDhelGA==
    userOnePassword={3DES}0HYiEySif12hhaqDheSa==
    <font color=maroon>Step4).</font> Now Place this File some where in your File system ...better if you place it inside the <DOMAIN_HOME> directory....sothat your application can read it Just like following: (No Need to specify the Path of properties file if it is available inside the DOMAIN_HOME root directroy)
    FileReader fr=new FileReader("myEjbUsers.properties");
    <font color=maroon>Step5).</font> Inside your EJB When you get the Username & Password sent by the EJB Client...get them and then Inside your Code Encrypt them and match with the Encrypted values present in your Properties file....
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are Here)

  • Multi-Provider Provider-Specific Properties for Navigational Attributes

    Experts,
    I need to over-ride the naming for a navigational attribute in a multi-provider.
    For non-navigational attributes you simply use the Provider-Specific Properties.  This selection is not available for navigational attributes.
    Is there a different way to apply alternative naming to navigational attributes in a Mult-Provider without affecting the global definition in the base cube.
    Thanks in advance

    No - the users want their own verions of the name as default
    Thanks for the reply

  • JNDI environment properties for EJB in deployment descriptor

    Is it possible to deploy an EJB on weblogic 6.0 such that the EJBHome
    object is bound using JNDI to a different JNDI server such as ldap
    server instead of the weblogic server by specifying JNDI env.
    properties like PROVIDER_URL, INITIAL_CONTEXT_FACTORY in the
    deployment descriptor? That is use the weblogic built-in deployer but
    bind the JNDI names to a different JNDI server. For this, can the
    EJBHome objects be treated as just RMI (over IIOP) objects and bind
    them (stubs of the RMI objects) using the Sun's JNDI service provider.
    The goal is that thereafter the Home JNDI names can be looked up by
    RMI clients and the interface methods invoked.
    Thanks,
    ... arun

    Must I put the war and jar files in the same ear ?
    oh..ft...my boss is killing me ..
    package..repackage...package..repackage..and test ??
    Could anybody tell me how to refer a SLSB without put the webApp
    and the EjbApp together in an Ear file ??
    thanks very much!!!!

  • Defining Server Caching Options for XML?

    Hi all...
    Using CS3, I've created an XSLT fragment to consume an RSS
    feed, and inserted that in a homepage, following this tutorial for
    DW8:
    http://www.adobe.com/devnet/dreamweaver/articles/dw_xsl_rss.html
    It works great, but I'm curious... what do I edit (or add) to
    define caching of the XML on the server? I want to limit it to an
    update every few hours or so, to minimize bandwith usage.
    Thanks for any help, kinda learning this all as I go....
    Oh, and it's a .cfm page, but it's not live yet...

    Nobody knows what Dizzy means. Don't be fooled by his
    response. He is a
    spammer/script kiddy for sure.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "StearmanDriver" <[email protected]> wrote
    in message
    news:g3knj3$ojr$[email protected]..
    > Hey, thanks for the response, Dizzy. I'm not quite sure
    what you mean
    > though.
    > Do you mean the answer can be found in THIS forum? If
    so, do you know
    > where,
    > or what search terms would be used to find it? 'Cause I
    searched quite a
    > bit,
    > and couldn't find anything relevant. That's probably
    because I don't know
    > the
    > proper terms to search for though.
    >
    > Thanks for clarifying...
    >

  • Foreign key fields not getting populated in datacontrol palette for EJB app

    Hi,
    I am quite new to ADF and EJB.I developed a jdeveloper application with JSF and EJB tiers.(I am using jdeveloper 10.1.3.5)
    For database the default HR database is used.I created the entities for the EMPLOYEES and DEPARTMENTS table.
    I also created a session bean and a data control for the session bean.
    I am having a JSF page that receives all the details of a new Employee and insert into database (i.e persistEntity)
    But the Employees constructor from the Data control palette is not populating the MANAGERID and DEPARTMENTID fields which are
    the foreign key constraints for the EMPLOYEES table and hence while trying to persist the entity
    with the auto populated fields an error message is thrown.
    If I used ADF BC instead of EJB then i could populate all the fields including MANAGERID and DEPARTMENTID.
    Is it possible to have two text fields for Manager and Department in the jsf to insert the Employee details with EJB as the Model?.
    If possible how do I bind the values of these fields to the Employees entity object in EJB.
    Kindly need your insights on this.
    Thanks,
    Guna.

    Hi,
    How are you using MANAGER_ID and DEPARTMENT_ID fields, are they exposed as Long (or some other numeric type), or did you map them on the entity, something like this
    @ManyToOne
    private Employee manager; // this by default uses the column named MANAGER_ID
    @ManyToOne
    private Department department; // this by default uses the column named DEPARTMENT_ID
    .... If you mapped them (which is the right way), when you create an employee you should set these attributes before persisting the entity, by using employee.setManager(manager) and employee.setDepartment(department). Then, the foreign keys get populated automatically by your persistence provider (Toplink).
    If you are using data controls, it is a little different process to set the department and manager, but you should take a look at this tutorial http://www.oracle.com/technology/obe/obe11jdev/ps1/ejb/ejb.html , it will hopefully answer a lot of your questions.
    Pedja

  • Opinion on using properties for your app.

    I have a small application which uses a properties file. I want these properties to be global to my application. Throughout the code I may need to refer to the properties.
    I created a singleton class which loads the properties file, and then I created a method for each property. So I access the properties through methods, which return the type I want, such as a String, int, boolean...
    public String getProperty1() {
    public boolean getProperty2() {
    What do you think of this design?

    The only problem I thought I saw with doing something like:
    MyProps.getInt("age");
    Would be that you have all of these hardcoded strings throughout your code. Also, if you make a typo it could create a few run-time bugs. I considered making a static variable and using it like this:
    MyProps.getInt(MyProps.AGE);
    If I needed to also make a small tweak to the actual property name, I only have to change it in one place.
    public static String AGE = "newage";
    I guess this really is only useful if you anticipate you may change some of the wording, which probably isn't that common.

  • VXML SERVER COMMO LIBRARIES FOR CVP APPS DEVELOPMENT

    Hi, can anyone help me with this issue??
    I'm a CVP apps developer, and when I update an CVP application via de updateApp.bat the libraries load the java virtual memory and duplicate them.
    after a few app updates the virtual memory get full and crush.
    I red that the solution is making global the local libraries, son I put them into the C:\Cisco\CVP\VXMLServer\common\lib. and execute the common libraries update batch file.
    When I run the CVP application I have an error, it says that there is no loading the common libraries application and it is not deployed.
    so please can anyone help me with that????
    thanks a lot.

    Can you verify from a browser that
    http://1.1.1.1:7000/CVP/Server?application=HelloWorld
    gets to the first VXML page of the app? does VXMLServer\admin\status.bat show 1 caller in there?
    use
    http://1.1.1.1:7000/CVP/Server?audium_action=hangup
    to disconnect.
    Is the ECC variable long enough?
    I've never heard of this three dots business.
    Regards,
    Geoff

  • Why the 'select & define' doesn't work for some apps? For instance CNN, newsstand.

    As above.

    Sounds like you've probably already looked but the CUPS article in the wiki led me through setting up a printer without any problems.  http://wiki.archlinux.org/index.php/CUPS
    The first section describes how to troubleshoot CUPS and printing problems.
    I've also found a few other posts and links that may help.
    http://hplipopensource.com/hplip-web/mo … eries.html
    http://ubuntuforums.org/showthread.php?t=419163
    Hope this helps!

  • Customer-specific attributes (properties) for processes?

    Hello community,
    I already know how to define customer-specific attributes (properties) for documents stored in Solution Manager using the Document Modelling Workbench. For documents, everything works fine, so far.
    But: I also want to define customer-specific properties for processes. Is this possible? If yes, how do I do that? I cannot find any related configuration options -- neither in SPRO nor in Solution Manager's own project configuration area.
    Thanks in advance,
    Thomas

    Hi,
    In SPRO, naviagete to SAP Solution Manager Implementation Guide -> SAP Solution Manager -> Scenario-Specific Settings -> Implementation/Upgrade -> Blueprint and Configuration -> Object Attributes -> Definition of Customer Attributes for Object Types
    Best regards,
    Jacques.

  • Best Practices for Packaging and Deploying Server-Specific Configurations

    We have some server-specific properties that vary for each server. We'd
    like to have these properties collected together in their own properties
    file (either .properties or .xml is fine).
    What is the best-practices way to package and deploy an application (as an
    ear file), where each server needs some specific properties?
    We'd kind of like to have the server-specific properties file be stored
    external to the ear on the server itself, so that the production folks can
    configure each server's properties at the server. But it appears that an
    application can't access a file external to the ear, or at least we can't
    figure out the magic to do it. If there is a way to do this, please let me
    know how.
    Or do we have to build a unique ear for each server? This is possible, of
    course, but we'd prefer to build one deployment package (ear), and then
    ship that off to each server that is already configured for its specific
    environment. We have some audit requirements where we need to ensure that
    an ear that has been tested by QA is the very same ear that has been
    deployed, but if we have to build one for each server, this is not
    possible.
    Any help or pointers would be most appreciated. If this is an old issue,
    my apologies, would you please point me to any previous material to read?
    I didn't see anything after searching through this group's archives.
    Thanks much in advance,
    Paul
    Paul Hodgetts -- Principal Consultant
    Agile Logic -- www.agilelogic.com
    Consulting, Coaching, Training -- On-Site & Out-Sourced Development
    Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

    The one draw back to this is you have to go all the way back to ant and the
    build system to make changes. You really want these env variables to be
    late binding.
    cheers
    mbg
    "Sai S Prasad" <[email protected]> wrote in message
    news:[email protected]...
    >
    Paul,
    I have a similar situation in our project and I don't create ear filesspecific
    to the environment. I do the following:
    1) Create .properties file for every environment with the same attributename
    but different values in it. For example, I have phoneix.properties.NT,phoenix.properties.DEV,
    phoenix.properties.QA, phoenix.properties.PROD.
    2) Use Ant to compile, package and deploy the ear file
    I have a .bat file in NT and .sh for Solaris that in turn calls theant.bat or
    ant.sh respectively. For the wrapper batch file or shell script, you canpass
    the name of the environment. The wrapper batch file will copy theappropriate
    properties file to "phonenix.properties". In the ant build.xml, I alwaysrefer
    to phonenix.properties which is available all the time depending on theenvironment.
    >
    It works great and I can't think of any other flexible way. Hope thathelps.
    >
    Paul Hodgetts <[email protected]> wrote:
    We have some server-specific properties that vary for each server. We'd
    like to have these properties collected together in their own properties
    file (either .properties or .xml is fine).
    What is the best-practices way to package and deploy an application (as
    an
    ear file), where each server needs some specific properties?
    We'd kind of like to have the server-specific properties file be stored
    external to the ear on the server itself, so that the production folks
    can
    configure each server's properties at the server. But it appears that
    an
    application can't access a file external to the ear, or at least we can't
    figure out the magic to do it. If there is a way to do this, please
    let me
    know how.
    Or do we have to build a unique ear for each server? This is possible,
    of
    course, but we'd prefer to build one deployment package (ear), and then
    ship that off to each server that is already configured for its specific
    environment. We have some audit requirements where we need to ensure
    that
    an ear that has been tested by QA is the very same ear that has been
    deployed, but if we have to build one for each server, this is not
    possible.
    Any help or pointers would be most appreciated. If this is an old issue,
    my apologies, would you please point me to any previous material to read?
    I didn't see anything after searching through this group's archives.
    Thanks much in advance,
    Paul
    Paul Hodgetts -- Principal Consultant
    Agile Logic -- www.agilelogic.com
    Consulting, Coaching, Training -- On-Site & Out-Sourced Development
    Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

  • How to define specific color for specific data in WebI?

    Hi everybody,
    I wonder how I could connect data shown in e.g. a vertical stacked bar chart to a specific color. The assignment of color in a chart is done by Webi automatically after pulling a a variable to a chart. Later on it is possible to change to color via the color palette. But how can I define a specific color for specific values of an attribute? (E.g. calue is Chicago -> color is blue; value is NY -> color is red.. etc ) Is it possible?
    Does anybody know the trick?
    Thanks in advance!

    Please refer the below links along similar lines .
    [http://www.dagira.com/2007/07/22/alerters-on-charts/]
    [http://www.dagira.com/2007/07/31/alerters-on-charts-part-ii/]
    Regards,
    Bilahari M

  • Clusterwide vs. Server Specific Bean Deployments

              Hello all,
              How is it possible to deploy some EJBs on specific servers within
              a cluster and others clusterwide when the weblogic.ejb.deploy statement
              in the server-specific properties file overwrites the cluster properties
              parameter? Do you end up having to deploy everything on the server
              specific level? Is a bean still truly 'clustered' if listed in
              multiple server specfic properties files (assuming <home-is-clusterable>
              is true)?
              Thanks!
              Matt
              

              Prasad,
              Thanks for your reply. The problem I experience is that if I have
              a ejb.deploy statement in ServerA's properties file, then any deploy
              statements in the [mycluster] level properties file is overwritten
              and those beans are not deployed. The properties files are read
              global, cluster, server, but opposite order has priority. If every
              server in the cluster has specific deployments, the cluster level
              beans will not be deployed. Is there another way to deploy, something
              like: weblogic.cluster.ejb.deploy=... or something?
              This is WebLogic 5.1 that I am talking about, btw. I'm not familiar
              enough with 6.0 clustering to know if this is also the case with
              that version. Thanks!
              Matt
              Prasad Peddada <[email protected]> wrote:
              >In a cluster, everything that gets deployed will be visible
              >on all the
              >servers in the cluster.
              >
              >It should be reading properties from all the properties
              >files.
              >
              >For instance ServerA alone will read properties file in
              >/weblogic/mycluster/serverA/weblogic.properties file.
              >So if you set anything
              >in this properties file, you can deploy on this server
              >alone.
              >
              >Thus you can target servers for deployment.
              >
              >WL_HOME/ weblogic.properties
              >WL_HOME/<CLUSTERNAME>/weblogic.properties
              >WL_HOME/<CLUSTERNAME>/<SERVERNAME>/weblogic.properties
              >
              >is the order.
              >
              >
              >Hope this helps.
              >
              >-- Prasad
              >
              >Matthew Carter wrote:
              >
              >> Hello all,
              >>
              >> How is it possible to deploy some EJBs on specific servers
              >within
              >> a cluster and others clusterwide when the weblogic.ejb.deploy
              >statement
              >> in the server-specific properties file overwrites the
              >cluster properties
              >> parameter? Do you end up having to deploy everything
              >on the server
              >> specific level? Is a bean still truly 'clustered' if
              >listed in
              >> multiple server specfic properties files (assuming <home-is-clusterable>
              >> is true)?
              >>
              >> Thanks!
              >>
              >> Matt
              >
              

  • Define user specific updating event in LIS

    Hi everyone,
    I'd like to define one specific event for one info structure, like the VC,VD....
    Could you please tell me how to realize it?
    thanks
    Eric

    It's not possible and, frankly, I don't see what purpose it would possibly serve. All the events are linked to some SD documents. It's not possible to create a completely new kind of document, therefore there is no need to create a new event.
    Perhaps you've misunderstood the requirements and what you need may actually be achieved by using a formula, for example, or a different configuration.

Maybe you are looking for

  • Intermittent lock up of key strokes

    Hi, I just bought my Macbook last December with the newer Santa Rosa chipset. I noticed when I'm running Firefox and Adium, once in a while (maybe once every week) it'll lock up all the keys and I couldn't type anything. I had to power down and power

  • How do i transfer pdf files to my pocket pc?

    How do i transfer pdf files to my Pocket PC? i have adobe reader installed on my phone and ready to go, and the instructions say that to transfer a pdf file to my phone all i need to do is drag it from its location on my computer to the storage card

  • [SOLVED]/tmp fills up when building packages

    When I try to install Red Eclipse with: yaourt redeclipse I get a BUNCH of write failed errors then: redeclipse/bin/reserver_freebsd_64: Write failed redeclipse/bin/reclient_freebsd_32: Write failed redeclipse/bin/reserver_linux_32: Write failed rede

  • Trade-In Rebates for new iPods???

    Im a bit angry the new iPods are out so soon and I just got mine not even a year ago. The big thing for me is the battery power - _(Even the new Nano) 3X 's what Ive got in the 30gb._ Does anyone know if Apple will be offering any trade in rebates of

  • Adobe Acrobat 11 menu is blank

    We are using Windows 7 64-bit edition.  We recently upgraded to Acrobat Standard & Pro 11.0.10.  I have users who are no longer able to view the Preferences menus.  The menu is too large to be seen on the entire screen.  The topics also have lines th