How to use TopLink's mapping info at runtime

Can anybody kindly instruct how to do the following:
1) Once the "JavaSource.java" file or the "ProjectDeployment.xml" file is generated by TopLink from a TopLink project, how can it be included and used in a J2EE project at runtime? I understand that this step may be specific to the type of IDE used, let us say WebLogic, WebSphere or JDeveloper9i.
2) Can TopLink generate the file "sessions.xml" automatically or it has to be hard-coded? Does this file have also to be included in a J2EE project under the directory of META-INF at runtime?

Hi John,
Probably the best way I can explain the process of putting a J2EE app with TopLink into production would be to describe the best practices of doing so.
Firstly, I recommend using an IDE to develop your Java source code, although it is possible to generate Java source directly from the Mapping Workbench, this is considered more of a rapid prototyping or quick start process. Once the Java source has been compiled, the Meta-Data (project.xml) can be deployed from the Mapping Workbench.
The next step really depends on the type of application you are creating. Since you are developing a J2EE based application and it will be multi-user, TopLink recommends using a ServerSession architecture. (Consult the documentation for detailed explanations). Configuring the session can be done in a number of ways, the best way would be to use the SessionManager and an external file called sessions.xml. Both the sessions.xml and project.xml must be visible by the J2EE component that will be using it. (Servlet/Session Bean, etc...). This is done through managing your deployment properly using something like an EAR.
The key to getting the application and TopLink working together is the session, and here's a basic example on how you could set this up:
sessions.xml code:
<toplink-configuration>
     <session>
          <name>myProject</name>
          <project-xml>myProject.xml</project-xml>
          <session-type>
               <server-session/>
          </session-type>
          <connection-pool>
               <is-read-connection-pool>false</is-read-connection-pool>
               <name>default</name>
               <max-connections>10</max-connections>
               <min-connections>5</min-connections>
          </connection-pool>
          <enable-logging>true</enable-logging>
     </session>
</toplink-configuration>
Somewhere in your application code, you might have a login method that makes use of the SessionManager to load and create the session:
SessionManager sm = SessionManager.getManager();
          Server serverSession = (Server)sm.getSession("myProject", this.getClass().getClassLoader());
The sessions.xml must be created manually at this point, a future version of the TopLink product will contain an editor which will help out.
Darren Melanson

Similar Messages

  • How to use scheduling in Mapping?

    Hi,
    can i use the schedular in Mapping?.
    I have created a schedule, but dont know how to use it in Mapping.
    Does anyone some ideas oder example.
    Thanks
    Mandi

    Hi Mandi
    You configure the mapping and set the 'Referred Calendar' property.
    See the viewlet below which does it (for Apps integration rather than database scheduler, but the steps are pretty much the same).
    http://www.oracle.com/technology/products/warehouse/htdocs/concmgr/owbconcurrentmanager_viewlet_swf.html
    Cheers
    David

  • How to use navgation app,(map) on iphone 4s without internet ?

    How tu use navgation app. (map) on iphone 4s withoutinternet ( by satellit )

    You can't use the defalt Maps app without an internet connection.  It's required to download the maps.
    There are several nav apps in the App Store that have built-in maps and don't need an internet connection.  TomTom and Navigon are two.

  • How to use "Set Enterprise Call Info" step in the script ?

    Hi all
    Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
    Does anyone has any example script with the same (a complete example script) ?

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

  • How to use the 'DatabaseOperation' mapping in iStudio?

    I'm still a novice in using iStudio and would like to use the 'DatabaseOperation' mapping - but so far I've had no joy. For Test purposes I have created a function:
    FUNCTION test_value (p_operator_name IN VARCHAR
    , p_status IN VARCHAR) RETURN VARCHAR IS
    l_return varchar2(100);
    BEGIN
    l_return := 'This is a test';
    RETURN l_return;
    END;
    iStudio
    Destination Field
    $Test.s1
    Source Field
    DatabaseOperation (operator_name, status, "oaihub902", "***password", "***host", "1521", "***SID", "thin", "5", "20", "begin test_value(operator_name,status);end;")
    Error
    oracle.oai.agent.server.transform.database.DBTransformationException: PLSQLTrans
    formation.transform: Transformation failed
    I can't find any documentation on how to use this mapping .. so any help would be appreciated.
    Cheers
    Ed

    I agree. The documentation is sketchy.
    One point. Consider developing your own custom transformations instead of using the Database Operation transform.
    I'm not sure about your client, but mine does not like having any passwords in the clear.
    Also, custom transformations are portable from one environment to another. You often find that having to recode usernames and passwords within the Database Operation transformation from your DEV > TEST > PROD systems a bit of a pain.
    HTH
    Yan

  • How to use AUTO in Mapping name for EDIFACT

    Hi
    I have a source which will be posting 2 diff kinds of EDIFACT  to XI.
    I want to use just a single channel where i want to configure my .sda module.
    I've seen that we can use 'AUTO' in MappingName parameter, so that the mapping is chosen dynamically.
    However,when i tried to do so, i get an error saying that the adapter cannot find the mapping in the classpath.
    Can anyone guide me as to how to use the AUTO parameter?
    If possible, provide a link for some blog where they are using it.

    Hi Alok,
                  Reason behing not getting the EDI payload was missing of splitter configuration, you need to configure the splitter as
    you need to use AUTO mappingName instead of specific mapping name
    once you configure split parameter of bic  to true, it will generate an attacments like KEY|MAPPINGNAME|ACCEPTED|MessageNo
    then based on this configuration splitter will look for the same key in Seeburger workbench configuration and then generates a XI message (SXMB_MONI entry) ...
    If you dont want acknowledgement of EDI and sure about the version of the mapping then you can configure the mappingName
    directly instead of AUTO...in BIC paramter
    HTH
    Rajesh

  • How to use Toplink as SDO in Oracle BPEL

    can we use Toplink as SDO for BPEL?

    We have not yet shipped our TopLink SDO implementation. The intent is that in our next major release the TopLink SDO will be used internally and should be available for your usage in the OracleAS/SOA suite.
    Doug

  • How to use toplink "build expression"  with soundex function

    We are using toplink experssion builder to build the query. can any one help me on build a query with soundex using toplink..
    for example :
    SELECT last_name, first_name
    FROM hr.employees
    WHERE SOUNDEX(last_name)
    = SOUNDEX('SMYTHE');

    TopLink's ExpressionOperator does have an operator defined for soundex. I have an example that uses it that I customized to match you case.
    I would recommend defining these queries as named queries using an after-load method:
        public static void afterLoadEmployee(ClassDescriptor descriptor) {
            ReadAllQuery raq = new ReadAllQuery(Employee.class);
            ExpressionBuilder eb = raq.getExpressionBuilder();
            Expression fnExp =
                ExpressionOperator.soundex().expressionFor(eb.get("lastName"));
            Expression valExp =
                ExpressionOperator.soundex().expressionFor(eb.getParameter("L_NAME"));
            raq.setSelectionCriteria(fnExp.equal(valExp));
            raq.addArgument("L_NAME", String.class);
            descriptor.getDescriptorQueryManager().addQuery("Employee.findBySoundexLastName",
                                                            raq);
        }Now you can execute the query anywhere in your application using:
            List<Employee> emps =
                (List<Employee>)session.executeQuery("Employee.findBySoundexLastName",
                                                     Employee.class, "SMYTHE");The SQL generated is a little different due to the multiple tables used in the employee example model but here is what I got:
    SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t1.SALARY, t0.L_NAME, t0.GENDER, t0.VERSION, t0.ADDR_ID,
    t0.MANAGER_ID, t0.END_DATE, t0.START_DATE FROM EMPLOYEE t0, SALARY t1
    WHERE ((SOUNDEX(t0.L_NAME) = SOUNDEX('SMYTHE')) AND (t1.EMP_ID = t0.EMP_ID))Doug

  • How to use toplink in the tomcat server?

    Hi,
    I want to use Toplink in the tomcat server. I am connecting to oracle database using DataSource.
    Can any body help me, what are the setup required to use the toplink in the tomcat?
    Please help me if any body has idea on the same.

    Take a look at this other forum posting: Tomcat acquire dataSource [TOPLINK-7060]
    --Shaun                                                                                                                                                                                                                               

  • How to use XSLT for mapping feild names one by one to array element

    I have a XSLT case to map all the attributes feild name(not value) which has no child to the target, which is array loop.
    I give an sample below.
    source:
    <Items xmlns="http://www.example.org/sample">
    <SourceSystem>SourceSystem2573</SourceSystem>
    <TimeStamp>2010-01-17T20:54:08.234</TimeStamp>
    <Item>
    <ID>2574</ID>
    <Type>2575</Type>
    <Name>2576</Name>
    </Item>
    </Items>
    source XSD like:
         <element name="Items" type="tns:ItemsType"></element>
         <complexType name="ItemsType">
              <sequence>
                   <element name="SourceSystem" type="string" maxOccurs="1"
                        minOccurs="1">
                   </element>
                   <element name="TimeStamp" type="dateTime" maxOccurs="1"
                        minOccurs="1">
                   </element>
                   <element name="Item" type="tns:ItemType"
                        maxOccurs="unbounded" minOccurs="1">
                   </element>
    </sequence>
         </complexType>
    <complexType name="ItemType">
              <sequence>
                   <element name="ID" type="string" maxOccurs="1"
                        minOccurs="1">
                   </element>
                   <element name="Type" type="string" maxOccurs="1"
                        minOccurs="1">
                   </element>
    <element name="Name" type="string" maxOccurs="1"
                        minOccurs="1">
                   </element>
    </sequence>
         </complexType>
    target need to be like:
    <ns1:AttributesCollection>
    <ns1:Attributes>
    <ns1:fieldname>SourceSystem</ns1:fieldname>
    </ns1:Attributes>
    <ns1:Attributes>
    <ns1:fieldname>TimeStamp</ns1:fieldname>
    </ns1:Attributes>
    <ns1:Attributes>
    <ns1:fieldname>ID</ns1:fieldname>
    </ns1:Attributes>
    <ns1:Attributes>
    <ns1:fieldname>Type</ns1:fieldname>
    </ns1:Attributes>
    <ns1:Attributes>
    <ns1:fieldname>Name</ns1:fieldname>
    </ns1:Attributes>
    </ns1:AttributesCollection>
    target XSD:
    <xs:element name="AttributesCollection" type="AttributesCollection"/>
    <xs:complexType name="AttributesCollection">
    <xs:sequence>
    <xs:element name="Attributes" type="Attributes" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Attributes">
    <xs:sequence>
    <xs:element name="fieldname" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    I know we can use local-name() to get the tag/field name,
    but I have not idea how to get these leaf field names one by one and then mapping to every array elements.
    I tried whole day but no successful
    Does anyone have some idea?
    Thanks very much!
    Keith
    Edited by: user1065212 on 17-Jan-2010 22:50
    Edited by: user1065212 on 17-Jan-2010 22:53
    Edited by: user1065212 on 17-Jan-2010 22:59

    can you paste source xsd and the correct xml output, the current one isn't really valid
    <ID>2574</TotalNumOfItems>

  • How to use Action/Input maps

    It seems to me that the move to sharing actions menus, buttons, and other components is a logical one, given that it is desirable to have all references to the action reflect its enabled state.
    The question that arises is: which ActionMap object to use as the central store? Do you create your own and pass it on somewhere?
    And, if you try to do anything with homegrown InputMaps then the components stop seeing the events. I wish there was a definitive YOU MUST DO IT THIS WAY tutorial.
    Why is there no factory API that can create UI components pre-attached to actions and with accelerators or mnemonics already set? Then we would not need to write half the code we do now. My solution:
    public class ComponentFactory {
       ActionMap myMap;
       public ComponentFactory(ActionMap map) {
          myMap = map;
       public JButton createButton(String actioncommand) {
           Action a = myMap.get(actioncommand)
           if(a==null)
              return null;
           return new JButton(a);
       public JMenuItem createMenuItem(String actioncommand) {
        // etc...
       public void setAction(Action a) {
           myMap.put(a.getValue(ACTION_COMMAND_KEY),a);
       public void setEnabled(String actioncommand, boolean state) {
           Action a = myMap.get(actioncommand);
           if(a!=null)
               a.setEnabled(state);
    }Is there any concensus as to the best way to handle ActionMaps/InputMaps?

    Hugh,
    >
    The tutorial is a touch short on this subject, whilst
    it is good on how to create and use actions with
    toolbars and the like, the section on InputMaps and
    ActionMaps is far too brief to get the wider picture.
    The API docs on the same is about one paragraph's
    worth.okay, I just checked the tutorial - it's a bit short on the inputMap/actionMap indeed.
    >
    You are mixing up two different issues:
    a) customize a button with an action
    b) bind a keyStroke to an action for an arbitrary
    jComponent
    a) has nothing to do with b)If b) has nothing to do with a) why have MNEMONIC_KEY
    and ACCELERATOR_KEY on the action?Hmm... where do you see a contradiction to my statement? Those keys are part of a) as they are used for customization of the AbstractButtons: the button's mnenmonic/accelerator properties are set to the corresponding values of the action. This propertyChange triggers an update of the keyBinding to the button's "pressed"/"doClick" actions as registered in the actionMap. They are never used (at least not internally by Swing) for b)
    Historically the action is older than the inputMap/actionMap: basically it's an ActionListener (which is more or less a command pattern) plus some (view) state. This "plus" was designed right in the beginning of Swing for a) to enable state sharing between different "buttons" but not really integrated until version 1.4. parallel to that the need for a general mechanism of binding between keyStrokes and "commands" became obvious and inputMap/actionMap were introduced in 1.3. The only action state that's needed for this mechanism to work is the enabled property. All values are ignored - so currently they somehow appear to be overloaded in the context of the inputMap/actionMap. Personally I think they are very powerful because of this extra flexibility.
    >
    There is still not a single diagram; and I maintain
    that it is less than useful to beginners who are not
    familiar with the terminology used. Well, IMO diagrams are not everything - I still think it much easier to understand than the dnd spec or the focus spec f.i.
    >
    you are free to use whatever object you want as akey
    - write a utility method to use the name, if feellike
    doeing so. There is nothing in the framework that
    would single out the name as "the" key to use, The keybindings document specifically states:
    "New actions can be added to a component equally
    easily."
    "The conventional key for an action is it's
    name." If there is a conventional way then it
    should be encouraged with an appropriate API. I get your point. And I definitely agree on following a convention if there is one. Except when the convention is quite immature (to formulate mildly) - and not even followed by Swing internally: most of the default actions registered in the actionMap don't even have a name, the binding is done by string literals ... duplicated in at least two places: the XXLookAndFeel and the ui-delegates.
    Greetings
    Jeanette

  • How to use (toplink essentials)JPA with EJB 2.1 spec in oc4j 10.1.3.2

    I have an application that uses EJB 2.1 spec with SLSB (no entity beans) and uses DAO pattern with hibernate2 for persistence. I want to replace hibernate with toplink-essentials (JPA). I cannot upgrade the EJB spec version as we use some thirdparty beans. The application uses DAO pattern so I should be able to hook in a new toplink DAO impl. What I am struggling with is how do I get hold of the EntityManagerFactory in my EJB 2.1 SLSB. Also I need CMT with XA transactions as our application interacts with jms and database using MDBs and SLSBs.
    Prantor

    You should be able to use Persistence.createEntityManagerFactory(<your-persistence-unit-name>, properties), and create your EntityManager from that.
    To have TopLink integrated with JTA, in your persistence.xml (or properties) you need to use a JTA DataSource, and set the ServerPlatform for your JEE server.

  • How to use styled google maps in muse cc??

    i've been searching for styled maps for muse but to no result.using google maps styler i generated a source code but its not usable in muse.
    give me some suggestions please..
    thanks..!!

        "featureType": "road",
        "stylers": [
          { "saturation": -92 }
        "featureType": "transit"  },{
        "elementType": "labels.text.stroke"  },{
        "stylers": [
          { "visibility": "on" },
          { "weight": 1 },
          { "lightness": -6 },
          { "hue": "#ffe500" },
          { "saturation": 8 }
    its a javascript code..how can i implement it in muse...

  • How to use googel earth maps in gps

    i want to use mops of google earth in gps

    on the phone, goto www.googlemaps.com
    then click on [maps with my location]beta. This page should indicate [N95] download.
    good luck.
    S

  • How to use my QT Pro info when re-installing QT

    I bought QT pro in July 05 - in hopes to fix a problem I was having with QT 7. It didn't fix it and I had to uninstall QT and reinstall. I reinstalled 6 - and left it at that afraid that QT7 would give me the same problems. Now I want to update to Pro 7 - does anyone know how I can now use my access key again. The only way into Pro looks like re purchasing.

    Hi!
    Since installing Tiger, and having the unpleasant surprise so many others have had, in that my QT 6 Pro features were gone, I've seen much reference to this trick of using the old QT 6 Player under QT 7 in Tiger. But it doesn't work for me! I wonder if I'm doing something wrong. I still only get the short menus and no Pro options when using the old player.
    I even rebooted into 10.3.9, entered my registration code for 6, and received the extra features in the QT 6 player (after restarting it). I copied the player into my new, Tiger "applications" folder under a slightly altered name, then rebooted with much anticipation.
    Back in Tiger... it was the same old story! My pro player magically was reduced to a basic player.
    In a word... aRrrgggGGh!
    You know, I happily used the ancient "MoviePlayer" for years for the same reason - it maintained the features that were "Pro Only" in the more current versions. Why has this trick stopped working?
    Hope someone can help... thanks!
    Adam
    iMac (desklamp style)   Mac OS X (10.3.9)   768 MB RAM, 1 Ghz G4

Maybe you are looking for

  • IPod Touch Not Recognized in Windows 8.1 Preview

    Hello.  I installed Windows 8.1 Preview clean last week, and am now having problems getting my iPod Touch recognized within iTunes. Normally, there is a button marked On This iPod, which I click, and then load music in that screen.  That button is no

  • Will this hard drive work in my mid 2010 macbook pro 13" ?

    Macbook pro 13" Mid 2010 2.4 GHz Intel Core 2 Duo 8GB 1067 MHz DDR3 Need to upgrade my 250GB harddrive to 1TB, do you know if this one will fit ? http://www.amazon.com/WD-Blue-Mobile-Hard-Drive/dp/B005DVJJWQ/ref=cm_cr_pr_produ ct_top WD Blue 1 TB Mob

  • E-Recruiting :Webdynpro for ABAP start page modification

    Dear Experts, We will be using the wbdynpro for ABAP screens for candidate profile for a succession planning implementation. We have a requirement to change the start page as well as the candidate profile screens.We need to change the overview screen

  • Out of memory error importing a JPA Entity in WebDynpro Project

    Hi All! We are having problems importing JPA entities in a WebDynPro project, this is our escenario. We have two entities, entity A that has a ManyToOne relationship with entity B and at the same time entity B has a OneToMany relationship with entity

  • String operations for assignment

    Hi All, Need some idea with this operation in MDM Data Manager: I have a tuple like aa-bb-cc-dd-ee I am trying to write an assignment to delete the last entry i.e.. "-ee" and finally the output of the assignment should be aa-bb-cc-dd Can anyone help