How to implement transactions in Tomcat using MySQL

Hi,
I am trying to find a way to implement Transactions in Tomcat 4112 using a DBCP connection pool with MySQL (connector/j 3.0.16).
I am developing a web app using the Struts framework and have tried using JOTM for the transaction implementation. However the JOTM PreparedStatement objects do not support the getGeneratedKeys() method (which i definitely need!!!).
I have one database with multiple datasources, but the dataase may become much larger and require multiple instances in the future so i want a solution that will scale.
Can i use the simple JDBC connection.commit() methods? Are these robust? Or is there a simple way to use the base JTA/JTS implementation myself??
Or is there something like JOTM that implements the full JDBC 3.0 interfaces!!
lots of questions - sorry...
thanks
will crick

I've got the same problem here.
I want to implement a HyperlinkListener to a JLabel. (Unlike suggested above, it is only supported by JEditorPane and not JLabel)
The goal is, that if a user clicks on a Link in a JLabel, the standard browser opens and displays that page.
Can somebody please help?
My ultimate goal would be to also be able to add clickable HyperLinks in ToolTip texts, but i guess that'd be even more complicated.

Similar Messages

  • How to update transaction data automatically into MySQL database using PI

    Dear All,
    With reference to subject matter I want a sincere advice regarding how to update transaction data automatically into MySQL database using PI. Is there any link available where I can get step-by-step process.
    Ex: I have a MYSQL database in my organization. Whenever a delivery created in SAP some fields like DO Number, DO quantity, SO/STO number should get updated in MYSQL database automatically.
    This scenario is related to updation of transactional data into MYSQL DB and I want your suggestions pertaining to same issue.
    Thanks and Regards,
    Chandra Sekhar

    Hi .
    Develop a sceanrio between SAP to Database system,When the data updates in SAP Tables read the data and update it in DATA Base using JDBC adapter,but there will be some delay in updating data in MySQL.
    serach in sdn for IDOC-TOJDBC sceannario,many documents available for the same.
    Regards,
    Raja Sekhar

  • How to implement hyperlink in java using swing components

    hi.....
    pls help me to find out solution
    how to implement hyperlink in java using swing components

    I've got the same problem here.
    I want to implement a HyperlinkListener to a JLabel. (Unlike suggested above, it is only supported by JEditorPane and not JLabel)
    The goal is, that if a user clicks on a Link in a JLabel, the standard browser opens and displays that page.
    Can somebody please help?
    My ultimate goal would be to also be able to add clickable HyperLinks in ToolTip texts, but i guess that'd be even more complicated.

  • How to assign values to JTable using mysql database

    how to assign value to JTable using mysql...

    Search the forum. You use the values of the "ResultSet" to create a "DefaultTableModel" which you then add to the "JTable".
    I'll let you pick the search keywords to use, which I've suggested above. You can also throw in my userid if you want to specifically look for my solution.

  • How to implement row level security using external tables

    Hi All Gurus/ Masters,
    I want to implement row level security using external tables, as I'm not sure how to implement that. and I'm aware of using it by RPD level authentication.
    I can use a filter condition in my user level so that he can access his data only.
    But when i have 4 tables in external tables
    users
    groups
    usergroups
    webgrups
    Then in which table I need to give the filter conditions..
    Pl let me know this ...

    You pull the Group into a repository variable using a session variable init block, then reference that variable in the data filters either in the LTS directly or in the security management as Filters. You reference it with the syntax VALUEOF("NQ_SESSION.Variable Name")
    Hope this helps

  • How to implement for sap system use HADR

    hi expert ,
           i am a newbie to sap basis, we have a requirement that do HA for our sap using HADR,i want know if there are some good sulotion for my scenario。
       our scenaro is we have two window 2008 sever host,one host  has a sap system and we want the sap db2 database as a primary,and the other host also has a same the system which is restore from the previous sap system which we implement by system copy using database restore not migration。i want know as our secanrio could i achive SAP application HA by HADR,if we donu2018t have  HA  software  like MSCS。whether we must manual monitor the primary sap   when it stop because any issue like hardware failed and then manual start the other sap system in the other host?
      our two sap system have different sap profile beacause the hostname are different.
    our aim is when one of our host can't use we can immediate start the other sap system in the other host, the less the change the better the solution .
    is it possible?
    thanx very much,
    best regards.

    hi paul ,
        thanx for your information,i have already read the inforamtion about sg247363 once-over and SAMP。 but unfortunately we have a different situation,we only have two windows servers and must installed windows server 2008 OS because some reasons。we also don't have have other host to install sap。as this situation,how could we implement HA beacuse we also don't have shared disk。the window server are isolation。
    i  also read some pdf which download from sdn , in the book the HA is  implemneted as the sap application has a separate host and has two host for DB2 database using HADR,the HA is rely the cluster software 。in this situation the sap application also need HA to avoid single point failure。
        as the limited i have said above, is it possible to do HA by MSCS ,can any body tell me if the MSCS is free to install in OS windows 2008? if we can't use it  free,have any other solution?in the worst , we must manual monitor the application and when a sap application or database can't work ,we want to restart the other sap which in the other host,we need the database synchronization between two database which using HADR。is it possible ?if it do, whether there are some additional setup for sap application because the two sap application have different sap profile name(a sap is a system copy from the other by database restore)。
        any reply will be appreciated。

  • How to implement the pessimistic locking using toplink with sybase

    we want to allocate the unique primary key to each row when many user try to insert the records concurrently..So what we are trying to do is we calculate the maximum of Primary Key and incremented it by 1. Now we want to Apply the locking concept on the so that unique key will be allocated to each newly inserted row
    Can you please tell me
    1. how we can genrate unique primary key in toplink using sybase?
    2.how to implement the pessimistic or optimistic locking ?which one will be preferable?

    Hi brother
    I think that this link can help you
    http://download-east.oracle.com/docs/cd/A97688_16/toplink.903/b10064/database.htm#1007986
    Good luck

  • How to implement  business rules by using drolls in OSB

    Hi
    I am new to Drools,can any body tell how to implement drools concept in OSB11,provide any useful links or blogs.
    Thanks in Advance
    Mani

    Mani,
    I have implemented Drools by exposing them over web service call through Business Service of OSB.
    As you are using Java Callout, try to set proper return type for the java method called, better to use XMLObjects as the return type.
    http://www.xenta.nl/blog/2011/08/29/oracle-service-bus-java-callouts-with-xmlobjects/
    http://mazanatti.info/index.php?/archives/63-Oracle-Service-Bus-generating-XML-Objects-from-Java-Callouts.html
    http://blog.xebia.com/2009/10/11/java-callout-on-the-alsb/
    http://itnewscast.com/middleware/oracle-service-bus-java-callouts-xmlobjects
    How to retrieve the java object in a proxy service in osb -- Plz help
    Hope it helps !!
    Abhinav
    Edited by: Abhinav on Dec 12, 2012 4:21 PM

  • How to implement hibernate with tomcat

    i am trying to implement hibernate through tomcat. but cant able to do it...can anyone suggest a solution...and also can i use MS Access database with hibernate?
    thanks
    Tapan

    Well, yes but ...
    Thanks for this steer but when I try to connect to tomcat 5.5 thru my browser that way I get a dialog box with this message:
    "Netscape 7.2 and localhost cannot communicat securely because they have no common encryption algorithms"
    What now?

  • How to create ssas cube by using MySQL Database

    please tell me step by step process to create ssas cube by using MySQL database in my system, i have Sqlserver 2008 enterprise edition and MySql5.0

    There is an OLEDB provider for MySQL which you can get from here
    https://cherrycitysoftware.com/ccs/Providers/ProvMySQL.aspx otherwise you can also use SSIS to push the data straight into the Analysis Services database without needing to stage it in SQL Server. Also, as you can load data into AS using XMLA you could
    also write your own loader to extract data using ODBC and push it into AS using XMLA, essentially what I suspect SSIS does. However those latter solutions don't allow you to create a database on top of MySQL because you need an OLEDB (or .net) provider for
    that.
    In the simplest case, install the OLEDB provider and then in AS create a Data Source connection using that provider. Once you have done that you should be able to create a Data Source View using that connection enabling you to import the schema definitions
    for the tables/views in the MySQL database. From there you build dimensions and cubes etc. about which there is plenty of information on the web.
    http://bi-logger.blogspot.com/

  • How to implement a certain idea using J2EE.

    Ok I have the following situation...
    1- Client sends an XML document to server and awaits response.
    2- Server stores XML document to database.
    3- Using stored procs server processes the XML document. Data is inserted to tables, validation etc...
    4- Server starts polling database on status of inserted doc.
    5- 2nd application polls database for inserted data.
    6- Application retrieves data.
    7- Application creates file to 3rd party specs.
    8- Application sends file to 3rd party and awaits response.
    9- Application receives response from 3rd party and updates status of data.
    10- Server which is polling database notices status change and replies back to Client.
    All this is done in realtime. Bassically a client conects to our server and sends us a document. We process the document and forward it to a 3rd party. 3rd party returns response and we return that response to the client. This was all done using IIS ISAPI DLLs and Custom C++ applications that we wrote in house.
    This is hell since the applications poll the DB every few seconds, and special status fields have to be maintained, special "queue" tables where created etc...
    So how can j2EE be used to implement the above situation?
    I was thinking the following can be done and maybe you guys can correct me or add...
    A few rules that must be followed. The XML doc must be stored in the DB for archiving purposes. The XML doc also contains the client login info which is checked against the DB. Cleint should be able to come back when ever he wishes and check the processing history of the XML doc etc...
    1- A web service is overkill, a simple servlet that accepts an XML document through SSL, HTTP POST is good enough...
    2- Servlet stores XML doc using a CMP.
    3- Servlet invokes statless session been which extracts login info from XML doc and checks login info against a CMP entity bean. If the login information is wrong servlet returns error to client. And updates the status of the stored XML doc to failed or what ever.
    4- If the login info is correct the servlet invokes a statefull session bean which will, parse the XML doc, invoke a combination of BMPs and CMPs and take appropriate action (Business Logic)
    5- Servlet will push the data extracted from XML doc to a "in" message queue. Servlet will listen to an "out" message queue.
    6- Application listening to "in" message queue. Retrieves message and sends it to 3rd party. 3rd party responds. Application pushes response to "out" message queue.
    7- Servlet that is listening to "out" message queue commits all data etc... Update the state of the stored XML doc to processed or what ever and return the reposne to the client.
    That's it... Anybody see anything wrong with this? Also since the application is not running within the web servers VM can it participate in the transaction? So if it where to fail to send or retrieve the data from the queues or the 3rd party. The EJBs that where created by the Servlet would take appropriate action...

    This sounds exactly like what I am trying to do. May I please see your code to get some ideas. I am having trouble converting my code to an EJB architecture. The stub continues to create errors. Originally, I took the XML in at the servlet using an InputSource object but couldn't pass this to the SessionBean since it wasn't serializable (it didn't help to create a class that extended InputSource and implemented Serializable). Instead, I read the xml stream into a buffer and passed that to the Session Bean but then the stub threw errors when creating a DocumentBuilderFactory using the Dom Parser. It sure was straight forward before the RMI factor was added in. Does anyone have code samples that would help? Thank you very much.

  • How Can implement the audit function using toplink?

    My system must record all the modification, how can I use toplink to implement it.
    I know when toplink modify some object, the toplink will check how many attribute
    have been modified, and then update it to database, Can I implement the record when
    the toplink check modification?
    PS: I dont want to use database trigger.
    Thank first!!

    This thread has been inactive for a while, so perhaps I'm missing something. I am attempting to create audit events on domain objects using a TopLink 10.1.3 DescriptorEventAdapter.
    These audit events mutate or create a snapshot collection on the domain object. Based on what I understand from the above thread, do I still need to create another UoW to commit these in my preInsert()/preCreate() handler methods?
    Is there a way to get in the game before the IDs are assigned to the objects and the change set is computed?
    I certainly don't claim to fully understand the historical client session docs. However, one of our requirements is to show object-attribute-level deltas (list chronologically, grouped by transaction, the attributes that have changed, who changed them, etc. with their before and after values). So my first-blush reaction is that it's easier to utilize the change set to create a collection of transactionally-grouped audit objects on the domain.
    Thanks much,
    --Todd Fredrich                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to implement logoff in Webdynpro using UME

    Hi all.
    I am ken from Shanghai, China.
    These days I am developing WebDynpro in WebDynpro Develop Studio ver 2.0.12
    When I want to put security in my webDynpro application, I use UME to wrap the security authetion.
    My webdynpro requires user to input username and password to acess my webdynpro application, but there is no ' log off ' function in my webdynpro application.
    How can I implement ' log off ' function ?
    log off function is the function to let user log off from current session.

    Web Dynpro components generally are deployed and run within EP, which provides you with the log off button.
    If you still require that a log off button be present in the Web Dynpro application then there are a lot solution described in this forum.
    Forcing Log Off..
    I think this link should serve the purpose.
    Regards,
    Noufal

  • How to implement single sign-on using java?

    I need your help regarding the following task, please go through it and tell me if you have a solution to it.
    DSOWeb is a portal which has links to all the reports generated from Microstrategy8.0.1 (MSTR) [it is another tool which generates the BI Reports] and my requirement is like when a report link in DSOWeb is clicked it goes to MSTR and shows a report of MSTR but the user is unaware of all this that the system is entering into some other portal and giving that report to him.
    1. User logs into DSOWeb (Implemented using Struts framework) - He is automatically logged into MSTR (Java Spring Architecture) as well.
    How to get the session Id of MSTR from DSOWeb and maintain that session within the DSOWeb???
    2.User clicks on a report link - He either uses the session created above or a new session is created for him, if the old one no longer exists.
    3.When User clicks Logout in DSOWeb the system should also internally invalidate the MSTR Session and logout from MSTR .
    Note : Here DSOWeb and MSTR applications are running in different Servers.

    Hello Meghal,
    It is possible to implement social login via Facebook for SAP Enterprise Portal 7.3 by simply using the SAP Cloud Identity offering.
    More details about SAP Cloud Identity you will be able to find here:
    SAP Cloud Identity Solution Brief:  Simplify and Secure Cloud Access to Critical Business Data
    SAP Cloud Identity features - latest release: http://scn.sap.com/community/security/blog/2014/12/18/new-capabilities-with-the-latest-release-of-the-sap-cloud-identity
    Please, find also the documentation about social login implementation:
    Enable or Disable Social Sign-On for an Application
    Best regards,
    Donka Dimitrova

Maybe you are looking for

  • My ipod touch 1st gen . needs to be reset the wi-fi

    ipod touch - 1st gen .  the wi-fi needs to be reset

  • Bex Analyzer doesn't work

    Dear All, When I try to run the BeX Analyzer, either from Start->Business Explorer->Analyzer or from RRMX transaction, I can't open any queries/workbooks and I see all the icon in German. The other components (Query Designer, Report Desinger) and the

  • XmlSignature using xpath as a reference URI

    Hi, I would like to use the xpath expression while creating the reference uri element , for example this is how my code looks Reference ref = fac.newReference("#(//*[@authenticate='true'])", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.n

  • Create console output from LabView

    Hi all. Is there any way of creating a console string output when calling a dll from LabView? I have to call a C++ program from LabView and I'm using a dll. I need to debug this program, and I think that using "cout" is the fastest and simplest way.

  • User Inputs Not Stored In External File

    I'm using the following code to store marks if (courseCode.compareToIgnoreCase(cCodeTerminate) != 0)           System.out.print("Enter your exam marks for " + courseCode + ": ");           examMarks = Integer.parseInt(in.readLine());           //Loop