Automate DBAdapter creation and testing using ANT

I am using SOA suite 10.1.3.1.
I would like to automate creation and testing of DBAdapter and I know that we have some ANT task to create and test connection pool and datasource like
createJDBCConnectionPool
createManagedDataSource
testConnectionPool
testDataSource
etc...
but I fail to found ANT task for DBAdapter.
It would be grateful if someone can tell if it exists or not.

sure, it's my pleasure.
Before running the code, please read the following document first. They talked about how to use JMX to control the AS. Basically, you will need the admin client library to do the job as Oracle don't use JRMP, so you need the library to provide the underlaying protocol(i.e. ORMI).
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28950/adminclient.htm#CHDGIAEI
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28952/mbeans.htm#CIHCCAFJ
here comes the sample code
String url = "service:jmx:ormi:///opmn://<host>:<opmn reuqest port>/<OC4J instance for BPEL>";
String login = "<username>";
String pass = "<password>";
String mbeanName = "oc4j:j2eeType=JCAConnectionDefinition,name=javax.resource.cci.ConnectionFactory,ResourceAdapter=Database Adapter,ResourceAdapterModule=DbAdapter,J2EEApplication=default,J2EEServer=standalone";
String opName = "addConnectionFactory";
// connection setup
JMXServiceURL serviceURL = new JMXServiceURL(url);
Hashtable credentials = new Hashtable();
credentials.put("login", login);
credentials.put("password", pass);
Hashtable env = new Hashtable();
env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "oracle.oc4j.admin.jmx.remote");
env.put(JMXConnector.CREDENTIALS, credentials);
JMXConnector jmxCon = JMXConnectorFactory.newJMXConnector(serviceURL, env);
jmxCon.connect();
MBeanServerConnection mbServer = jmxCon.getMBeanServerConnection();
// prepare parameters for the invocation
Object[] param = new Object[4];
param[0] = "<JNDI name of the DbAdapter>";
Map temp;
param[1] = temp = new HashMap();
temp.put("defaultNChar", Boolean.FALSE);
temp.put("platformClassName", "oracle.toplink.platform.database.Oracle9Platform");
temp.put("sequencePreallocationSize", new Integer(50));
temp.put("usesBatchWriting", Boolean.TRUE);
temp.put("usesNativeSequencing", Boolean.TRUE);
temp.put("xADataSourceName", "<dataSource name>"); // assume that the dataSource is created somewhere else
param[2] = new Integer(1); // 1 for private connection pool
param[3] = ""; // connection pool name, not useful for private pool
// prepare signature of the operation which we would like to invoke
String[] signature = new String[4];
signature[0] = "java.lang.String";
signature[1] = "java.util.Map";
signature[2] = "java.lang.Integer";
signature[3] = "java.lang.String";
ObjectName beanName = new ObjectName(mbeanName);
mbServer.invoke(beanName, opName, param, signature);

Similar Messages

  • Automatic TO Creation and Confirm for the 321 Mvt type

    Hello Experts,
    Like to know the customisation invovlved for automatic TO creation and confirmation for the 321 movement type in which QM is activated.
    I have already activated in OMKZ as below
    1.Automatic TO for 321 mvt ytpe
    2.TO item to be confirmed immediately
    3.Propose confirmation
    Table T333 -AUTTA
              T333-SQUIT &
              T333-VQUIT is activated.
    Please let me know any other settings to be performed
    Regards
    Krishna

    Hello Experts,
    I am trying to create the Automatic TO and TO confirmation for the mvt type 321.
    I made the below settings
    I have activated in OMKZ as below
    1.Automatic TO for 321 mvt ytpe   -"A"
    2.TO item to be confirmed immediately  - tick mark
    3.Propose confirmation   - tick mark
    Table T333 -AUTTA
    T333-SQUIT &
    T333-VQUIT is activated.
    I have activated in OMKX as below
    Table T321-TBFKZ Immediate TO Creation with "A"
    T321-TAFKZ TR creation with "X"
    After doing the settings i am not able to see the Posting change number in the Material document created for the mvt type 321.
    Please let me know how to create the Posting chnage notice for the material document and how to convert the Posting change notice to automatic TO and confirmation.
    Thanks & Regards
    Krishna
    Edited by: Hariharan krishna on May 25, 2011 8:01 AM

  • File-to-file or File-to-RFC for Automatic PO creation and GR creation

    Hi,
    We are on XI 3.0 and the following has been put to me:
    We will receive a .CSV file from FTP server, into XI and then need to create Purchase Orders followed by the Goods Receipt documents in R/3 based on the incoming data.
    Further to this, the requirement is to give a log of the successfule and failed PO + GR document summary to the business.
    The programme in R/3 will compare the incoming file nmame with archived files already processed and will reject any files with duplicate names.
    I was suggesting to go with the file to RFC in R/3 whereby we can have a Z shell BAPI to include the standard BAPI for PO creation and GR creation. This Z code can then be extended to email the log to the business of which records were successfully created and which failed.
    However, I am stumped as to how can I make the file duplication comparison on R/3 as the incoming file will also be stored on R/3 archive somewhere.
    Can this be made when the BAPI is called in XI?
    I can configure alerts when the BAPI is mapped from incoming file for that interface.
    What was suggested also was to pick up the CSV file and thow it as it is in R/3 and then the Z code can go through it and create the PO and GR objects. However, then it does not make much sense to use XI as the middleware platform.
    Please advice.
    Regards,
    Arcahna

    Hi Archana,
    Take a look to this blog: 
    https://wiki.sdn.sap.com/wiki/display/XI/Different%20ways%20to%20keep%20your%20Interface%20from%20processing%20duplicate%20files
    Maybe it could help you for the duplicate files.
    Regards,
      Juan

  • ACE load balancing and testing using soapUI

    Hey, I am trying to crowd source a solution for this problem.
    A client is testing using soapUI to an application that is being load balanced via ACE. There are two webservers behind the VIP servicing the client request. When client tests, requests are timing out per the soapUI log. A packet capture was taken and it clearly shows that ACE is not forwarding the HTTP data back to the client. When client tests by bypassing the ACE load balancer, it works fine. But, there are other clients from other applications that are making successful connection to the load balanced application via the VIP.
    Question, is there any thing unique with making HTTP/XML based requests using soapUI? LB configuration is shown below:
    class-map match-all EAI_PWS_9083
      2 match virtual-address 10.5.68.29 tcp eq 9083
    serverfarm host EAI_PWS_9083
      description WebSphere Porduction
      failaction purge
      probe tcp9083
      rserver ESSWSPAPP01 9083
        inservice
      rserver ESSWSPAPP02 9083
        inservice
    policy-map type loadbalance first-match L7_POLICY_EAI_PWS_9083
      class class-default
        serverfarm EAI_PWS_9083
    policy-map multi-match L4SLBPOLICY
    class EAI_PWS_9083
        loadbalance vip inservice
        loadbalance policy L7_POLICY_EAI_PWS_9083
        loadbalance vip icmp-reply active
        appl-parameter http advanced-options CASE_PARAM
    parameter-map type http CASE_PARAM
      case-insensitive

    Hi,
    Your configuration looks fine. I am not familiar with soapUI but if it is like a normal TCP connection followed by HTTP requests, i don't see why this shouldn't work.
    Do you know if there is a difference while using soapUI and normal request using browser?
    Regards,
    Kanwal

  • PO not created automatically after creation and approval of SC

    Hi all,
    We are using SRM7.0 Extended Classic Scenario.
    We are able to create Shopping Cart successfully.
    For items where a source of supply is not supplied, the Shopping Cart goes through the approval process and then into the sourcing Cockpit.
    But for the other Shopping Carts, PO is not getting created automatically after the approval of SC.
    Any ideas/suggestions on this issue would be highly helpful.
    Thanks,
    Priya

    Priya,
    Can you check this configuration in Sourcing  for particular PCat?
    *Automatic requirement grouping; sourcing for items without assigned*
    source of supply:
    Then run the report BBP_SC_TRANSFER_GROUPED which will  automatically group requirements together for
    the creation of a PO.
    And,  If the requirement does not have a source of supply, it appears in the work list of the sourcing application for manual assignment. Once you have assigned a source of supply, you can submit the requirement to the report.
    Let us know if it works, and should help you this one.
    Thanks,
    Rahul Mandale

  • Automatic bookmark creation and sorting

    I have to make 4 quality manuals in PDF (each around 300 pages) from loose word files. They are organized like this
    folder 1
    chapter 1.doc
         chapter 1.1.doc
         chapter 1.2.doc
         attachment 1.1.doc
    folder 2
    chapter 2.doc
         chapter 2.1.doc
         chapter 2.2.doc
         attachement 2.1.doc
         attachment 2.2.xlc
    etc...
    Converting them to a single pdf can be easily done by combine files, but the bookmarks are not correctly sorted. The bookmarks are used for easy navigation. Is there a better work around to do such an exercise?

    Hello Experts,
    I am trying to create the Automatic TO and TO confirmation for the mvt type 321.
    I made the below settings
    I have activated in OMKZ as below
    1.Automatic TO for 321 mvt ytpe   -"A"
    2.TO item to be confirmed immediately  - tick mark
    3.Propose confirmation   - tick mark
    Table T333 -AUTTA
    T333-SQUIT &
    T333-VQUIT is activated.
    I have activated in OMKX as below
    Table T321-TBFKZ Immediate TO Creation with "A"
    T321-TAFKZ TR creation with "X"
    After doing the settings i am not able to see the Posting change number in the Material document created for the mvt type 321.
    Please let me know how to create the Posting chnage notice for the material document and how to convert the Posting change notice to automatic TO and confirmation.
    Thanks & Regards
    Krishna
    Edited by: Hariharan krishna on May 25, 2011 8:01 AM

  • Automatic db creation and import

    Hi Forum,
    sorry for the maybe trivial question - but I could find a reliable advise via the web.
    Quite new to oracle at all I run 10g on Debian Sarge without any problems. As I'm still testing and playing around this is quite fine even Debian is not supported.
    I use Oracle togeter with a java app.
    Now I would like to setup some automatic tasks and do not now how:
    I have an example database storing a list of names. First I would like to know how to create a new database (SID) using one of the stored names as SID. Second I have a dump file that I would like to automatically stored in that database. Third I would like to have this repated at a predifined time (to get a cleam install).
    I thought about using shell/bash scripts as well as designing a java class to do this.
    So what would the community advise? Java? Scripts?
    And - if I know how to do this... how far is my way to backup a certain db and delete it from my system after that? Is it difficult to create it again and restore the data saved before?
    Hmmm... questions... but I'm keen on learning to use Oracle
    thanx

    Depends what you want the jpegs for. If it's only to be able to view them on the laptop you don't need them at all. Just let LR create 1:1 previews and set it to never delete them. Then synchronize the previews.
    That said it sounds like you might be happier with external hard discs.
    John

  • Automatic TO creation and confirmation for a Material document

    Hi Dear All,
    i am new to MM andWM.
    I have to customization for auto transfer orders and confirmations for material documents what ever created with 101 movement type in Inventory Management. I have down configuration like below.
    SPRO->Logistics Execution->Warehouse Management->Activities->Transfers-> Set Up Autom. TO Creation for TRs / Posting Change Notices
    Double click on ‘control data ‘tab
    Hear for my warehouse I given input like   Auto TO = ‘1’,
                                                                             AddId = ‘select check box’.
    And in ‘Assign control’ tab for 101 movement type I have given input like below.
    Automatic TO = ‘1’.
    TO item can be confirmed immed. = ‘tick checkbox’
    Propose Confirmation = ‘tick checkbox’.
    Foreground/Backgrnd = ‘D’.
    After creating of Material document I am executing report RLAUTA10 in SE38.When I execute this report system showing message like ‘TO processing finished: TR total:   17, TO created:    0, Errors:   17’.
    If I check header details of transfer requirements in LB03, i am not seeing ‘Tick Mark’ in Auto TO Creation field.
    Can any one tell me what the mistake i have down or if i need to do any further configuration. Please help me regarding this concern?
    Thanks in Advance..

    Dear Steve,
    Thanks a lot for giving reply with what I need to do, but I am unable to see result.
    I have down configuration like below even though system not processing Auto TO creation. Can you explain me if I have down any mistake below.
    Click on ‘Assign’ button,
    Press on ‘New entries’
    WhN = ‘900’
    Reference Movement Type = ‘101’
    Movement indicator = ‘B’
    Movement type for Whse Mgmt = ‘101’
    TR create Transfer Requirement = ‘X’
    Immed.TO Creation
    Mail confirmation for background processing = ‘01’.
    GR date = ‘2’

  • Automatic directory creation and renaming when importing pictures

    Hello,
    I was wondering if what I'm trying to do is possible with iPhoto or anything in Leopard.
    When I import pictures, I want to create folders and rename the pictures based on the date. For an example, when I import pictures taken on November 10th, 2007, I want to create folder "2007", then under that folder create "11", then create "20071110", then rename the photos in "20071110_001.jpg" format.
    Is it possible?
    Thanks.

    No, actually I did all your posts all the way to the end. How can you tell? because I answered this question
    The goal.
    When importing the pictures through my Mac Mini, copy new pictures in the Samba server using the same structure, NOT in my LOCAL Mac Mini.
    in my very first reply to you. I did this when I said:
    No.
    Was there some part of that that was confusing?
    iPhoto will not do this, and, frankly, I know of nothing that will on the Mac. If you're confident with AppleScript you may be able to whip up a Folder Action to do it where you:
    1. Download the pics to a folder in the Finder. Have the attached script read the exif data, rename the files, and then create the required folders on the Samba server and copy the files over. But I have to say that I don't know if you can get a Finder Script to read exif data. I certainly could find nothing in the library. Nor is there anything in the Automator library that I can see. You might like to post on the AppleScript forum:
    http://discussions.apple.com/forum.jspa?forumID=724
    where some of the folks over there might be able to help.
    2. Then have an attached script that will automatically import the files into iPhoto. This is relatively straightforward with either Automator or Hazel.
    Regards
    TD

  • Why do I get this error when I want to run a test using Ant?

    Why do I get this error when I run the Ant build file?
    Testsuite: JUnit
    Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    Caused an ERROR
    JUnit
    java.lang.ClassNotFoundException: JUnit
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

    Abder-Rahman wrote:
    In the "XML" file, I was giving the name of the test as JUnit ---> <test name="JUnit">Well, do you have a class called just "JUnit" that contains a test?

  • Automatic lot creation based on time Frequency

    Hi,
    For 01 inspection incoming inspection ,
    F or  certified vendors, without inspection , material is getting posted to UUS without lot creation. ( QI info record settings).
    but for this case , business requirement is to get automatic lot creation based on time like 6 months once .
    Automatic lot to be created for this certified vendor on time frequency basis. how to trigger this Lot creation based on time.
    Help.
    VV.

    Hi,
    In std SAP we dont have option of generating Automatic lot creation based on periodic basis. But we can provide some workaround soultion.
    Option 1:
    USe Source Insepction concept. Here Inspection lot will be created for every P.O. Here u can relase P.O line items in QI07 which can sceduled in Job planning on periodic basis. Use Skip inspection lot concept to skip unwanted lots. This has direct relation with Q-Info record.
    Option 2:
    U can generate automatic lot creation based on Stability study concept. Here are the following steps
    Initiate Stablility study
    Create Initial sample
    Perform intial test
    Confirm initail sample
    stability planning
    Define storage condition
    create testing schedule
    store stability sample
    define cycle start
    schedule
    complete stability study.
    Option 3:
    To get Automatic lot creation u can use BAPI QPL1_INSPECTION_LOT_CREATE . When a due date come for inspection,it created a lot of 01 / Z-01 inspection type automatically through QA01( call the program ,enter the inspection lot origin & material,vendor & save). Create Z-T code which has vendor material plant combination.
    Execute the above T-code based on Periodic basis.
    Explore above 3 options and choose best one according to ur requirements.
    Edited by: Lokesh K on Oct 12, 2010 11:27 AM

  • Automatic PO creation (ME59)

    Hi,
    1) source list and purchase info records both are mandatory for automatic PO creation ? with missing data in either of one, can I proceed ME59
    2) if i have mentioned one material for two or more vendors in ME01 and ME11, which vendor will be assigned to PO
    regards

    Hi,
    Just to add make sure your material master IS TICKED for automatic PO creation and vendor record is also ticked.
    You should have a valid info record that consist of valid conditions.
    Thanks
    Silas

  • Need a tool to create Development and Test instance of a Production db

    I am very new to Oracle and have previously worked with SQL Server 2005/8 only.
    My current company only has one instance of the Oracle database (which is production) and until now, all development and testing used to take place on the same instance (what a mess!!).
    Anyways, we have now decided to create a development and test on a separate physical machine. We are on Oracle 11g on Windows 2008 Server.
    In SQL Server, it used to be fairly simple, just take a full backup of the database and restore it on another box with SQL Server and we had a new instance of the same database.
    Can someone point out a simple technique to create these development and test instance in Oracle. Essentially, we want to clone the database. Are there any tools available that can make this task simple.
    Thanks.

    Welcome the the forums !
    I believe this question is better suited to the "Database - General" forum (General Database Discussions but here is my take.
    You will first need to clone the Oracle binaries (ORACLE_HOME) - see MOS Doc 1154613.1 (Master Note For Cloning Oracle Database Server ORACLE_HOME's Using the Oracle Universal Installer (OUI))
    Then clone the database - see MOS Doc 458450.1 (Steps to Manually Clone a Database)
    HTH
    Srini

  • When using program RFDM3000/Automatic creation of dispute cases what is the difference with the option of Automatic incoming payment and Open items?

    We currently have a batch jobs running for each, automatic incoming payment and open items.  This was set up in the past and we are trying to determine what the difference is for each of these functions?  Do you need to have the automatic incoming run prior to the open items for residuals and payments on accounts?

    Hi Chris,
    Program RFDM3000 creates dispute cases for residual items arising during automatic incoming payments (account statement, lockbox), during check presentation, or in postprocessing.
    Alternatively, you can use the program to create dispute cases for open receivables items. You can use the selection criteria to restrict the quantity of open items (for example, using the document type and posting key for residual items from incoming payment postings).
    You will find more information in the link below
    http://help.sap.com/saphelp_erp2004/helpdata/en/0b/e07340b0c6980ae10000000a155106/content.htm
    Regards,
    Jose

  • Automate the EAR creation and deployment process

    Hi,
    I am trying to automate the EAR creation and deployment process. I am following this approach - http://www.oracle.com/technetwork/articles/adf/part4-098813.html
    In this approach we use pure ANT without OJDeploy. I am able to Create the EAR file but while deploying to weblogic server manually I get the attached error.
    Error is - java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    I would like to know, Is this the best practise to automate the EAR Creation and Deployment Process? If not, Please provide me some other best approach.
    Thanks in Advance.
    Regards
    Balaji S

    Balaji,
    I am the author of that article.
    At the time I wrote the article, ojdeploy was not working properly - however, the bugs that I noted at the time have been fixed. If I were writing the article today, my strong recommendation would be to use ojdeploy.
    If you insist to use the pure ANT (no ojdeploy) approach, I'd debug your issue this way:
    1). Generate the EAR file using the deploy option from the application navigator in JDeveloper. Deploy that EAR file to your WLS server and test to ensure it works. A note that if you are creating an ADF app, you must deploy the JRF to WLS first.
    2). Once the EAR from JDev is working, use a tool such as WinZip to expand the JDeveloper-generated EAR file and your ANT-generated EAR file. Compare the two. If you find differences, fix the ANT scripts so that they are the same.
    John

Maybe you are looking for

  • Mac book pro hd upgrade

    I am looking to upgrade the hard drive on my 2010 13" mac book pro any suggestions for good brands? Also about how much will this cost?

  • XSLT 1 or 2?

    A developer has produced for us an XSLT transform. When run outside FrameMaker it works fine, and the resulting XML imports into FrameMaker. With a view to streamlining the process, I am trying to call the XSLT by adding it to the structured applicat

  • Xb4 and dv6t mute bug

    I have a dv6t laptop with an i7 processor, win 7 pro, and the factory tv-tuner.  I use windows media center to watch videos and tv.  The laptop is usually docked in the xb4 media docking station, I very rarely undock the notebook.  Often, I will brie

  • Why this query is giving error in report

    I have a simple query ... SELECT &P_FLEXDATA C_FLEXDATA, CHART_OF_ACCOUNTS_ID C_NUM FROM GL_CODE_COMBINATIONS It is running fine in SQL prompt but when I create it as a report query then it is giving error: ORA-00904 "C_FLEXDATA": invalid identifier

  • Mac os x Leopard for windows

    I am downloading windows to my mac. Do I need the Mac os x leopard disk? Or will windows work without it?