Remote Key values in one file

Hi,
Is there anyway to get the multiple remote key values(different remote systems) for a single record in a single XML file?
Regards
Nisha

Hi Nisha,
you can do this with Syndicator. Asuming that you have defined a XSD for your desired XML format, you can create a syndication map that uses the remote keys for all remote systems. The tab "Map Properties" has a property named "Remote Key Override". This property allows you to select the remote systems that you want to include in syndication. If you add all existing remote systems and set the property flag "Suppress records without key", syndicator creates an XML containing all remote keys.
A suitable XML format could be something like
<Root>
  <Record>
    <MdmId />
    <RemoteSystemCode />
    <RemoteKey />
  </Record>
</Root>
Record is the repeatable node.
Use MdmId to identify the record in the repository (this is optional of course).
Use RemoteSystemCode and RemoteKey to syndicate the key mapping.
Best regards
Michael

Similar Messages

  • Passing Value from one File to Another !!!

    Hi Friends,
    I have an issue, I have two different Swing programs (two seperate java files). I want to transfer value from one file to the another. Like we do in Servlets or JSP, we use sessions or Hiddenfields. The same way I want to retriev value in a new file from a previous one.
    Hope that all u champs out there have the answer to my query.
    Thanks,
    [email protected]

    This is a B2B comms question...
    A quick and dirty method is to use Socket/ServerSocket and use a basic protocol to do the transfer, if you are feeling heroic then use XML as the message format...
    A lot depends on whether your applications are running on separate boxes, i.e. do you need to communicate across a network...
    If not, if they are always going to be on the same "box" then you could just use well-known places for files...not portable but effective...

  • How to read properties file(key-value) in OSB?

    Hi
    I have a scenario in which I have to read some properties(key-value) from a file. Earlier whole code was developed in java and its easy to read properties file in java.
    But now need to implement this in OSB and performance is very critical in this project.
    I followed DVM approached defined in
    http://blogs.oracle.com/christomkins/2010/02/domain_value_maps_in_oracle_se.html and http://blogs.oracle.com/christomkins/2010/02/domain_value_maps_in_oracle_se.html
    But it did not work. I have hundreds of properties(key-value pairs) to read and need pass them to the business service along with input of proxy service.
    What is the best approach for this (Can not go for db call as performance is very critical)?
    Thanks
    Vibhor

    $DVM= <dvm      name="InterfaceProperties" xmlns:ns1="http://xmlns.oracle.com/dvm" xmlns="http://xmlns.oracle.com/dvm">
         <columns>
         <column      name="PROPERTY_KEY" qualifier="false" order="1"/>
         <column      name="PROPERTY_VALUE" qualifier="false" order="1"/>
         </columns>
         <rows>
         <row>
         <cell>dealer.locate.default.buypower.link</cell>
         <cell>http://www.xyz.com</cell>
         </row>
         <row>
         <cell>dealer.locate.default.unitOfMeasure</cell>
         <cell>MILES</cell>
         </row>
         <row>
         <cell>dealer.locate.brand.identifier.nu</cell>
         <cell>Nurun</cell>
         </row>
         <row>
         <cell>dealer.locate.brand.identifier.bu</cell>
         <cell>Buick</cell>
         </row>
         <row>
         <cell>dealer.locate.brand.identifier.ca</cell>
         <cell>Cadillac</cell>
         </row>
    </rows>
    </dvm>
    XPATH is- ns1:dvm/ns1:rows[1]/ns1:row[1]/ns1:cell[1]/text()
    If I run this xpath in Jdeveloper,its giving me proper output.
    Please this as CQuery resource and try to run this xpath on OSB console.
    Thanks
    Vibhor
    Edited by: Vibhor Rastogi on Sep 21, 2010 4:59 AM

  • Remote Key Mapping - Maintanance

    Hi All,
    I have Auto Id field in my repository; I would like to maintain this as my remote key value in my key mapping table ( automatically) in the following scenarios:
    1. Initial Loading
    2. On going ( from portal)
    3. Manual creating a record
    The issue is, since its auto id - not available until unless it get created?
    Do I need to syndicate all and loop back as Import and update remote key??? or any webservices and so?
    thanks,
    Alexander.

    Hi Raja
    You are correct on the approach. This can be done by automatic syndication of the newly created records from any of the channels( excel import, Portal, MDM GUI) to Outbound ready folder from where the files are copied to Inbound folder and automatically imported back in MDM. Steps to be followed can be-
    Create ports for syndication and auto Import
    The syndication map should contain mapping for Auto ID and any other unique field for reference. Assign this to Outbound port above.
    The map used for importing should contain mapping of Auto ID to remote key for the record.Assign this to Inbound port above.
    Define/set up a batch job for copying the files from Outbound Ready folder to Inbound Ready folders.
    hope this helps.
    Ravi

  • Syndicator - Remote Key

    I'm trying to map some Remote Keys at the Syndicator, but i'm having the following problem:
    The key mapping values from source do not transfer any value to destination. My Remote System is the "MDC R/3 & ERP", but I have tried to configure the "Output Remote System" property as "MDC R/3 & ERP" and I have inserted the remote key values in flat tables (lookup).
    What need I to do to get the key mapping values in Syndicator?
    Evandro.

    Hi Evandro,
    The key mapping values from source do not transfer any value to destination. My Remote System is the "MDC R/3 & ERP", but I have tried to configure the "Output Remote System" property as "MDC R/3 & ERP" and I have inserted the remote key values in flat tables (lookup). 
    To syndicate out remote Key form Remote system in MDM syndiactor you need to take care of the following:
    - Enable the Key mapping as Yes in MDM Console.
    - While Importing data either for the main table records or the Lookup table records make sure to map the Unique key field from the source side to the <Remote key> in the destination in MDM Import manager.
    - In the syndicator you need to take care of two imp things
    - Firstly while opening the syndicator you need to select the Remote system in the destination properties(File>New)
    - This will make sure that you are sending the key mappings to that remote system.Output remote system property works slightly differnt.
    - You need to make sure that the first property in MDM syndicator under the map property tab(remote system) is having your Remote system name.
    - Then you need to map the the value field(under remote key in the source)  to the destination field for remote key.
    You will understand better in the below related links:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7051c376-f939-2b10-7da1-c4f8f9eecc8c  (Key mapping) 
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30843106-5539-2b10-75a9-da483911b0d9  (Key mapping)
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • PI 7.31 SP14: use of MessageTransformBean Complex conversion w/o KEY values

    In a mail sender channel I need to pick up a csv file with 2 (different) header lines and a number of data lines. the structure is like this:
    header1
    header2
    line
    line
    line
    There are no Key values in the file that I can use and no fixed lengths either.
    How do I convert this csv file to an xml file in PI? I imagine using the MessageTransformBean in the mail sender channel but I face trouble because of the lack of Key values I can use.
    I tried the following but it is screaming for KeyValues and similar stuff.

    can you also post 28,000 more lines? I'm sure this will be helpful....

  • [SOLVED] [udev] invalid key/value pair in custom rule

    Hey,
    this simple rule in /etc/udev/rules.d/99-usb-backup.rules, which is used to automatically mount my encrypted backup disk when plugging in run a backup script after the backup disk has been mounted, is said to be invalid:
    SUBSYSTEMS=="usb", ATTRS{idProduct}=="0470", ATTRS{serial}=="2080000048FD", ACTION=="add", ENV{SYSTEMD_WANTS}=="secbackup.service"
    (The service file will mount the volume and start the backup script; mounting is done via udiskie.)
    The following error pops up when booting the system:
    systemd-udevd[225]: invalid key/value pair in file /etc/udev/rules.d/99-usb-backup.rules on line 1,starting at character 131 (':')
    I don't see any colon (':') in my rule and the last closing quotation mark (") is the 130th character in this file...
    This worked well before; I don't know when the error started to pop up. I use systemd 213-9.
    Any hints?
    Last edited by ball (2014-06-18 09:28:24)

    ukhippo wrote:Shouldn't that last “==” be “+=”?
    Well... I don't know. I've taken this snippet from jasonwryan's blog post. I guess it's correct...
    ukhippo wrote:
    If that's just a typo on your part, are there any non-printing characters? Use “od” to check:
    od -c /etc/udev/rules.d/99-usb-backup.rules
    Nothing suspicious:
    0000000 S U B S Y S T E M S = = " u s b
    0000020 " , A T T R S { i d P r o d u
    0000040 c t } = = " 0 4 7 0 " , A T T
    0000060 R S { s e r i a l } = = " 2 0 8
    0000100 0 0 0 0 0 4 8 F D " , A C T I
    0000120 O N = = " a d d " , E N V { S
    0000140 Y S T E M D _ W A N T S } = = "
    0000160 s e c b a c k u p . s e r v i c
    0000200 e "
    0000202

  • In flex, How to set a value to one parameter, the parameter defined in a cffunction in a cfc file

    In flex, How to set a value to one parameter, the parameter
    defined in a cffunction in a cfc file, In the cffunction there are
    much cfargument, I want set a value to one of them, such as the
    cfc:
    <cffunction access="remote" name="myShow" output="false"
    returntype="struct">
    <cfargument name="ID" type="numeric" default=0>
    <cfargument name="GoodsID" type="string" default="">
    <cfargument name="DestTime" type="string" default="">
    <cfargument name="DestCount" type="numeric" default=1>
    How I set a value to only parameter one of them , such as set
    GoodsID when use mx:remoteObject.
    Thanks for your help

    Got maybe a solution for you, I have just tested it.
    So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
    select #Var1+#Var2 from dual
    This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
    Hope it helps.
    Shamil

  • EJB3: One-to-one relationships and auto-generation of primary key values...

    Dear Forum,
    I'm relatively new to JEE, and while I've so far enjoyed the convenience of EJB3 for most things, it seems that I have a corner case that can not be handled by the entity manager.
    First, here's a quick mockup of my entities:
        Gallery
                |
                -- [1] -------[1] ----> Author
                |
                -- [1] -------[M] ---> Photo
                                                  |
                                                  -- [1] ------ [1] -> PhotoImage
                                                                                     |
                                                                                     -- [1] ------ [1] -> IPTCData
                                                                                     |
                                                                                     -- [1] ------ [1] -> EXIFDataI also have a remote, stateless session bean that does nothing more than persist()/merge()/remove() and locate (through find() and a few custom queries) my Gallery and Photo instances.
    Now, the abridged version of my problem is this: when I persist a Photo, it naturally gets its primary key generated (I used @Id and @GeneratedValue). However, for some reason none of the other dependent entities inherit Photo's primary key value. In my client, I create a new Gallery locally and then persist it. I then create new Photo, PhotoImage, IPTCData and EXIFData instances. I add the IPTCData and EXIFData instances to PhotoImage (there are PhotoImage methods for adding those); then I add the PhotoImage instance to Photo (again, Photo has a setter for adding a PhotoImage). Then, I persist the Photo.
    --- Aside: ------------
    I've set up my relationships using annotations like @OneToMany (Gallery references a Collection of Photos), and @OneToOne (Photo's primary key references PhotoImage's primary key; PhotoImage's primary key references the primary keys of IPTCData and EXIFData). I've also added @JoinColumn annotations where necessary.
    Finally, I get the Gallery instance's Photo collection (public Collection<Photo> getPhotos()), I add the Photo to the collection, and I add the Photo collection BACK to the Gallery (public void setPhotos(Collection<Photo>)).
    At this point, the Gallery should have all of my entities contained inside of itself. However, when I persist the Gallery at this point, all of the entities show up in the database, but none of the primary keys get inherited. Photo's primary key gets generated automatically, of course, but the rest have zero (0) as their PK values. I had wanted, for example, IPTCData to get the value of Photo.id.
    I had assumed that the entity manager would persist everything for me provided that I told it, through my annotations, about which entities relate to which. Does persistence only work in the direction of retrieval? That is, does the entity manager only do its thing when fetching (versus setting) data when there is more than 1 object in the graph? I can't believe that it can't, otherwise we'd all be ditching it and going back to straight SQL to do our work.
    Thus, I HAVE to be doing something wrong, or else omitting to do something right.
    I've made other incarnations of the above setup, and none of them have worked perfectly. I've even set up foreign key constraints in the database, but I had my share of unresolvable problems there, too.
    So I guess my big question with all of this is: when you have a deeply nested graph of objects, can the entity manager figure everything out and persist all of the objects correctly and with the right values? If not, boo. If so, how does one accomplish this?
    I know that I could persist each and every entity separately in my client code, but I wanted to have a natural-looking way of piecing all of my entities together. More specifically, I could persist IPTCData explicitly; however, I want to be able to add everything to a Photo and only persist the Photo itself, with the idea that all of the objects and sub-objects would be persisted automagically.
    Is this possible? Or have I bought into a pipe dream with the guarantee of the proverbial magic bullet?
    Thanks to everyone in advance for his/her input.
    Regards,
    Michael

    Daniel,
    Late last night I found the solution to my problem. And you're right, it had everything to do with which side is wired to which. I got confused about which side to consider the "owning" side, since one can look at it from the perspective of the database or the application.
    Interestingly, the first 2 lines of your example code match my client code almost verbatim: First, I create a new Gallery (or else I get an existing one). I then create a new Photo and then add it to the Gallery's collection using add(). I then persist the Gallery. My session bean internally calls EntityManager.merge(gallery). How it differs from your example, though, is in the fact that, on an application level, a Photo has no knowledge whatsoever of a Gallery. Which is to say that my Photo class does not have a 'getGallery()' method. Somehow, Hibernate is able to figure it all out and still update Photo's 'parentIdRef' column in the database. My logs show that Hibernate issues a SQL UPDATE on the Photo after both a Gallery and a Photo have been created. It sets the Photo's 'parentIdRef' column to the primary key value of the owning Gallery.
    Getting back to the matter, my problem was not with being able to map a Photo to a Gallery; rather, I was unable to add a PhotoImage to a Photo and have the relationship get correctly mapped in the database. The relationship between a Photo and a Gallery is many-to-one: there can be many Photo objects inside of a Gallery. In the database, a Photo row contains a 'parentIdRef' column whose value is that of a Gallery's primary key. I used @OneToMany on the Gallery, since a Gallery is, from an application perspective, the "owning" side, even though it's only the Photo that knows who it's referring to since only IT contains the 'parentIdRef' column in the database.
    I tried setting up the relationship between a PhotoImage and a Photo in the same manner, with the PhotoImage having a 'parentIdRef' column and referring to a Photo's primary key. I had annotated the Photo's getPhotoImage() method with @OneToOne, along with an appropriate @JoinColumn.
    It was THIS part that I had backwards. With a @OneToMany relationship, the child refers back to the parent --- it can be no other way. However, with a @OneToOne relationship, the owner refers to the child.
    So, to make a long story short, all I had to do was create extra database columns for Photo. Those columns refer to the primary keys of PhotoImage, EXIFData and IPTCData. Concretely, for example, Photo.photoImageIdRef references PhotoImage.id. And so on and so forth.
    The only negative side-effect of this is that my database-level foreign key constraints are now broken, since Hibernate wants to persist PhotoImage, EXIFData and IPTCData before it persists Photo.
    I have to investigate more deeply the 'cascade=...' option of the @OneToOne annotation in order to find out it relates, if at all, to a database-level cascade.
    Anyway, thanks for the reply. It seems that you had a very good idea about what my problem was. I would have posted the fact that I had resolved the problem last night, except that it was too late and I was heading to bed. If you still want the Duke points, let me know. I don't currently know the rules about if, when and to whom I should issue points in cases like these when I've already solved the problem.
    Regards,
    Michael

  • Multiple key-value pairs in JNLP file

    Dear All,
    I have a JNLP file with multiple key-value pairs :
    <resources>
         <j2se version="1.4+"/>
         <jar href="lib/myFile.jar"/>
         <property name="url" value="URL/db"/>
         <property name="default" value="10"/>
         <property name="m1_query" value="URL1"/>
         <property name="m2_query" value="URL2"/>
         <property name="m3_query" value="URL3"/>
         <property name="p1_query" value="URL4"/>
         <property name="p2_query" value="URL5"/>
         <property name="p3_query" value="URL6"/>
         <property name="p4_query" value="URL7"/>
       </resources> I dont know what the key names are in the JNLP file so I cant use getProperty(keyname) directly. Is it possible to read all the key-value pairs in a HashMap and iterate through the list?
    Or is there any other way of dealing with it?
    Many thanks in advance.
    Regards
    Anuj

    Hi Riem,
    Thanks for your help ...
    while waiting for a reply ... I managed to do sort out my problem.
                     Properties p = System.getProperties();
                     for (Enumeration enu = p.propertyNames() ; enu.hasMoreElements() ;) {            
                       String key = (String)enu.nextElement();
                       Object value = p.getProperty(key);
                       if(!value.equals("")) {
                              keyValues.put(key, value);
                     }Thanks for your help.
    Cheers
    Anuj

  • VB Script to accept PC names in text file and get registry key value out of those systems

    Hi All,
    My task: Create VB script to accept PC names from a text file, process each host name to get Registry key value of individual host name and finally export them to a text file or an excel sheet having registry key value against each pc.
    I want to pull key value of LSFORCEHOST located in HKCU/Environment of each PC and export this value against each pc in a text or Excel file.
    What I achieved: I am able to process against single pc name but failed to process 3000+ systems listed in a text file which I tried to process through VB script. I am not pro and learning the VBS and cant write complex code.
    My VBS code written so far(It failed many time with issue):
     Option Explicit
     Const HKEY_CURRENT_USER = &H80000001
     Dim oFSO, sFile, oFile, sText, strComputer,oReg, strKeyPath, strValueName, strValue, objFSO, objFile, strContents
     Set oFSO = CreateObject("Scripting.FileSystemObject")
     sFile = "test.txt"
     If oFSO.FileExists(sFile) Then
      Set oFile = oFSO.OpenTextFile(sFile, 1)
       Do While Not oFile.AtEndOfStream
        sText = oFile.ReadLine
         If Trim(sText) <> "" Then
    strComputer = sText
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
        strComputer & "\root\default:StdRegProv")
    strKeyPath = "Environment"
    strValueName = "LSFORCEHOST"
    oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
    Const ForReading = 1
    Const ForWriting = 2
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile("C:\destination.txt",1, ForReading)
    strContents = strValue
    Set objFile = objFSO.OpenTextFile("C:\destination.txt",2, ForWriting)
    objFile.Write strContents
    objFile.Close
    End If
    Loop
    oFile.Close
    End If
    I think when I tried to process each PC name from text file against registry key value, above code not working. As per my knowledge some issue in loop. Do I need to add FOR EACH feature? 
    Please help to correct it. Thanks in advance.

    I think when I tried to process each PC name from text file against registry key value, above code not working. As per my knowledge some issue in loop. Do I need to add FOR EACH feature? 
    Please help to correct it. Thanks in advance.
    Your code contains numerous errors. Furthermore you make things difficult for yourself by giving similar names to the objects used for your input and output. If you are a systems administrator then your best bet is to make an effort to learn the language
    instead of grabbing a few code fragments from here and there and hoping that somehow they will work.
    Try the cleaned up code below for this particular project. Note the consistent code indentation. It helps you enormously when trying to understand the structure of the code. Remember also that you must fully qualify all file paths. Writing to "Destination.txt"
    will cause endless confusion because you never know for sure where this file will reside.
     Const HKEY_CURRENT_USER = &H80000001
     Set oFSO = CreateObject("Scripting.FileSystemObject")
     sKeyPath = "Environment"
     sValueName = "LSFORCEHOST"
     sFile = "D:\Test.txt"
     If oFSO.FileExists(sFile) Then
       Set oInput = oFSO.OpenTextFile(sFile, 1)
       Do While Not oInput.AtEndOfStream
         sComputer = oInput.ReadLine
         If Trim(sComputer) <> "" Then
           Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
             & sComputer & "\root\default:StdRegProv")
           oReg.GetStringValue HKEY_CURRENT_USER,sKeyPath,sValueName,sValue
           Set oOutput = oFSO.OpenTextFile("D:\destination.txt",8, True)
           oOutput.WriteLine sValue
           oOutput.Close
        End If
      Loop
      oInput.Close
    End If

  • Multiple values for one key in hashtable k, v

    So, I know that java.util.hashtable (as of Java 1.5) uses separate chaining to handle collisions. What I want to know is how to get a certain value somewhere in that bucket if they all share a common key? Javadoc says I have to search it sequentially but doesn't say how.

    OK, there's a lot of confusion on here for such a short thread :-)
    Firstly, HashMaps pick which "bucket" to store your object in based on the hash value of your object (see Object.hashCode()). However, the actual object equality test (applied to the keys during a search) is based on Object.equals(). Therefore which bucket your object is in is irrelevant - the bucketting concept is just used as a way of quickly locating a subset of all the keys in the map which might match your search value. There could very well be just a single bucket in a map and it wouldn't change its logical behaviour.
    This statement: "any Map including Hashtable, can only have a single (key,value) pair" is poorly worded. What it should say is that for any given key, a map can only hold a single value.
    Really, you don't need to think about the internal structure of maps (i.e. buckets, etc.).
    If you want to store multiple values for any given key, then make your value a list (java.util.List) and store your multiple real values inside that list.

  • Is it possible to Update Remote Key

    Hi,
    I have a remote system which create remote key while syndicating to ERP...
    ERP will create the material number which inturn needs to be updated in MDM using import manager..
    While importing I am mapping Material number to remote key.. which is creating new remote key along with defualy remote key generated while
    syndication... Is it possible to have one key as it is of same material from  same system? And at the same time it is again syndicating after
    I import with material number (Remote Key)..
    Thanks
    Rajeev

    HI Ravi,
    by doing so I am having the dublicates in the Data Manager...
    Steps I peffromed :
    I have a main table of fields FName(DF),LName,City ....I created a remote Sytem (Remote1) with range of 1000 to 2000 .. Imported two records say ((A,AA,City1)(B,BB,CITY2)) using FName as matching filed (I didnt mapped remote key).. MSS is started so I see the keymapping as A,Remote1 and 1000 and B,Remote1 and 1001 for these two records..
    NNow I created a dummy remote system and added a new field to the main table MatNumber.... I importing the file with (A,AA,City,Mat1) and remote system as dummy where I am mapping MatNumber to Remote Key... By doing so I see three records with one record dublicating as It got imported from new remote system with key value Mat1..
    Can you please guide how to havve only two records by just updating the key value....
    Thanks
    Rajeev
    Edited by: rajeev raj on Jun 22, 2010 10:53 AM

  • How to Syndicate key value

    Hi ,
    I have a table where there are 2 fields Country and code.
    I imported data with a remote system rs2.
    'edit key mapping window' values 'FOR rs2' are
    name remote system key
    india RS2 IIA
    india RS2 IA "CHECKED"
    In record pane there is one record.
    name country
    india IND
    In synd i created 4 fields.
    now in file i can see 2 records.
    Name Country Remotesys remote key
    india    IND           rs2               IIA
    india    IND           rs2               IA
    Now, as i 'checked ' the second record in 'edit key mapping window' values 'FOR rs2' , it SHOULD syndicate only 2nd record!!!
    But it syndicated 2 records!! How can i control this??
    Please let me know.
    KR
    John

    @Ravi,
    You right!! i just want to chk how key mapping works for different logics.
    @sudhanshu,
    On syndication ,is theer any field called default key generated in file.
    If yes then it contain value "true" for checked one and "false" for uncheck reords.
    Thanks,
    Sudhanshu
    well, my file will consist of wat ever fields i create in destination item and map them to source.
    can you please elaborate your question so that i can give a try!!
    KR
    John

  • Application specific key-value pairs in jndi.properties

    Hello,
    Can I specify my application specific key-value pair in jndi.properties?
    I tried something like this
    java.naming.factory.initial=.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://localhost:7001
    myVar=myVal
    When i tried looking up "myVar" from my client program, I got an error.
    The other parameters like weblogic.jndi.WLInitialContextFactory are picked up.
    Anyhelp will be appreciated
    Vasim

    We have a similar problem.
    We would like to configure our PROVIDER_URL for a specific web application - not
    for the entire server. Since the URL should be different in development, test
    and production environments, we would prefer to just set it in the deployment
    descriptor. And we have a lot of code that just uses
    ctx = new InitialContext();
    when looking up EJBs, queues etc.
    Actually, to take the problem one step further, it should be expected that later
    we will have EJB's deployed on different machines/clusters - so we will actually
    need specific urls for each EJB.
    Is there a good way to do this? Or will we have to custom-develop our own jndi
    configuration standard using application parameters to set which JNDI provider
    each EJB should be looked up with?
    Alternativaely, can we "import" the JNDI trees of the app server in the JNDI tree
    of the web servers?
    So, how should we go about this?
    Robert Patrick <[email protected]> wrote:
    Vasim wrote:
    Hi Robert,
    You are right. But The object "myVar" which I am trying to look upis not in
    the JNDI tree nor am I interesed in binding it . But my requirementis that
    I have one application specific variable which I am trying to lookup and I
    dont want to have a separare config file for this..and hence the question..So, put the properties you want in the jndi.properties file and load
    the properties
    file from your code by doing something like this:
    Properties props = new Properties();
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null)
    cl = System.getSystemClassLoader();
    InputStream is = cl.getResourceAsStream("jndi.properties");
    props.load(is);
    Personally, I would not use this file and would create an application-specific
    file
    or, as Daniel suggested, define your properties as a System property
    and use
    System.getProperty("myVar").
    btw, is jndi.properties only for those objects which are bound to jnditree?
    jndi.properties is only used for creating the JNDI InitialContext. The
    whole idea
    of this file is that in remote client code (without the jndi.properties
    file), you
    need to do something like this to tell the JNDI classes how to connect
    to the JNDI
    provider:
    Properties props = new Properties();
    props.put(Context.PROVIDER_URL, "t3://myservername:7001");
    props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    InitialContext ctx = new InitialContext(props);
    but inside the server, you only need to do this because the server is
    the provider
    and already knows how to connect to itself:
    InitialContext ctx = new InitialContext();
    Therefore, the jndi.properties file allows you to externalize this property-setting
    code that sets up the properties to be passed to the InitialContext constructor
    so
    that the remote client code can now look exactly like the code inside
    the server.
    The InitialContext constructor will look for this jndi.properties file
    in your
    classpath and load it to get the necessary configuration information
    to determine
    how to connect to the JNDI provider.
    Hope this helps,
    Robert

Maybe you are looking for

  • MM report screen having 10 fields

    Hi Everbody, we r having MM report screen with 10 fields, but my requirement is to show particular fields like 5 fields ca n any one plz help  me which iview i have to use and how to show particular fields on that.. thanx

  • Convert multiple layers into separate smart objects

    I have multiple layers in a document that I want to make into separate smart objects. If I select them and choose "convert to smart object" in the Layers Panel fly out, it flattens the layers into 1 smart object. Can it be done, or do I need to make

  • Process instance identifications

    Hi, I'm working on BPM 11GR1. Can anybody please tell me what is the link (if there is any one) between the follwing instance identifications: "Instance ID", "Conversation ID", witch appear in Enterprise Manager environment and "Instance #" in BPM Wo

  • Messages not displaying in Outlook 2013

    I recently purchased a new computer and installed my Office 2013 software on it. Outlook does not display any message at all in the Inbox. All subfolders display correctly and they appear in the Inbox when I use OWA.  Creating a new Outlook profile d

  • Two identical audio tracks, identical waveforms, BUT non-sync playback!

    Hi all - I've been up all night trying to figure this one out... I've shot a video on XDCAM, edited using the native codec in FCP 6.06, graded in Color and sent back to FCP as ProRes 422 (HQ). Now, here's the weird one - the original unmixed soundtra