Unable to rollback using BMT in a stateless bean

Hi,
My stateless bean contains the following testing code
UserTranaction ut = null;
try{
ut = context.getUserTransaction();
ut.begin();
// get database connection from OracleDataSource
// via container
// update a recored in db
if (true)
throw new Exception();
ut.commit();
} catch (Exception e){
ut.rollback();
} finally {
// close connection
I am using oracle 817 jdbc driver and when I execute the method,
the changes in DB are not rolledback and there is no exception
thrown. My questions are
1). Is BMT really work in oc4j? Anyone try before?
2). Is there any additional conditions/setting need to be done
in order to make BMT work? such as dataSource setting, database
configuration...
3). Could anyone provide sample code with related settings?
(especially what datasoure u are using)
Thank you very much!!!

Have you already tried to load the class like this:
Thread.currentThread().getContextClassLoader.loadClass(actionName);
Instead of using the same classloader that loaded your bean implementation, it uses the classloader given to the executer thread as the context classloader.
(In many cases this will be the same, but I don't know how this is done in the implementation of your container).

Similar Messages

  • Performance of Session Stateless Bean in WebSphere with connection to DB

    Im using WebSphere Advanced Single Server Edition Version 4.0.1. and a WebSphere DataSource to get my connections to Microsoft SQL 2000 (using netdirect's JSQLDriver).
    For the EJB I set the transaction to 'requieresNew'.
    For testing purposes I had been testing some code I'll be using in a Session Stateless Bean inside a servlet's method. In my servlet I use one single connection and preparedStatements to improve performance.
    When I test it on the Servlet, this process takes around 3 minutes to complete, but when I put this code inside a Session Stateless Bean and call it from this servlet's method, it takes around 30 minutes to complete!. How is this possible?!
    Worst of all, when the EJB ends and the process returns to the Servlet, it throws me this exception.
    com.ibm.websphere.ce.cm.StaleConnectionException: class com.ibm.ejs.cm.proxy.PreparedStatementProxy is closed.
    The code uses some utilities from a Framework we created, but I really doubt it affects the performance since I put such classes in a jar file and the EJB is accessing such classes correctly.
    I thought that maybe I was missing something related with how I get the connection inside the EJB, but I had no luck trying to figure this out.
    This is the code in my EJB, commented code was in use when this code was tested in the method of the servlet (some code has been removed or modified, so I just left the 'main' body of the code):
    package cmx.ejb;
    import cmx.common.*;
    import java.util.*;
    import qsi.sys.db.*;
    import qsi.sys.util.*;
    import java.rmi.*;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.*;
    import javax.sql.DataSource;
    * Bean implementation class for Enterprise Bean: SimuladorEJB
    public class SimuladorEJBBean implements javax.ejb.SessionBean {
         private javax.ejb.SessionContext mySessionCtx;
    private Context ctx;
    private DataSource ds;
    private static final int TCONSUMO = 4;
    private static final int CARACEQ = 6;
    private static final int PPRODUC = 9;
    private static final int PPUNTA = 12;
    private static final int UTONHR = 8;
    private static final int TPRODUCC = 3;
    private Vector val = null;
    private Vector vecArea = null;
    private String query;
    private Object[] params;
    private int numAreas;
    private int vSecDetHE;
    //All the prepared statements I'll use in my process
    private PreparedStatement pstmSelectSerial = null;
    private PreparedStatement pstmUpdateSerial = null;
    private PreparedStatement pstmgetPPEquipos = null;
    private PreparedStatement pstmgetTransfers = null;
    private PreparedStatement pstmaddRProduccion = null;
    private PreparedStatement pstmupdInventario = null;
    private PreparedStatement pstmgetServicios = null;
    private PreparedStatement pstmaddConsumo = null;
    private PreparedStatement pstmgetAreaEquipos = null;
    private PreparedStatement pstmfindCE = null;
    private PreparedStatement pstmcontEventoLogEq = null;
    private PreparedStatement pstmaddLog = null;
    private PreparedStatement pstmfindCaract = null;
    private PreparedStatement pstmfindComposicion = null;
    private PreparedStatement pstmfindCombAlt = null;
    private PreparedStatement pstmaddInventarioH = null;
    private PreparedStatement pstmgetAlmMatREM = null;
    private PreparedStatement pstmfindAlmacen = null;
    private PreparedStatement pstmcontEventoLogAlm = null;
    private PreparedStatement pstmgetAlmacenes = null;
    private PreparedStatement pstmfindInvHora = null;
    private PreparedStatement pstmgetPeriodoHorario = null;
    private PreparedStatement pstmgetProgramaCE = null;
    private PreparedStatement pstmgetProgramaPP = null;
    private PreparedStatement pstmgetProgramaParo = null;
    private PreparedStatement pstmgetPrograma = null;
         * getSessionContext
         public javax.ejb.SessionContext getSessionContext() {
              return mySessionCtx;
         * setSessionContext
         public void setSessionContext(javax.ejb.SessionContext ctx) {
              mySessionCtx = ctx;
         * ejbActivate
         public void ejbActivate() {
         * ejbCreate
         public void ejbCreate() throws javax.ejb.CreateException {
    System.out.println("ejbCreate()");
    try {
    Hashtable parms = new Hashtable();
    parms.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
    ctx = new InitialContext(parms);
    ds = (DataSource)ctx.lookup("jdbc/datasource");
    }catch (Exception e){
    e.printStackTrace();
         * ejbPassivate
         public void ejbPassivate() {
         * ejbRemove
         public void ejbRemove() {
    System.out.println("ejbRemove()");
         pstmSelectSerial = null;
         pstmUpdateSerial = null;
         pstmgetPPEquipos = null;
         pstmgetTransfers = null;
         pstmaddRProduccion = null;
         pstmupdInventario = null;
         pstmgetServicios = null;
         pstmaddConsumo = null;
         pstmgetAreaEquipos = null;
         pstmfindCE = null;
         pstmcontEventoLogEq = null;
         pstmaddLog = null;
         pstmfindCaract = null;
         pstmfindComposicion = null;
         pstmfindCombAlt = null;
         pstmaddInventarioH = null;
         pstmgetAlmMatREM = null;
         pstmfindAlmacen = null;
         pstmcontEventoLogAlm = null;
         pstmgetAlmacenes = null;
         pstmfindInvHora = null;
         pstmgetPeriodoHorario = null;
         pstmgetProgramaCE = null;
         pstmgetProgramaPP = null;
         pstmgetProgramaParo = null;
         pstmgetPrograma = null;
    public void GenerarSimulacion(int pidSimulacion, String pfini, String pffin, int cveEntidad, int cveUsuario) throws Exception{
    System.out.println("GenerarSimulacion()");
    System.out.println("***Simulacion " + pidSimulacion + " en proceso...***");
    Calendar inicioProceso = Calendar.getInstance();//Tiempo en que empezo el Proceso
    Calendar finProceso = null;//Tiempo en que termino el Proceso
         Connection cnn = null;
    //boolean autoCommit = false;
         try{
         cnn = ds.getConnection();
    autoCommit = cnn.getAutoCommit();
    cnn.setAutoCommit(false);
         cnn.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
    pstmSelectSerial = cnn.prepareStatement("select iValor from CatConsecutivo where vcConsecutivo=?");
    pstmUpdateSerial = cnn.prepareStatement("update CatConsecutivo set iValor = iValor+1 where vcConsecutivo=?");
    pstmgetPPEquipos = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getPPEquipos"));
    pstmgetTransfers = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getTransfers"));
    pstmaddRProduccion = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.addRProduccion"));
    pstmupdInventario = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.updInventario"));
    pstmgetServicios = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getServicios"));
    pstmaddConsumo = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.addRConsumo"));
    pstmgetAreaEquipos = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getAreaEquipos"));
    pstmfindCE = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.findCE"));
    pstmcontEventoLogEq = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.contEventoLogEq"));
    pstmaddLog = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.addLog"));
    pstmfindCaract = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.findCaract"));
    pstmfindComposicion = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.findComposicion"));
    pstmfindCombAlt = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.findCombAlt"));
    pstmaddInventarioH = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.addInventarioH"));
    pstmgetAlmMatREM = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getAlmMatREM"));
    pstmfindAlmacen = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.findAlmacen"));
    pstmcontEventoLogAlm = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.contEventoLogAlm"));
    pstmgetAlmacenes = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getAlmacenes"));
    pstmfindInvHora = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.findInvHora"));
    pstmgetPeriodoHorario = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getPeriodoHorario"));
    pstmgetProgramaCE = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getProgramaCE"));
    pstmgetProgramaPP = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getProgramaPP"));
    pstmgetProgramaParo = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getProgramaParo"));
    pstmgetPrograma = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getPrograma"));
    pstmgetAreaEquipos = cnn.prepareStatement(Manager.getParameter("cmx.admin.inicioSesion.getAreaEquipos"));
    Map hmEqMat = null;
    Iterator itEqMat = null;
    Map.Entry meEqMat = null;
    Map hmInvAlm = null;
    Iterator itInvAlm = null;
    Map.Entry meInvAlm = null;
    Map hmPunta = null;
    Iterator itPunta = null;
    Map.Entry mePunta = null;
    Iterator itPuntaEq = null;
    HashMap hmPuntaEq = null;
    Vector vecPuntaEq = null;
    Iterator itPPEq = null;
    HashMap hmPPEq = null;
    Vector vecPPEq = null;
    Iterator itCar = null;
    HashMap hmCar = null;
    Vector vecCar = null;
    Iterator itLog = null;
    HashMap hmLog = null;
    Vector vecLog = null;
    Iterator itCA = null;
    HashMap hmCA = null;
    Vector vecCA = null;
    Iterator itCom = null;
    HashMap hmCom = null;
    Vector vecCom = null;
    Iterator it = null;
    HashMap hm = null;
    Vector vecEv = null;
    Iterator itEq = null;
    HashMap hmEq = null;
    Vector vecEq = null;
    Vector vecSim = null;
    Date d;
    String sDSim = "";
    Date dDiaPrevio;
    String sDiaPrevio = "";
    String consulta;
    int vContador= 0;
    int hr=0;
    long vDiaPrevio = 0;
    Integer idInvH;
    Integer idProd;
    Integer idCons;
    Integer idLog;
    int vCont = 0;
    int vCiclo = 0;
    int vArea = 0;
    int vAreaAct = 0;
    int vPuntaEquipo = 0;
    // Periodo de Simulacion
    long fini = getCurrDate(pfini);
    long ffin = getCurrDate(pffin);
    // Variables Generales
    int vSecuencial = 0;
    int vEvento = 0;
    float vCostoE = 0;
    int vAlmacenREM = 0;
    // Variables de Transferencia
    float vCantidad = 0;
    int vTipoMov = 0;
    int vUMedida = 0;
    int vAlmacenTr = 0;
    float vNIni = 0;
    float vNMin = 0;
    float vNMax = 0;
    float vNAct = 0;
    // Variables de Equipos
    int vPPMaterial = 0;
    int vPPEquipo = 0;
    int vPPArea = 0;
    int vMaterial = 0;
    int vCaractEq = 0;
    int vParo = 0;
    int vEstatusParo = 0;
    int vEstatus = 0;
    float vMinPunta = 0;
    float vPorcPunta = 0;
    float vProporcion = 0;
    float vTPH = 0;
    float vGasto = 0;
    float vKwNoProd = 0;
    float vKwProd = 0;
    int vAlmacen = 0;
    // Variables de Composicion de Materiales
    int vMaterialCom = 0;
    float vPorcCom = 0;
    float vFactorCC = 0;
    int vTipoMovCom = 0;
    int vUMedidaCom = 0;
    int vAlmacenCom = 0;
    float vNIniCom = 0;
    float vNMinCom = 0;
    float vNMaxCom = 0;
    float vNActCom = 0;
    int vMaterialCA = 0;
    int vUMedidaCA = 0;
    int vAlmacenCA = 0;
    float vNIniCA = 0;
    float vNMinCA = 0;
    float vNMaxCA = 0;
    float vNActCA = 0;
    int vOk=0;
    int h=0;
    boolean vbOk=false;
    boolean swArea=true;
    Calendar dtH1;
    vecSim = new Vector();
    vecSim.add(new Integer(pidSimulacion));
    for (long ld=fini; ld<=ffin; ld=getNextDate(new Date(ld), 1))
    {   d = new Date(ld);
    //The process which calls find(), upd(), AplicaEvento() and GetCostoEnergia() methods several times.
    //The methods find() and upd() uses a util class (DataDB) which basically assigns the params to the PreparedStatement and executes it, returning the results in a Vector.
    } // for ld : Dia de Simulacion
    //Cerrar la transaccion
    }catch (Exception e){
              System.out.println("rollback...");
                   mySessionCtx.setRollbackOnly();
         System.out.println("rollback ok!");
    System.out.println(e.toString());
                   throw e;
    }finally{
    finProceso = Calendar.getInstance();
    finProceso.setTime(new java.util.Date(finProceso.getTime().getTime() - inicioProceso.getTime().getTime()));
    System.out.println("***Simulacion " + pidSimulacion + " procesada en: " + finProceso.get(Calendar.MINUTE) + ":" + finProceso.get(Calendar.SECOND) + "." + finProceso.get(Calendar.MILLISECOND) + ".***");
    try {
    if (cnn!=null && !cnn.isClosed()) {
              System.out.println("close ok?");
    cnn.close();
                   System.out.println("close ok!");
    }catch (SQLException sqle){
    sqle.printStackTrace();
    System.out.println("commit ok?");
    cnn.commit();
    System.out.println("commit ok!");
    }catch (Exception e){
    e.printStackTrace();
    System.out.println(e.toString());
    try {
    if (cnn!=null && !cnn.isClosed()) {
                   System.out.println("rollback ok?");
                             cnn.rollback();
              System.out.println("rollback ok!");
    }catch (SQLException sqle){
    sqle.printStackTrace();
    }finally{
    finProceso = Calendar.getInstance();
    finProceso.setTime(new java.util.Date(finProceso.getTime().getTime() - inicioProceso.getTime().getTime()));
    System.out.println("Simulacion procesada en: " + finProceso.get(Calendar.MINUTE) + ":" + finProceso.get(Calendar.SECOND) + "." + finProceso.get(Calendar.MILLISECOND) + ".***");
    try {
    if (cnn!=null && !cnn.isClosed()) {
                   System.out.println("autocommit ok?");
                   cnn.setAutoCommit(autoCommit);
              System.out.println("autocommit ok!");
              System.out.println("close ok?");
    cnn.close();
                   System.out.println("close ok!");
    }catch (SQLException sqle){
    sqle.printStackTrace();
    private float GetCostoEnergia(float pfKw, long plFecha, int piHora,int cveEntidad) throws Exception {
    float exito = -1;
    //calculations and has access to DB throught method find()
    return exito;
    private int AplicaEvento(int pidMaterial, int pidEvento, int pidSecuencial, int pidSimulacion, long plFecha, int piHora) throws Exception {
    int exito = -1;
    //calculations and has access to DB throught method find()
    return exito;
    private Iterator find(PreparedStatement pstm, Vector values) throws Exception {
    params = (values!=null)? values.toArray() : null;
    Vector data = DataDB.executeQuery(pstm, params); //This util class is in a external jar file, such util basically assigns the params to the PreparedStatement and executes it, returning the results in a Vector.
    return data.iterator();
    private int upd(PreparedStatement pstm, Vector values) throws Exception {
    params = values.toArray();
    return DataDB.executeUpdate(pstm, params); //This util class is in a external jar file, such util basically assigns the params to the PreparedStatement and executes it.
    Help will be REALLY appreciated!
    Thanks in advance.

    Thanks Paul for your comments.
    In fact, I call my EJB in the servlet just once. Im sure calling the same EJB. My project requieres it to be stateless.
    This is my last log
    1/2/03 13:15:00:481 CST] 17fac55b SystemOut U -ejbCreate()-
    [1/2/03 13:15:00:591 CST] 17fac55b SystemOut U jdbc/xa/oye
    [1/2/03 13:15:00:651 CST] 17fac55b SystemOut U -GenerarSimulacion()-
    [1/2/03 13:15:00:741 CST] 17fac55b SystemOut U ***Simulacion 32 en proceso...??***
    [1/2/03 13:15:01:012 CST] 17fac55b SystemOut U JSQLConnect(2.2721) Trial license - expires on:Tue Jan 07 13:01:32 CST 2003, unlimited connections
    [1/2/03 13:15:01:092 CST] 17fac55b SystemOut U Connection OK!
    [1/2/03 13:15:01:392 CST] 17fac55b SystemOut U PreparedStatements OK!
    [1/2/03 13:15:01:402 CST] 17fac55b SystemOut U Comenzando Sim...
    I forgot to mention that I create a connection (autocommit false) at the begining of my servlet, which I use throught all the servlet, then I call the EJB, and after the EJB succeds I also close the transaction in the Servlet (to commit what is on the servlet, not the EJB). Thats why I set the transaction in the EJB to requiresNew, so after the EJB ends it commits its own transaction, Am I right?.
    The Exception I get I think its because the connection used in the servlet timed out while waiting for the EJB to finish.
    This issue has become urgent, so please if you know why I have this problem reply ASAP.
    Thanks!

  • SessionSynchronization methods in Stateless Bean with BMP

    Hi,
    Why cant we use SessionSynchronization methods in Stateless Bean with BMP?
    Just cos the bean has full control over the transactions and it doesnt make sense at all or there is something more to add to this.
    Thanks in advance,
    Seetesh

    Hi,
    Why cant we use SessionSynchronization methods in
    Stateless Bean with BMP?Stateless Session Bean does not miantain the state across the method call.And the Transaction control is lying within the method call.
    Just cos the bean has full control over the
    transactions and it doesnt make sense at all or there
    is something more to add to this.I dont understand what you are trying to say here.As stateful session bean maintains the state across the method calls and maintains the conversational state which lies is as cache.The Transaction can be aborted either by making the changes to old value and throwing the Exception to client indicating regarding the failure.But this will be great lost of work hence you make(find mechanism) a recovery from the old values which should be saved.
    It is for this the specification has come up with SessionSynchronization interface (useful for only Stateful) Session Bean and with (declarative Transaction) CMT.
    Regards
    Vicky

  • Unable to Rollback Payroll Run

    Hi,
    We have run payroll process for a period. But unable to rollback the run.
    When we try to rollback, we get error.
    Error is:
    ORA-01403: no data found
    FRM-40735: KEY-DELREC trigger raised unhandled exception ORA-06502.
    How to resolve?.
    How to rollback thru backend using py_rollback_pkg.
    Kindly let me know the steps.
    Murugan

    Hi,
    a) We can execute the Standard cost Estimate/Costing Run-CK40 N only for Current period and also for Future posting periods.  However it is not possible for u201Cpast/completed/closed periods. Again, you can u201CMarku201D the standard price for current and future periods.  For u201CReleasingu201D the standard price, you need to wait for opening of the respective posting period.  In your case, on 29/11/2009, you can complete the Costing Run-CK40N steps till u201CMarkingu201D of standard price.  To u201CRelease the standard price for the material, you need to wait till opening of 12-posting period. If you want to execute u201CCosting Runu201D for individual materials for specific plant, use t-code CK11N and for Mark and Release of material standard price, use t-code-CK24. Otherwise, for Costing Run of Group/Mass Material s for all the Plants, and also Mark and Release of all materials prices, use t-code-CK40N.
    b) how the Cost Change posts to the P&L and also how the material master gets updated...
    By executing the u201CStandard Cost Estimate--Costing Run-CK40N, we can get the planned price/standard price for current or future periods. The respective material master will be updated with u201CCurrent Standard Priceu201D.  NO ACCOUNTING ENTRIES WILL BE GENERATED.
    The system will automatically posts the P&L GL accounting entries only during the u201CActual consumption  of materialu201D, i.e., during execution of Back-flush and  Confirmation of Production/process Orders.
    Regards
    appalas
    Edited by: appalas on Jan 7, 2010 8:19 PM

  • Stateless bean transaction rollback

    HI Friends
              Iam using a stateless bean.In which some of the methods are in
              transaction having transaction attribute is "supports". Now i have a method
              A which is updating some table and iam calling another method "B" which is
              updating another table.but B method is using another connection. Iam using a
              txdatasource. If methods are in transaction if any exception occurs it
              should rollback.But is was not happening.
              A() {
              new connection();
              con.close()
              B()
              new Connection()
              con.close();
              can u help me
              

    Thank you Salvo.I think the only way is to pass the same connection to the
              private method.
              "Jesus M. Salvo Jr." <[email protected]> wrote in message
              news:[email protected]...
              > AFAIK, no, because the container does not know about those methods. The
              > public methods in the remote interface are the only methods that the
              > container manages transaction for. Besides, why would the container handle
              > transcation for private methods when private methods cannot be called
              > remotely?
              >
              > However, calling a private method internally within method that was called
              > remotely will make the container treat them as one transaction. Your
              > private method should probably throw a SQLException, which your public
              > method catch and rethrow as an EJBException.
              >
              > Jetty wrote:
              >
              > > Other method is private method.
              > > It is possible to set transaction attribute for private methods.?
              > >
              > >
              > > "Jesus M. Salvo Jr." <[email protected]> wrote in message
              > > news:[email protected]...
              > >> In SLSB, one method is one transaction .... unless of course that
              method
              > >> was called by another EJB that started the transaction. It then depends
              > >> on how you haved setup your TX attributes.
              > >>
              > >> If the method in the SLSB was called from say a servlet, and the bean
              is
              > >> a container-managed transaction, then that method call is one
              > >> transaction.
              > >>
              > >>
              > >> Jetty wrote:
              > >>
              > >> > Update statements in each method will it come under one transaction.?
              > >> >
              > >> > "Jesus M. Salvo Jr." <[email protected]> wrote in message
              > >> > news:[email protected]...
              > >> >> How did you A call B?
              > >> >>
              > >> >> 1) Did you do create another instance of the SLSB and call B?
              > >> >>
              > >> >> 2) Or did you simply call B from A via this.B() ?
              > >> >>
              > >> >> If its 1), then each method will be handled separetely by the
              > > container.
              > >> > If
              > >> >> its 2), the container will only see your call to A, therefore just a
              > >> > single
              > >> >> transaction.
              > >> >>
              > >> >> Weblogic news server wrote:
              > >> >>
              > >> >> > HI Friends
              > >> >> > Iam using a stateless bean.In which some of the methods are
              > >> >> > in
              > >> >> > transaction having transaction attribute is "supports". Now i have
              a
              > >> >> > method A which is updating some table and iam calling another
              method
              > >> >> > "B" which is updating another table.but B method is using another
              > >> > connection.
              > >> >> > Iam using a txdatasource. If methods are in transaction if any
              > >> >> > exception occurs it should rollback.But is was not happening.
              > >> >> > A() {
              > >> >> > new connection();
              > >> >> > con.close()
              > >> >> > }
              > >> >> > B()
              > >> >> > ()
              > >> >> > {
              > >> >> > new Connection()
              > >> >> > con.close();
              > >> >> > }
              > >> >> >
              > >> >> > can u help me
              > >> >> >
              > >> >> >
              > >> >> >
              > >> >>
              > >> >
              > >> >
              > >> >
              > >>
              > >
              > >
              > >
              >
              

  • "Unable to Connect" using Firefox and Windows 7. Have tried all the suggestions on this website to no avail. I need firefox for my work! Please help!

    "Unable to Connect" using Firefox and Windows 7. Have tried all the suggestions on this website to no avail. I need firefox for my work! Please help!
    == This happened ==
    Every time Firefox opened
    == Since I downloaded Firefox

    same here my AV is ESET, i already unblock it but no use can't connect to the internet..

  • Fire fox will not open, page says unable to connect. using 7.0.1

    Fire fox will not open, page says unable to connect. using 7.0.1

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Why am I unable to print using Control P?

    After updating a computer in the office to Windows 7, from XP, I am now unable to print using the Ctrl +P keys. This feature works on the same websites on both the old OS and other computers running Windows 7 in the office. When I try it give me the error message, "Some printing functionality is not currently available". What can I do to fix this?

    You can try to reset print prefs on the <b>about:config</b> page.
    *http://kb.mozillazine.org/Problems_printing_web_pages
    *https://support.mozilla.org/kb/how-print-websites
    You can open the <b>about:config</b> page via the location/address bar.
    You can accept the warning and click "I'll be careful" to continue.
    *http://kb.mozillazine.org/about:config

  • Unable to sync using PocketMac

    Unable to sync using PocketMac

    actually PM should work for you....why do you say it won't?  Also Missing sync is available, but it costs $.
    4.6.1.305 hybrid
    Mac Pro 2X2.8 Quad SL

  • Unable to scan using feeder on Envy 5300

    I am trying to scan multiple pages using the feeder but when using the HP Scan Utility the option to changer from 'Flatbed' source is greyed out and can't be changed.
    Any advice on how to change this or use an alterative scan method to scan a multi-page document to PDF using the feeder?
    Thanks

    Hi @MTilney,
    Welcome to the HP Forums!
    I noticed that you are unable to scan using the feeder on your HP Envy 5300 printer. I am happy to look into this scanning issue for you!
    The reason to change from the flatbed to the feeder is greyed out, is due to the mechanical function of the printer. This printer does not have a feeder to scan multiple pages at once, only a flatbed scanner.  
    According to this guide, Scanning with the Full Feature HP Software in OS X v10.10 Yosemite, select Scanning a multi-page original into a single file, follow the instructions for scanner glass. If your printer does not have an ADF and you are scanning a multi-page document, you will need to load each page on the scanner glass one at a time to scan the document.
    To scan with without HP software, please see this guide, Scanning in OS X v10.10 Yosemite Without HP Software.
    Hope this clears things up for you, and have a nice day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Problem running RMI/IIOP sample (stateless bean)

    Hi.
    I am unable to run the RMI/IIOP stateless bean sample (Weblogic 6.1 on
    Windows 2000). I have deployed the sample (iiop_ejb_stateless) and the
    server is running. I checked in the admin console and the module is
    deployed OK.
    However, the client is unable to get the initial context and throws a
    ""We were unable to get a connection to the WebLogic server at
    iiop://localhost:
    Please make sure that the server is running."
    error message on the command prompt. What could be wrong? Is there a
    flag I need to throw on to get the server to enable IIOP based
    connections?
    Thanks in advance,
    - deepak

    Deepak Balakrishna <[email protected]> writes:
    I am unable to run the RMI/IIOP stateless bean sample (Weblogic 6.1 on
    Windows 2000). I have deployed the sample (iiop_ejb_stateless) and the
    server is running. I checked in the admin console and the module is
    deployed OK.
    However, the client is unable to get the initial context and throws a
    ""We were unable to get a connection to the WebLogic server at
    iiop://localhost:
    Please make sure that the server is running."
    error message on the command prompt. What could be wrong? Is there a
    flag I need to throw on to get the server to enable IIOP based
    connections?It should be on by default. Try using SP2 to see if that helps at all
    (although all the examples work on all releases). Also try substituting
    localhost for your machine name, W2K does some fun tricks with DNS.
    andy

  • EJB 3.0 Stateful bean not saving state while Stateless bean is !!!

    My Stateless bean is as follow:
    package test;
    import javax.ejb.Stateless;
    @Stateless(mappedName = "StatelessBean")
    public class StatelessBean implements StatelessBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateless counter value:"+counter);
              counter++;
    My Stateful bean is as follow:
    package test;
    import javax.ejb.Stateful;
    @Stateful(mappedName = "StateFulBean")
    public class StateFulBean implements StateFulBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateful counter value:"+counter);
    Client is as follows:
    package test;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class TestClient {
         public static void main(String[] args) {
              Hashtable hashtable = new Hashtable();
              hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              hashtable.put(Context.PROVIDER_URL, "t3://localhost:7001");
              InitialContext ic;
              try {
                   ic = new InitialContext(hashtable);
                   StateFulBeanRemote stateFulBeanRemote = (StateFulBeanRemote)ic.lookup("StateFulBean#test.StateFulBeanRemote");
                   stateFulBeanRemote.increment();
                   StatelessBeanRemote statelessBeanRemote = (StatelessBeanRemote)ic.lookup("StatelessBean#test.StatelessBeanRemote");
                   statelessBeanRemote.increment();
              } catch (Exception e) {
                   e.printStackTrace();
    The output i am getting after running the client twice is as follows:
    //first time
    Stateful counter value:0
    Stateless counter value:0
    //second time
    Stateful counter value:0
    Stateless counter value:1
    Shouldn't the counter values be incremented in case of Stateful bean and remain the same for Stateless bean. But the output that I am getting is the complete opposite !!!
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.

    868664 wrote:
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.It is very simple: a stateless bean is ASSUMED to be stateless; you cannot keep state in a stateless bean as a contractual rule. That doesn't mean that you will fail to keep state in them at least for a little while, they are still only Java objects. Generally stateless EJBs are pooled, so you may get the same instance each time you use such an EJB, but you may just get another one. It is not dependable and the rules say don't do it - so don't do it.
    A stateful bean is tied to a single client, and so can be used by a client to keep state in it. Since You are running the client application twice you are operating with two different clients and so you will get a new stateful bean each time and your code will keep printing 0. However there is also a bug in your code:
    public void increment(){
    System.out.println("Stateful counter value:"+counter);
    }You are not incrementing anything.

  • CacheFullException with Stateless bean

    Hallo everbody,
    I have a problem with a Stateless bean the log file give me this error:
    javax.ejb.EJBException: Exception during transition from pooled to ready:
    - with nested exception:
    [weblogic.ejb20.cache.CacheFullException: Cache is at its limit of: '100' *active*
    beans.]
    I use this bean for several action, and just for an action I have this error.
    What I can't underastand that Stateless bean get with the session and as the user
    close the session the Bean have to expire, isn'it? So can't uderstand while 100
    Bean still on the cache.
    Could anyone help me?
    Thank's a lot
    Fausta

    1. check thread dump ... any threads actually still busy?
    2. is it stateful or is it stateless? I don't mean how do you deploy it, but
    I mean which is it really? does it have any state?
    3. always call remove() ... this isn't the problem (Weblogic doesn't require
    remove()) but you should do so anyway.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Sachin Shah" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi,
    I have a statelesss session bean which i m using in the application.Initially
    this bean was stateful bean but due to problems of timeout it was changedto stateless
    bean. The problem is sometimes when i view the statistics from console, ifind
    that there are max 20 beans allowed and all 20 are in use. Because ofwhich no
    user can work further and i have to shutdown the server. I fail tounderstand
    this cause being a stateless session bean it should be released (returnedto free
    pool) as soon as the method is over. So why this behaviour. Any idea.
    Thanks in Advance

  • Stateless Bean - scope of instance variable in EJB Timer call back function

    Hi,
    I would like to know on the scope of an instance variable of a Stateless Bean object,
    when used in a EJB Timer call back.Let me explain this in more detail below.
    I have a requirement to use a EJB Timer.
    For this, I have created a stateless object since Timer creation needs to be done
    from a stateless bean. I have a member variable "count" of the stateless bean class.
    In the timer call back(ejbTimeout), I am able to use this count variable during
    each time of the call back, and the value of this variable is also updated properly.
    I have a few queries with respect to the above behaviour:
    1) Does stateless bean object not get destroyed once the Timer is created from the Bean?
    2) If the Bean object is not destroyed, then when does the bean object get destroyed?
    3) If both (1) and (2) are not true, then can anyone explain on how the above behaviour is possible?
    Thanks in advance,
    Ulrich

    Hi Ulrich,
    The ejb timer is associated with the stateless session bean component, not with a particular bean instance. There is no formal relationship between the bean instance that called createTimer() and the bean instance on which the timer callback happens. If they're the same in your test run that's just a coincidence and not something your application should be depending on.
    In the stateless session bean model, the container can create and destroy stateless session bean instances at any time. The container is free to pick any stateless session bean instance to service any client invocation or timer callback. If you need to pass context into a timer callback, one way to do it is via the timer "info" object. However, the info object is immutable so it wouldn't be a good match for a counter. You could of course always just use a database for any necessary coordinated state.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can I use oracle blob by CMP bean in weblogic 6?

    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle blob by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain a serialized object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

    Great! So what was the problem?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    >
    Finally got it working with CMP, which is my preferred choice (over BMP).
    I read the Excel Spreadsheet into a "byte []" array, and the Entity Beanmapped
    "byte []" to the Blob column in the Oracle table.
    "Slava Imeshev" <[email protected]> wrote:
    Roger,
    I'm not quite sure I undestand the problem. Could you:
    1. Post deployment descriptors in part related to this
    CMP bean?
    2. Post the piece of code that is failing?
    Please post the information above and we will help
    you to hunt the problem down.
    No, I don't have any problems accessing blobs
    from CMP.
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    Yes. I have added;
    <dbms_column-type>OracleBlob</dbms-column-type>
    It fails because the locater to the blob, obtained by findBYPrimaryKeyis
    null.
    i.e. an empty_blob() is not created.
    Have you got CMP to access Blobs in WLS 6.1?
    "Slava Imeshev" <[email protected]> wrote:
    Hi Roger,
    Have you tried using OracleBlob as dbms-column-type?
    Also, could you post that part of your code that is failing?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    I can access Clobs using CMP. If you are using the Oracle OCI Driveryou
    do not
    need to add this line.
    However if you are using the Oracle Type 4 Thin drivers you need
    to
    add;
    <dbms_column-type>OracleClob</dbms-column-type>
    to the file;
    weblogic-cmp-rdbms-jar-xml
    This DOES NOT work with Blobs.
    I am unable to get WebLogic 6.1 sp4 persist a Blob to an Oracle
    8.1.x
    table and
    retrieve it using either CMP or BMP.
    Unless any one show me a complete working CMP and BMP example?
    Roger Lee
    Deepak Vohra <[email protected]> wrote:
    BLOB and CLOB DBMS Column Support for the Oracle DBMS
    http://edocs.bea.com/wls/docs61/ejb/cmp.html#1061636
    shybird wrote:
    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle
    blob
    by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain
    a
    serialized
    object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

Maybe you are looking for

  • IPhone 3G problems with 3G...

    Hi, My iPhone 3G was working perfectly with OS 3.0 but lately it's been playing up - now whenever I connect to my home router 3G overrides Wi-Fi... laptop has no problem with the router, no settings have been changed on the router - the router is not

  • Dropdown in ALV Grid (OO)

    Hi All, I am populating a dropdown in the ALV grid, Now I have a requirement to fill this dropdown when I press enter button after selecting a value in the grid for a previous column ,I have written the code for this but the values are not getting fi

  • Variant

    Hello All, I have a saved the BEx variable values in the variant . In the variant i am not able to find the D (Dynamics Variable) only the option T is in the selection variable in the variant screen. How can I achieve the dynamic variable in the vari

  • How to change orclanonymousbindsflag

    Greetings, Using Fusion Middleware 11.1.1.5 on Linux I am attempting to configure netservices using netca. When I invoke netca and attempt to configure Oracle Internet Directory a dialogue is displayed indicating 'The directory has not been configure

  • Camera_Raw_4_4_1

    I have got a new comp with W7 and reinstalled my CS3, and just as the other timesIhave reinstalled CS3 I get the message "Cannot complete your request, because this is not the right kind of document". Like the other times, I replace the Camera_Raw_4_