Commit  when exceptionn occurs?

public static void main(String args[])
method1();//transaction1
method2()// transaction2
// catching exception here
say we have a main method main . In that main method we call method1 which creates a customer using connection con1. Then we call method2() which creates
the account for customer using same connection con1.I have two questions on above
1)Assume some exception occurs during method2 and we catch the exception and do con1.commit(); Will the transaction1 still be commited ?
2) Assume no exception occurs. But When we do con1.commit jvm crashes and transaction is not committed yet, Now when we restart the application
will that transaction be committed?

JavaFunda wrote:
public static void main(String args[])
method1();//transaction1
method2()// transaction2
// catching exception here
say we have a main method main . In that main method we call method1 which creates a customer using connection con1. Then we call method2() which creates
the account for customer using same connection con1.I have two questions on above
1)Assume some exception occurs during method2 and we catch the exception and do con1.commit(); Will the transaction1 still be commited ?Yes, t1 will be committed. Additionally, any changes that were part of t2 that occurred before the exception will be committed, because in reality, if you don't commit until {t1; part of t2; catch}, t1 and t2 are the same--there's only one transaction.
Committing in a catch block is a bad idea, because you don't know how much was done before the error occurred.
It defeats the purpose of a transaction, which is that either all happens, or none happens.
2) Assume no exception occurs. But When we do con1.commit jvm crashes and transaction is not committed yet, Now when we restart the application
will that transaction be committed?Impossible to say, but then, you don't actually care. and it shouldn't matter.
Since you're talking about the JVM crashing at an inopportune moment, there's always the chance of the commit either succeeding or failing, and then the JVM crashesbefore you can find out, so no matter what, you have to assume that when restarting after a crash, you'll have to figure out which transactions failed and which succeeded, if that matters to you.
Edited by: jverd on Jul 21, 2011 9:54 AM

Similar Messages

  • MySQL Exception in WL 8.1 - Can't call commit when autocommit=true

    Thanks in advance. Any help would be appreciated as I'm new to Weblogic. I've created a database control and get the following error at run time that I can't seem to get around:
    An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.sql.SQLException:
    The server trace is as follows:
    ####<Jul 23, 2004 8:54:08 AM CDT> <Error> <WLW> <dts-client1> <cgServer> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <000000> <Exception processing ManageRouteTableJCS.ManageRouteTableTest
    java.sql.SQLException: Can't call commit when autocommit=true
         at com.mysql.jdbc.Connection.commit(Connection.java:1136)
         at weblogic.jdbc.wrapper.PoolConnection_com_mysql_jdbc_Connection.commit(Unknown Source)
         at com.bea.wlw.runtime.core.bean.BMPContainerBean.initTableAccess(BMPContainerBean.java:1650)
         at com.bea.wlw.runtime.core.dispatcher.DispComponentJar.confirmDeployment(DispComponentJar.java:157)
         at com.bea.wlw.runtime.core.dispatcher.DispResources.confirmDeployment(DispResources.java:754)
         at com.bea.wlw.runtime.core.dispatcher.DispCache.ensureDispUnit(DispCache.java:660)
         at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.getDispUnit(HttpServerHelper.java:501)
         at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:541)
         at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6456)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Note that the above error only occurs with the database control. When I use the following straight Java code I can read records from the database just fine:
    <%@page import="javax.naming.*,javax.sql.*,java.sql.*"%>
    <%
    Context ctx = new InitialContext ( );
    DataSource dataSource = (DataSource) ctx.lookup ( "MySQLDataSource" );
    Connection connection = dataSource.getConnection ( );
    Statement statement = connection.createStatement ( );
    ResultSet result = statement.executeQuery ( "select * from myTable1" );
    while ( result.next ( ) ) {
    out.print ( result.getString ( "field1" ) );
    out.print ( "<br>" );
    connection.close ( );
    %>
    I have experimented with disabling autconnect at the datasource with no change to the behavior.
    Environmet specifics:
    - Weblogic 8.1/SP3 (had the issue with SP2)
    - MySQL standard 4.1 (had the issue with 4.0 and MaxDB)
    - mysql-connector-java-3.0.14-production
    I have read many articles on using using MySQL and Weblogic using I/O classes but not an article where a control was created in design view as I have done. Since I am able to read from the database with the executeQuery command I am led to believe that I have the database and driver set up correctly.
    Anyone run into this and have an idea of what I don't have configured properly?
    Thanks,
    David

    Thanks in advance. Any help would be appreciated as I'm new to Weblogic. I've created a database control and get the following error at run time that I can't seem to get around:
    An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.sql.SQLException:
    The server trace is as follows:
    ####<Jul 23, 2004 8:54:08 AM CDT> <Error> <WLW> <dts-client1> <cgServer> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <000000> <Exception processing ManageRouteTableJCS.ManageRouteTableTest
    java.sql.SQLException: Can't call commit when autocommit=true
         at com.mysql.jdbc.Connection.commit(Connection.java:1136)
         at weblogic.jdbc.wrapper.PoolConnection_com_mysql_jdbc_Connection.commit(Unknown Source)
         at com.bea.wlw.runtime.core.bean.BMPContainerBean.initTableAccess(BMPContainerBean.java:1650)
         at com.bea.wlw.runtime.core.dispatcher.DispComponentJar.confirmDeployment(DispComponentJar.java:157)
         at com.bea.wlw.runtime.core.dispatcher.DispResources.confirmDeployment(DispResources.java:754)
         at com.bea.wlw.runtime.core.dispatcher.DispCache.ensureDispUnit(DispCache.java:660)
         at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.getDispUnit(HttpServerHelper.java:501)
         at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:541)
         at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6456)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Note that the above error only occurs with the database control. When I use the following straight Java code I can read records from the database just fine:
    <%@page import="javax.naming.*,javax.sql.*,java.sql.*"%>
    <%
    Context ctx = new InitialContext ( );
    DataSource dataSource = (DataSource) ctx.lookup ( "MySQLDataSource" );
    Connection connection = dataSource.getConnection ( );
    Statement statement = connection.createStatement ( );
    ResultSet result = statement.executeQuery ( "select * from myTable1" );
    while ( result.next ( ) ) {
    out.print ( result.getString ( "field1" ) );
    out.print ( "<br>" );
    connection.close ( );
    %>
    I have experimented with disabling autconnect at the datasource with no change to the behavior.
    Environmet specifics:
    - Weblogic 8.1/SP3 (had the issue with SP2)
    - MySQL standard 4.1 (had the issue with 4.0 and MaxDB)
    - mysql-connector-java-3.0.14-production
    I have read many articles on using using MySQL and Weblogic using I/O classes but not an article where a control was created in design view as I have done. Since I am able to read from the database with the executeQuery command I am led to believe that I have the database and driver set up correctly.
    Anyone run into this and have an idea of what I don't have configured properly?
    Thanks,
    David

  • Have Ipod Touch 2nd Gen. I noticed that my music will not play alphabetically anymore. Don't know exactly when this occured. I checked all my settings so doesn't seem to be that.Apple no longer is upgrading this unit..Thank u for your help.

    Have Ipod Touch 2nd Gen. 64 gig. I noticed that my music will not play alphabetically anymore. Don't know exactly when this occured. I checked all my settings so doesn't seem to be that.Apple no longer is upgrading this unit..I use windows XP but don't believe this is an issue since i have read posts saying this is not the problem..right now am converting my higher bit rate music to see if that changes anything. I also turned off my unit and the next thing am going to do is a restore if this doesn't work. Anyone find a fix for this yet? I also see that this is not a unique problem to Gen 2 units and is occuring on newer units as well..thank you all for any advise...

    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             

  • How can I get heap dump for 1.4.2_11 when OutOfMemory Occured

    Hi guys,
    How can I get heap dump for 1.4.2_11 when OutOfMemory Occured, since it has no options like: -XX:+HeapDumpOnOutOfMemoryError and -XX:+HeapDumpOnCtrlBreak
    We are running Webloic 8.1 SP3 applications using this Sun 1.4.2_11 JVM and it's throwing out OutOfMemory, but we can not find a heap dump. The application is running as a service in Windows Server 2003. How can I do some more analysis on this issue.
    Thanks.

    The HeapDumpOnOutOfMemoryError option was added to 1.4.2 in update 12. Further work to support all collectors was done in update 15.

  • Updating a table entry when remoteexception occures

    Hi,
    We are having the requirement that if remoteexception happens from EJB 1.1 then we need to update one table with status set to false.
    Since remoteexception is a system exception the transaction is marked for rollback and when we catch remoteexception and try to update the table
    it is not getting updated because the client transaction is also rolledback.
    we are actually using Websphere commerce server and we saw that WCS is able to update some of its own DB tables even when remoteexception occurs but we are not able to do it.
    So is there a way that when remotexception happens from EJB 1.1 we can update one of our tables.
    if yes then how can we do it.
    Thanks
    Ravi

    Try by putting this update code in a separate EJB with REQUIRES_NEW transaction scope.
    The the update is done in it's own transaction, and will not get affected by the other transactions 'marked for rollback' setting.
    -Roy

  • Exception: Can't call commit when autocommit=true

    Hello,
    I'm trying to use WebLogic 7.0 with MySQL 3.23.49 and MySQL Connector/J JDBC driver
    2.0.14. Everything has been working just fine but now I keep getting exception:
    java.rmi.RemoteException: EJB Exception:; nested exception is:
         javax.ejb.EJBException: EJB Exception: : javax.transaction.HeuristicMixedException:
    (weblogic.jdbc.jts.Connection, HeuristicHazard, (javax.transaction.xa.XAException:
    Can't call commit when autocommit=true))
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:258)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:208)
         at weblogic.ejb20.internal.BaseEJBLocalHome.postHomeInvoke(BaseEJBLocalHome.java:314)
         at weblogic.ejb20.internal.EntityEJBLocalHome.findByPrimaryKey(EntityEJBLocalHome.java:289)
         at com.nokia.m2m.demo.housemanagement.ejb.HouseBean_15mjuo_LocalHomeImpl.findByPrimaryKey(HouseBean_15mjuo_LocalHomeImpl.java:137)
         at com.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean.ejbCreate(HouseManagerBean.java:326)
         at com.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean_wnwfw3_Impl.ejbCreate(HouseManagerBean_wnwfw3_Impl.java:117)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:747)
         at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:799)
         at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:159)
         at com.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean_wnwfw3_HomeImpl.create(HouseManagerBean_wnwfw3_HomeImpl.java:77)
         at com.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean_wnwfw3_HomeImpl_WLSkel.invoke(Unknown
    Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:785)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    ; nested exception is: javax.transaction.HeuristicMixedException: (weblogic.jdbc.jts.Connection,
    HeuristicHazard, (javax.transaction.xa.XAException: Can't call commit when autocommit=true))
    Is this because MySQL is non-transactional? Should I change to transactional tables
    with MySQL, tweak driver somehow to be "autocommit=false" or what?
    Any help is greatly appreciated.

    MySQL comes in two flavors - MySQL and MySQL-MAX. The second
    one supports TXs, the first one doesn't. That could be the case, too.
    Slava
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Hi. It sounds like the DBMS doesn't handle standard transactions, and the
    driver lies. We'll set autoCommit(false) to start an EJB transaction. It
    sounds like the driver accepts the call and blithely ignores it. Later,
    when we prepared to call commit, the driver lets us know that theconnection
    is autoCommit(true) meaning there's nothing to commit.
    "Jari Länsiö" wrote:
    Hello,
    I'm trying to use WebLogic 7.0 with MySQL 3.23.49 and MySQL Connector/J
    JDBC driver
    2.0.14. Everything has been working just fine but now I keep gettingexception:
    >>
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException: EJB Exception: :javax.transaction.HeuristicMixedException:
    (weblogic.jdbc.jts.Connection, HeuristicHazard,(javax.transaction.xa.XAException:
    Can't call commit when autocommit=true))
    atweblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTra
    nsactionImpl.java:258)
    atweblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransaction
    Impl.java:208)
    atweblogic.ejb20.internal.BaseEJBLocalHome.postHomeInvoke(BaseEJBLocalHome.jav
    a:314)
    atweblogic.ejb20.internal.EntityEJBLocalHome.findByPrimaryKey(EntityEJBLocalHo
    me.java:289)
    atcom.nokia.m2m.demo.housemanagement.ejb.HouseBean_15mjuo_LocalHomeImpl.findBy
    PrimaryKey(HouseBean_15mjuo_LocalHomeImpl.java:137)
    atcom.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean.ejbCreate(HouseManag
    erBean.java:326)
    atcom.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean_wnwfw3_Impl.ejbCreat
    e(HouseManagerBean_wnwfw3_Impl.java:117)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.
    java:747)
    atweblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionMa
    nager.java:799)
    atweblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:159)
    atcom.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean_wnwfw3_HomeImpl.crea
    te(HouseManagerBean_wnwfw3_HomeImpl.java:77)
    atcom.nokia.m2m.demo.housemanagement.ejb.HouseManagerBean_wnwfw3_HomeImpl_WLSk
    el.invoke(Unknown
    Source)
    atweblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
    atweblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :114)
    atweblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
    atweblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:785)
    atweblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    ; nested exception is: javax.transaction.HeuristicMixedException:(weblogic.jdbc.jts.Connection,
    HeuristicHazard, (javax.transaction.xa.XAException: Can't call commitwhen autocommit=true))
    >>
    Is this because MySQL is non-transactional? Should I change totransactional tables
    with MySQL, tweak driver somehow to be "autocommit=false" or what?
    Any help is greatly appreciated.

  • How can I get Firefox to display details about a JavaScript error when one occurs?

    When in Internet Explorer I can set it up to display JavaScript errors as follows. Select Tools then Internet Options… then the Advanced tab. Under Browsing, find '''Display a notification about every script error '''and be sure its box is checked.
    I cannot find out how to do this in Firefox. I would like for it to display details about JavaScript errors when they occur instead of doing nothing.

    *Web Developer: https://addons.mozilla.org/firefox/addon/60

  • Adobe changes my numeric field to include commas when validation fails

    Adobe changes my numeric field to include commas when validation fails. My numeric validation setting is num{zzzzzzz9.99}. I want my numeric field to display as 99999999.00, no commas and only to have 2 decimals places. I added this validation to the Display, Edit, Validation and Data tabs under the validation pattern dialog box.
    When validation fails, adobe changes the display of the field to include commas and drops the decimal places:
    999,999,999
    How can I prevent this from happening? Any feedback is greatly appreciated.
    I've also added a change event to the field as well:
    \\only allows numbers and period.
    if (xfa.event.newText.match(/[^0-9.]/))
    xfa.event.change = "";
    \\only allows 11 characters to be entered.
    var maxLength = 11;
    if(xfa.event.newText.length >maxLength)xfa.event.change = "";

    I want it to display only numbers followed by 2 decimal places.
    999999999.00
    If I type all numbers in my field like 999999999999 and I go over the character limit of 11. My validation fails and then my numeric field is displayed with commas, 999,999,999 without the 2 decimal places. Is there a way to prevent adobe from automatically changing my fields?

  • What trigger can fire when execute_query occurs?

    I have a form where the new form instance trigger calls execute_query (parameters bring the query
    field info). I need the code in some when-radio-changed triggers to execute when execute_query occurs
    as well. What is the easiest way to do this? (I do not find when-new-item-instance firing at execute_query).
    forms 11.1.1.4
    Is the only way to do this to put each when-radio-changed in its own procedure and call each explicitly?
    (since you can't call a when-radio-changed trigger by name with execute_trigger (why?)).
    Well since I wrote that I did put the triggers in procedures and call them and that does work.
    Seems to me in forms6i the when new item instance trigger would've fired. This is definitely a whole
    new ballgame it seems.
    Edited by: lake on Jun 16, 2011 12:28 PM

    write the code in the POST-QUERY trigger for this purpose.

  • [svn] 1366: BLZ-136 log an error and return no properties when IntrospectionException occurs when introspecting a value object

    Revision: 1366
    Author: [email protected]
    Date: 2008-04-23 14:45:47 -0700 (Wed, 23 Apr 2008)
    Log Message:
    BLZ-136 log an error and return no properties when IntrospectionException occurs when introspecting a value object
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-136
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/io/BeanProxy.java

    Hi,
    Please apply the following correction manually.
    1. Go to transaction ST03N
    2. Change user from 'Administrator' to 'Expert Mode'.
    3. Go to Collector and performance analysis -> Performance database
       -> Monitoring database -> Contents
    4. Search where further info contains the string "h/2"
    like the following monikeys:
      - 'days  h/2'
      - 'weeks  h/2'
      - 'months  h/2'  
    5. Double click on each, so that they become red and show ** delete
    6. Finally SAVE
    This will remove the corresponding database related history up to the deletion date. It will accumulate anew afterwards.
    How can I identify the monikey that has to be deleted?
    When you load the text of the dump and then jump off to the break point of the debugger you may find the error break point look like:
    "IMPORT HIST2 FROM DATABASE MONI(DB) ID MONIKEY".
    To find the right monikey entry causing the dump you can search for the word 'MONIKEY' within the text of the dump. This can be 'days  h/3' or
    'tabgrowth  2'...
    You can then go back to the procedure above and search where further info contains the monikey that you found in the text of the dump.
    997535     DB02: Problems with History Data.
    Award points if helpful.
    Thanks,
    Tanuj

  • Hello sir i have an error when restore occurred 2

    hello sir i have an error when restore occurred 2 plz sir help me urgent

    santoshchd wrote:
    hello sir i have an error when restore occurred 2 plz sir help me urgent
    More Details are required...
    What are you trying to Restore and to what Device and what Exactly is the Error message / Alert you are getting...?

  • How can I save the images and movies on a  external Disk from iphoto program, to protect the images when problems occur in the laptop,

    How can I save the images and movies on a  external Disk from iphoto program, to protect the images when problems occur in the laptop,

    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store
    If you want to back up the Photos only:
    Export them using the File -> Export command.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • Exception in transaction commit when using Web Service Atomic Transaction

    Hi all,
    I am following this tutorial from Oracle on how to use WS-AT
    http://docs.oracle.com/cd/E14571_01/web.1111/e13734/transaction.htm
    A brief description about my application, which is wrote in JDeveloper:
    Two applications, one for web service and one for client.
    The WS is backed by an stateless EJB, which use JPA entity to do operations on the Oracle XE DB. The EJB transaction is container-managed, and the Entity Manager is retrieved from the JTA Datasource by using @PersistenceContext
    I put this on the EJB implementation class:
    @WebService(...)
    @TransactionAttribute(value = TransactionAttributeType.MANDATORY)
    @Transactional(version = Transactional.Version.WSAT10,
    value = Transactional.TransactionFlowType.MANDATORY)
    On the client application, I use another EJB to call the WS. The proxy and all generated types are created properly by JDev. I put this on the @WebServiceReference point in the client EJB:
    @Transactional(version = Transactional.Version.WSAT10,
    value = Transactional.TransactionFlowType.MANDATORY)
    The client EJB is also annotated with:
    @TransactionAttribute(value = TransactionAttributeType.REQUIRED)
    Both applications are deployed successfully in the integrated weblogic server. But when I run the method in the client EJB that call the WS to do a persisting operation on the DB, the following exception is thrown:
    javax.ejb.EJBException: BEA1-00227DF3AF249E472B1E: javax.transaction.xa.XAException: Failed state during prepare of WS-AT XAResource ...
    which causes:
    Exception occurred during commit of transaction Name=[EJB +_the client EJB's calling method_+
    The weird thing is, if I call a method which does a simple System.out.println (no DB related operation) then no exception is thrown.
    Furthermore, if I switch both WS EJB and client EJB to use bean managed transaction, the transaction is not propagated properly, as I see that UserTransaction in the WS EJB does not have the same status as UserTransaction in the Client EJB.
    Hence I'm suspecting that there is some issue during step 4 described in the Oracle documentation:
    "Server B receives the request for Application B, detects that the header contains a transaction coordination context and determines whether it has already registered as a participant in this transaction. If it has, that transaction is resumed and if not, a new transaction is started.
    *Application B executes within the context of the imported transaction. All transactional resources with which the application interacts are enlisted with this imported transaction*."
    This is all I can find. Please help me on how to resolve the exception.
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi r035198x,
    Thanks for your help. The problem indeed is in the non-XA datasource I used for the EntityManager. I created datasource what uses XA Thin Oracle driver and everything works fine now, commit and rollback both work nicely.
    Again thanks a lot.

  • ORA-00917: missing comma when using NVL

    Hi All,
    I have a INSERT statement which works fine and looks something like:
    EXECUTE IMMEDIATE
    'insert into MYTABLE(ID,TASK_ROLE, PROGRESS,SALES_PERSON) values ...
    However if I change the above piece to use NVL function like this:
    EXECUTE IMMEDIATE
    'insert into MYTABLE(ID,TASK_ROLE, NVL(PROGRESS,''0''),SALES_PERSON) values ...
    I am getting the following error:
    ORA-00917: missing comma
    Where should I enter the extra comman needed?
    Regards,
    Pawel.

    Hi these are in fact two simple quotes '. If I use only one simple quote I get an error:
    1 error has occurred
    ORA-06550: line 48, column 239: PLS-00103: Encountered the symbol "0" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem return returning <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between into using || multiset bulk member SUBMULTISET_ The symbol "* was inserted before "0" to continue.
    Same thing happens if I ommit the quotes at all and leave it like NVL(PROGRESS,0)
    Edited by: padmocho on Sep 20, 2010 11:37 AM

  • I'm trying to understand SYNC. How do I know if my addons I add to one computer or another are sync'd and not deleted when syncing occurs.

    Maybe the question has been answered, but I havent seen an answer in a way I understood.
    I have two or three computers I regularly use. I've been with Firefox for years - probably since version 3. Over time I've downloaded old standby add-ons like the popular AdBlock Plus and FireGestures to the more recent add-ons like Pocket and Fox-To-Phone. I've tried to maintain consistency between computers for the by manually downloading the add-ons to each computer. But I havent always been consistent, especially when I download a background program like Sareaholic or something else I dont often use, I kinda download it and forget it. I may later end up realizing "oh I got such-and-such on that other computer, not this one" and so my experience with each computer is unique.
    Hence, the beauty of Sync: A take-it-with-you, consistent browsing experience across the board. Am I right so far?
    But now I'm confused, especially about pairing, where one computer is added to another so they become linked (ie. synced) in an effort to have the entire browsing experience consistent :
    1) I think I'm going to lose addons. And whatever else I sync because Sync will treat one computer as primary when the pairing process occurs.
    2) What do I pair to what? If I set up the Sync account on computer #1 and later on while sitting at computer #2 decide I want to include it in the sync account and so I initiate a pairing, is computer #2 going to lose it's addons in favor of computer #1 or is it the other way around?
    I guess here's a good scenario. Lets say my computers have the following addons:
    ALL COMPUTERS: AdBlock Plus, Firegestures, LastPass
    and each computer has the following addons:
    #1: AdBlock Pop Up Addon, Download Helper, Pocket, Price Blink, X-notfier
    #2: AdBlock Pop Up Addon, Pocket, Shareaholic, QuickFox Notes
    #3: Download Helper, X-notifier, Shareaholic, Fox-To-Phone
    My sync account was set up on computer #1.
    ?? What can I expect from initially setting up syncing?
    ?? Once computers are linked, what can I expect when I download an addon or one computer or another?
    Thank you.
    - Eric

    Hi
    Here are a couple of tips as a starter. Choose a piece of music with strong accents. It doesn't necessarily have to have a big drum beat but should have strong hits or musical accents.  To start the edit off, choose sync points from your footage to edit to the musical accents. Then fill in the gaps with other footage.
    That should get you started.
    Adam

Maybe you are looking for

  • Search Through File with OPENCSV

    All, I am searching thru a .csv file for using regular expressions. I am looking for a patter that looks like a date: mm/dd/yyyy. I search for the pattern while reading my .csv file. Since I am in a loop, I can't get a permanent handle on the search

  • SAML 2.0 Security Token Reference cannot be resolved

    Hi, I am trying to send a SAML 2.0 token to SAP Portal 7.3 EHP 2 using the sender-vouches confirmation method. My message is signed by my client application. The signature references 3 parts: 1) a security token reference which in turn points to my S

  • Templates - pages not updating

    Hi. I have created a simple webpage with a separate CSS file. I have now saved this page as a template, the template folder is created in my root directory and the template appears within this folder. I now create a new page based on the template. Th

  • I have generation 2 - lost my notes- can they be restored?

    I had a couple of years of notes that just disapeared. I wonder if I did something to cause that and if they are "out there somewhere" so that I can retrieve them.

  • Lion Boot Problem on MBA

    Running Lion with no problems since the first weekend it was released.  Running on a Gen 2 MBA.  Just restarted and its hung at the Apple screen with spinning icon.  Went into recovery mode and verified filesystem and permissions.  No luck.  Any idea