Pro*cobol Spurious nulls being updated into database

I have a strange issue which I will probably report as a bug but thought i would pass by you guys 1st.
I have an update statement
EXEC SQL UPDATE HARDVER SET
HAR_IMEPRT=NVL(RTRIM(:HAR-IMEPRT),' ')
,HAR_IMETER=NVL(RTRIM(:HAR-IMETER),' ')
,HAR_WINDOW=NVL(RTRIM(:HAR-WINDOW),' ')
,HAR_TIPTER=NVL(RTRIM(:HAR-TIPTER),' ')
,HAR_TIPPRT=NVL(RTRIM(:HAR-TIPPRT),' ')
,HAR_CEKPRT=NVL(RTRIM(:HAR-CEKPRT),' ')
,HAR_MJESTO=NVL(RTRIM(:HAR-MJESTO),' ')
,HAR_TELBRO=NVL(RTRIM(:HAR-TELBRO),' ')
,HAR_PORUKA=NVL(RTRIM(:HAR-PORUKA),' ')
,HAR_POSJED=:HAR-POSJED
,HAR_KESBOY=:HAR-KESBOY
,HAR_AMBROJ=:HAR-AMBROJ
,HAR_PMBROJ=:HAR-PMBROJ
,HAR_STATUS=:HAR-STATUS
,HAR_REDBRO=:HAR-REDBRO
,HAR_UPDATE=:HAR-UPDATE
,HAR_SATMIN=:HAR-SATMIN
,HAR_TELLER=:HAR-TELLER
,HAR_CEKOVI=:HAR-CEKOVI
,HAR_PRTOFF=:HAR-PRTOFF
WHERE ROWID=:HARDVER-ROWID
END-EXEC
All of the host variables have values in them.
For some reason HAR_PMBROJ is being updated with a null even thougth HAR-PMBROJ contains 84.
If I comment out one of the assignments above HAR_PMBROJ then HAR_PMBROJ is ok but the next column in the update statement HAR_STATUS gets a null. If I comment out 2 of the assignments above HAR_PMBROJ then HAR_REDBRO gets a null.
This is very strange and I have no idea why it is happening.
TIA
Steve

Just tried putting NVL around all the numeric fields and now HAR_PMBROJ gets updated with zero (HAR-PMBROJ contains 84).

Similar Messages

  • Uploading into database table from text file using tab (GUI_UPLOAD)

    i have small doubt
    i have 3 fiels in text file using tab as separator
    i need to update into database table 'ZABPSP_01'
    from 's.txt' located in local disk.
    My code is below.
    Please let me know the correction.
    Awaiting for ur response.
    Thanks in advance
    REPORT  ZABPSPPRG_02.
    TABLES: LFA1,MARA,KNA1,ZABPSP_01.
    DATA:  begin of itab occurs 0,
    IKUNNR type zabpsp_01-kunnr,
    IMATNR type zabpsp_01-matnr,
    IADRNR type zabpsp_01-adrnr.
    DATA:END OF ITAB.
    DATA: FILENAME1 TYPE STRING.
    FILENAME1 = 'C:/s.txt'.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILENAME1
      FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                     = itab.
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF sy-subrc EQ 0.
    zabpsp_01-kunnr = ITAB-IKUNNR.
    zabpsp_01-matnr = ITAB-IMATNR.
    zabpsp_01-adrnr = ITAB-IADRNR.
    WRITE : / ' UPLOAD SUCCESS ' .
    ENDIF.
    \[subject changed, don't write everything in upper case!\]
    Edited by: Jan Stallkamp on Aug 6, 2008 2:39 PM

    Hi,
    After upload modify the code like below. Also change the file name as some one suggested already. If u are still facing problems then check in debug mode what is happening after FM call.
    CALL GUI_UPLOAD FM.
    IF sy-subrc EQ 0
    IF NOT itab[] IS INITIAL.
    MODIFY ZABPSP_01 FROM TABLE itab.
    WRITE : / ' UPLOAD SUCCESS ' .
    ELSE.
    WRITE 'No data in file'.
    ENDIF.
    ELSE.
    WRITE 'Upload failure'.
    ENDIF.
    Thanks,
    Vinod.

  • Pro*Cobol ?

    Hi All.
    The developer ask me what version of Pro*Cobol is installed in our 11gR2 Database.
    Is this tool installed by default when you install the database? I did not really give so much attention about this product during installation, because I know it is a developer's stuff.
    Do DBAs managed this one also?
    Thanks a lot.

    Thanks,
    I am just confused.
    We have 2 servers Prod and Dev. Both have same COBOL compiler version of MF Cobol.
    But they do have different Oracle Home
    The PROD server has Oracle Home 11.2.0 while the DEV server has 11.1.0.6.
    The clean compiled pro*cobol program at DEV, got error when compiled at PROD.
    Do you think this is an issue of Oracle Home? Is not it that sometimes higher version tends to accommodate lover versions?
    Thanks a lor.

  • Servlet Database I/O: How to "lock" a record being updated ?

    Say you have a servlet that displays a list of customers in HTML page, and a button on each customer to click to bring up another page (servlet generated) with the customer info to edit. The customer info is in a database file (could be Access or ORACLE). User makes any changes and clicks a button to update the customer record (with a servlet).
    How do you prevent two users from editing the same customer record at the same time? I do not want to lock the whole file, just a record.
    Any pointers towards info about this subject appreciated.
    Walk Good

    sridharranganathan, does your technique assume that the read operation is locked, so that two users cannot obtain the same value of LockCounter?
    I have some questions relevant to the following code:
    public class theServlet extends HttpServlet
        public void doGet(HttpServletRequest req, HttpServletResponse resp)
         throws ServletException, IOException
             Helper theHelper = new Helper();
             theHelper.setUser(req.getCookies);
             resp.setContentType("text/html");
                PrintWriter out = new PrintWriter(resp.getOutputStream());
                Connection con = null;
             try
                   SybDriver sybDriver = (SybDriver) Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                   sybDriver.setVersion(com.sybase.jdbcx.SybDriver.VERSION_5);
                   DriverManager.registerDriver(sybDriver);
                   con = DriverManager.getConnection("jdbc:sybase:Tds:dbsrv1:3520/hospcap", "myuserid", "mypassword");                 if (con != null) {
                  if(theHelper.getUserRecord(con, this)) {
                           //do some stuff
                        else { //do some other stuff }
                        con.close();
                 }catch(Exception e) { //whatever }
                 finally { out.flush(); }
             } //end doGet()
    } //end class
    public class Helper {
        private String user = "";
        private String field1Val= "";
        private String field2Val= "";
        public boolean setUser(Cookie [] cookies) {
         // method gets the user's userid from a cookie and then:
            user = user_id_from_cookie;
       public boolean getUserRecord(Connection con, theServlet serv){
            StringBuffer sb = new StringBuffer();
            Statement stmt = null;
         try {
             //Try to get the user's info:
                stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
             StringBuffer sql = new StringBuffer("SELECT field1, field2 FROM UserRecords WHERE user_id = '" + user + "'");
             ResultSet rs = stmt.executeQuery(sql.toString());
                rs.last();
                int nrows = rs.getRow();
                if(nrows < 1) { //user doesn't have an entry in the table yet.
                 //First, get result set of records with blank userids:
                 sql.replace(0, sql.length(), "SELECT * FROM UserRecords WHERE user_id = '' OR user_id = NULL ORDER BY field1");
              rs = stmt.executeQuery(sql.toString());
                    rs.last();
                    nrows = rs.getRow();
                 if(nrows > 0) {
                     //there ARE some records with null user_id, so assign this user to the first one:
                        rs.first();
                     field1Val = rs.getString("field1").trim();
                     field2Val = rs.getString("field2").trim();
                        //QUESTION: IS IT POSSIBLE THAT TWO USERS/THREADS HAVE THE SAME VALUE OF field1Val AT THIS POINT?
                     sql.replace(0, sql.length(), "UPDATE UserRecords SET user_id = '" + user + "' ");
                     sql.append(" WHERE field1 = '" + field1Val+ "' AND user_id is NULL");
                  con.setAutoCommit(false);
                  //Trying to use transaction isolation to prevent two users from updating the same record.
                  //Does this only work if the users share the connection, con?
                  int level = con.getTransactionIsolation();
                  try {
                      if(con.getMetaData().supportsTransactionIsolationLevel(con.TRANSACTION_READ_COMMITTED)) {
                          con.setTransactionIsolation(con.TRANSACTION_READ_COMMITTED);
                            //SYNCHRONIZE ON SERVLET INSTANCE?
                      //synchronized(serv){
                            nrows = stmt.executeUpdate(sql.toString());
                  }catch(SQLException se) {
                         con.rollback();
                         con.setAutoCommit(true);
                         con.setTransactionIsolation(level);
                         stmt.close();
                         return false;
                     con.commit();
                     con.setAutoCommit(true);
                     con.setTransactionIsolation(level);
                        if(nrows < 1) { //couldn't update the db.
                         stmt.close();
                         return false;
                     else {
                         stmt.close();
                         return true;
                 else { //There aren't any unused records; deal with it.
                     stmt.close();
                     return false;
                else { // the user has an entry in the table
                    rs.first(); //should only be one record for this userid.
                    field1Val = rs.getString("field1").trim();
                    field2Val = rs.getString("field2").trim();
                    stmt.close();
                 return true;
            }catch(SQLException se) {
             //some problem not caught elsewhere
             return false;
       } // end getUserRecord
    } // end class HelperI should say that the UserRecords table now contains about 5000 records (this will grow in increments of 5000), many of which have null user_id. If the value is not null, then it contains a userid. A user can have either zero or one entry in the table.
    Here are my questions regarding the above:
    1. In the servlet, each thread will have its own instance of Helper and of Connection, correct?
    2. I want to ensure that only one thread can update a particular UserRecords table record at a time. In the getUserRecord method, please note the line where field1Val is assigned, just above the capitalized QUESTION comment. Is it possible that two threads could have the same value of field1Val at the same time?
    3. When you set the transaction isolation level for connection1, does that prevent other threads that are using other connections to the database from accessing records being updated by the thread using connection1?
    4. As you can see, I am considering passing a reference to the servlet instance into the getUserRecords method and synchronizing the update statement on the servlet instance. Will that ensure only one thread at a time can update the record, without using the transaction isolation code?
    Thanks in advance for your answer.

  • I've tried to update my i-Tunes version after the site suggested I should following my i-Pad being plugged into it for the first time. The update seemed successful but the program would not open at all despite switching off the PC and re-starting several

    I’ve tried to update my i-Tunes version after the site suggested I should following my i-Pad Air being plugged into it for the first time. The update seemed successful but the program would not open at all despite switching off the PC and re-starting several times. I then tried wiping the original software from the computer and re-downloading from scratch. Each time I tried the download failed with a message saying “Service “Apple Mobile Device” failed to start. Verify that you have sufficient privileges to start system services” At this stage, the only way forward was to “abort” the download. This I have done now four times and the same thing happens. When I did finally manage to get an i-Tunes shortcut on my desktop, the program wouldn’t open saying: “i-Tunes was not installed correctly. Please re-install i-Tunes. Error 7 (Windows error 193)” Any ideas to resolve this?

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • Is there a way to do a firmware update without being plugged into a power source?

    I have a Macbook 2GHz Intel Core 2 Duo and the indicator light on the Magsafe power cord is not lighting up. I know the cord works because I have tried it on a different computer but it is only this macbook that it doesn't work on. I have reset the SMC. I do need to do a firmware update but when I try to do the update it the firmware it will not let me update because the computer doesn't know that its connected to a power source. When I look at the battery life indicator on the right hand corner it says that its calculating but never changes.
    I was using the computer running on battery life and it turned off. I was able to turn the computer on. The computer powers on and off but i'm assuming its going to run the battery power. I don't have another battery to try on this computer. Are there any suggestions?
    Firmware update 1.4 is what i'm trying to install

    Is there a way to do a firmware update without being plugged into a power source?
    No

  • After installing Reader 11.0.07 update on my Mac OS X 10.8.5, when I open an Adobe pdf file I see Chinese script next to the blue loading bar at the bottom of the screen.  This never appeared before and I am concerned that my computer is being hacked into

    After installing Reader 11.0.07 update on my iMac OS X, v.10.8.5, when I open an Adobe pdf file I see Chinese script next to the blue loading bar at the bottom of the screen.  This never appeared before when downloading pdf files and I am worried that my computer is being hacked into or I acquired a virus.  Is this normal or do I have to uninstall this update?

    After installing Reader 11.0.07 update on my iMac OS X, v.10.8.5, when I open an Adobe pdf file I see Chinese script next to the blue loading bar at the bottom of the screen.  This never appeared before when downloading pdf files and I am worried that my computer is being hacked into or I acquired a virus.  Is this normal or do I have to uninstall this update?

  • How do I turn off automatic renewal of subscriptions eg to New York Times. AND can I be sure that when I download an update I am not being hooked into an on going subscription. Thankyou

    How do I turn off automatic renewal of subscriptions eg to New York Times.
    AND can I be confident that when I download an apstore update I am not then being hooked into an on going subscription.Thankyou

    Hi,
    I am using German OS therefore maybe the items are called differently in English:
    1) Go into the main menu
    2) Select "Alerts"
    3) select the Profile you like to adjust
    4) Select App Alerts
    5) Select Email
    6) You sould see your 3 mail accounts listed
    7) Select the one you like to "mute" and you can set everything (sound, LED, vibration etc. individually for this acount)
    Hope it helps
    Alex
    Please feel free to hit "Like" if my post was helpful :-) Thank You!

  • After I updated to iOS 8, I noticed that while copying photos to my PC, I see photos being categorized into many folders. I also found some system files in each of the folders containing photos (in the name of Local Disk). Is this usual?

    After I updated to iOS 8, I noticed that while copying photos to my PC, I see photos being categorized into many folders now. I also found some system files in each of the folders containing photos (in the name of Local Disk). Is this usual?

    I couldn't find the edit button on my original post so I am posting an update here.
    I have gone through more apps and have had good luck on all but one more.  And it's not that the app doesn't work, I am talking about the Yahoo Weather app, It works fine, but when you swipe between cities the screen lags a bit and it sometimes doesn't move between pages the way it should.  On iOS 7.1.2 it was smooth as butter but on iOS 8.0, not so much.  I will post a note in the app store to let them know.  I really like the Yahoo app better than the new stock app.
    I have been going through my games and they all work fine. Angry Birds (Original and Stella), Canabalt, Minecraft, Bejeweled 2, Silly Walks, PopWords, Doodle Jump, Deep Green all seem to work just fine. 
    Starbucks app works as it should. 
    I will stop back again next week after I have had the weekend to play with it in detail and post my thoughts again.

  • Update array value into database

    Hi, I would like to enquire if there is any way to update an array in the database.
    As an example, i have an array which contain the value of the operating hour. I am able to insert the array value successfully into the database. Now i have problem to update the database, for these arrays.
    Any suggestion will be very much appreciated.
    Thank you in advance.

    fizRiani wrote:
    the field type is a string arrayReally? Have never seen that before in databases. Aren't you confusing database field type with Java object type?
    the actual data represent the different operating hour that has to be inserted and updated to the database.I would rather use a chain table. Read on about database normalization.

  • Where can I download PRO*COBOL for Oracle database 11g ?

    Where can I download PRO*COBOL for Oracle database 11g ? I have downloaded & installed linux.x64_11gR1_database_1013.zip
    It has a procob32 but it gives an ERROR loading shared library libcIntsh.so.11.1 ?
    What should pro*cobol be for my linux 64 bit AMD ? (procob procob32, procob18, procob64)
    Hope somebody can help with this, Thanks, [email protected] www.uvsoftware.ca

    This is not the appropriate forum to post this.
    Kindly post it in the Database General Forum or search in the download section.
    Regards.
    Satyaki De.

  • My 5C has just done the most recent update, yet I can't turn it on without it being plugged into iTunes through a laptop. However, I don't have iTunes on my laptop because it's my school one. Ideas please?

    My 5C has just done the most recent update, yet I can't turn it on without it being plugged into iTunes through a laptop. However, I don't have iTunes on my laptop because it's my school one. Ideas please?

    If you are seeing the USB cord and iTunes icons on your screen something has gone wrong with the update. You will have to restore your iPhone. The only way to do this is to connect the phone to your computer that is running iTunes.

  • Using Pro Logic X to record. I have several tracks and I'm trying to record an audio track. I have the mic connect to Avalon 737 then into apollo interface. When I record all track are being recorded into that track. I can't just get the audio to record.

    Using Pro Logic X to record. I have several tracks and I'm trying to record an audio track. I have the mic connect to Avalon 737 then into apollo interface. When I record all track are being recorded into that track. I can't just get the audio to record.

    Thanks for responding. Everything seems to work right except for the when I plug into the 737. Ok let me see if I can be more clear. I had this set up done with two representatives of Neumann, and DBox. Here it is I hope this helps. 32 Channel snake (24 Inputs 8 outputs) Channels 1-8 from snake to my Octopre for Drums. From Octropre output quarter inch lines into the Apollo 2, quarter inch input. This is so that the Apollo 2 is taking the drum tracks. Snake Channel 9-12 into Apollo 1 channels 1-4 xlr. Snake Channel 13-16 into Apollo 2 Channels 1-4 xlr. Snake Channel 17 into the 737, output of 737 into Channel 5 of the Apollo 1 quarter inch.
    Ok The Dbox. Sum output L&R into channel input 7&8 of Apollo 1. Apollo 1 output channels 1-8 into summing input channel 1-8 of Dbox. Apollo 1 main L&R going to main analog input L&R of Dbox. Spid out to DAW input of Dbox. I have both ADAT of both Apollos connected by optical wire. Also have port 2 of Apollo 1 into port 1 of Apollo 2 connected by Firewire.  Let me know. Hope I got it right. Thanks for responding.

  • Can't Delete Private Cloud - tbl_WLC_PhysicalObject not being updated

    I am having issues with our SCVMM instance where I can't delete Private Clouds...even if there empty. 
    When I right click the Private Cloud and click Delete, the "Jobs" panel says it finished successfully, however, the Private Cloud is not deleted. 
    After doing some researching, I believe its because entries in the tbl_WLC_PhysicalObject database table are not being updated correctly, when a VM is moved from one Private Cloud to another. After determining the "CloudID" of the Private
    Cloud I am trying to delete, I still see resources assigned to this Private Cloud in the tbl_WLC_PhysicalObject table, even though from VMM Console, the Private Cloud shows up empty. 
    For some testing purposes, I assigned a VM back to the Private Cloud I am trying to delete, only to move it out again and gather some tracing/logging. When I moved the VM back out of the Private Cloud, I had a SQL Profiler running in the background, capturing
    the SQL statements on the DB server. Looking at the "exec dbo.prc_WLC_UpdatePhysicalOBject" statement, I see the @CloudID variable is assigned the "CloudID" of the Private Cloud the VM is currently assigned to/the Private Cloud I am trying
    to delete and is NOT the CloudID of the Private Cloud the VM is being moved to/assigned to. 
    Instead of having the VMM Console GUI do the Private Cloud assignment/change...I copied the PowerShell commands out...so I can run them manually. Looks like the script gets 4 variables ($VM, $OperatingSystem, $CPUType, and $Cloud), and then runs the "Set-SCVirtualMachine"
    CMDLET. For the $Cloud variable, it does return the proper "CloudID" of the Private Cloud I am trying to move the VM too (I ran it separately and then ran an ECHO $Cloud to look at its value). When I run the "Set-SCVirtualMachine" CMDLET,
    the output has values for "CloudID" and "Cloud" and these are still the values of the source Private Cloud/Private Cloud I am moving the VM out of and ultimately want to delete. 
    Has anyone ran into this? Is something not processing right in the "Set-SCVirtualMachine" CMDLET?

    I been slowing looking into this and this is where I am at:
    I built a development SCVMM 2012 R2  instance that mocks our production environment (minus all the VM's...just the networking configuration and all the private clouds have been mocked). From there, I started at SCVMM 2012 R2 GA and one by one installed
    the 4 rollup patches in ordered and at each new patch level,  I monitored the queries coming in through SQL Profiler, as I moved a VM between private clouds and created new VM's within clouds. As I created new VM's and moved the VM's between clouds. the
    stored procedure "prc_WLC_UpdatePhysicalOBject" all have a value of NULL for the CloudID column....so a CloudID isnt even associated to the physical objects (basically the VHDX files and any mounted ISO's I have on the VM's). 
    I did find out this SCVMM instance was upgraded from SCVMM 2008 (I took over after the 2012 R2 upgrade was completed). 
    I am thinking at this point...nothing is wrong with SCVMM 2012 R2 if you build and recreate it from scratch and a new DB. I am thinking this might be a depreciated field from SCVMM 2008. The only other thing we did, was put in a SAN and moved VM's from stand-alone
    hosts to the new CSV's (A mixture of 2008 R2 and 2012 NON R2 hosts). 
    At this point...since we dont have Self-Service enabled yet....it will be a days work to rebuild a new instance of SCVMM 2012 R2 and migrate the hosts/VM's to it and start from a clean slate. 
    I know the DB structure isnt really published...but does anybody have any other insights into this? 

  • Wrong version of an entity bean object being updated

    We are having a problem with an entity bean that uses bean managed persistence. The "order" entity bean has
    been used as part of our Order Routing System for the last 2 years with no problems. The entity bean is
    accessed via calls from a "Order Manager" session bean. No change has been done to the entity bean but the
    frequency of calls from the session bean to update the entity bean have increased significantly.
    The "order" entity bean wraps an Order object that contains order properties (i.e. id, quantity, price,
    version, etc). The entity bean has a "void setOrder(Order param)" function that writes the Order to a database
    and a "Order getOrder()" function that clones and returns the internal Order object. The "ejbLoad()" function
    reads the Order object from the database and the "ejbStore()" function is not implemented.
    The "OrderEntityPK ejbFindByPrimaryKey()" function checks if the order entity primary key (an "int") exists
    on the database.
    We are using the SilverStream 3.5 application server as our EJB container. According to the SilverStream manual
    it does not maintain a pool of idle/unused entity beans, instead it instantiates beans as requested.
    Our problem is:
    1) The wrong version of the entity object is sometimes being updated (i.e. an old instance of the order entity is being
    picked up and updated on the database).
    2) We sometimes get a TransactionRequired exception thrown when we have concurrent updates to two different
    objects of the entity bean.
    Any idea as to what our problem could be?
    Thanks in advance for your help,
    The following are the main code snippets:
    Original Code
    Session Bean A
    Method 1 --- gets entity Bean B and calls a method on a different object passing this entity bean
              in as a parameter to enable a method on this bean to be called.
    EntityBean lOrderEntity = findOrderEntity(callerUnixLogin, currOrderId);
                   currOrder = lOrderEntity.getOrder();
                   //Logic to update the currOrder object via a method call.
                   persistManager.persistOrder(lOrderEntity, callerUnixLogin, currOrder, psTransactionType);
         persistManager.persistOrder Method:
                   lOrderEntity.setOrder(callerUnixLogin, order);
         findOrderEntity method:
    OrderEntity lOrderEntity = null;
              OrderEntityBeanPK orderPK = new OrderEntityBeanPK(orderId);
              try
                   if (orderEntityHome == null)
                        connectToOrderEntityBean(callerUnixLogin);
                   lOrderEntity = orderEntityHome.findByPrimaryKey(orderPK);
              ... etc
    Current Code
    Session Bean C
    Method 2 ---- calls method 1 in Session Bean A
    Calls to method 2 above happens in quick succession.
    OrderEntityBean class
    ... important methods ...
         private Order order = null;
         public OrderEntityBeanPK ejbFindByPrimaryKey(OrderEntityBeanPK primaryKey)
              throws FinderException, RemoteException, DBOException
              try
                   orderObjectManager.orderIdExists(primaryKey.orderId);
              catch (OMOrderValidationException exc)
                   throw new FinderException(exc.getMessage());
              return primaryKey;
         public void setOrder(String userUnixLogin, Order newOrder)
              throws EJBException, RemoteException, DBOException, OMFormattingException, OMOrderValidationException
              callerUnixLogin = userUnixLogin;
              int version = newOrder.getOrderVersion().intValue();
              if (order.getOrderVersion().intValue() == version)
                   order = null;
                   order = newOrder;
                   Integer newVersion = new Integer(version + 1);
                   order.setOrderVersion(newVersion);
                   newVersion = null;
                   order.setSysUser(callerUnixLogin);
                   orderObjectManager.updateOrder(callerUnixLogin, order);
              else
                   Debug.Print(userUnixLogin, "OrderEntityBean.setOrder: wrong version number for order " + newOrder.getOrdId() +
                        ": expected " + order.getOrderVersion() + " and got " + newOrder.getOrderVersion(), 0);
                   throw new OMOrderValidationException("wrongVersion", order, order.getOrdId(), IName.Order.VERSION, newOrder.getOrderVersion());
         public Order getOrder()
              throws EJBException, RemoteException
    return ((Order)order.clone());
    The following transactions exists for the entity bean ...
    Required:
         create and setOrder methods
    Not Supported
         findByPrimary and getOrder methods

    "The entity bean has a "void setOrder(Order param)" function that writes the Order to a database"
    This functionality should be performed in the ejbStore method().
    "a "Order getOrder()" function that clones and returns the internal Order object."
    Sounds reasonable, except for the cloning part.
    "The "ejbLoad()" function reads the Order object from the database"
    Cool.
    ""ejbStore()" function is not implemented."
    Whoops. Looks like your setOrder method is doing too much. It should do the inverse of getOrder (namely, setting the interal Order object), nothing more. Defer the persistence code to the ejbStore method.
    "According to the SilverStream manual it does not maintain a pool of idle/unused entity beans, instead it instantiates beans as requested."
    Manual? What's that? Assuming that is correct, better hope you don't ever get a high load. You might wanna look into JBoss.
    "2) We sometimes get a TransactionRequired exception thrown when we have concurrent updates to two different objects of the entity bean."
    How can you have concurrent access to two different objects?? Concurrency is inherently applicable to only one object.
    In summary:
    Write your beans properly, ejbLoad populates the bean with data, ejbStore persists the bean's data.
    Get a better (and possibly free) appserver.

Maybe you are looking for

  • Is it possible to move "MacIntosh HD" icon off desktop?

    I am really OCD and I am trying to get all the icons off of my desktop. So I was wondering if you are able to move the hard drive icon off of the desktop and just access it through the shortcut on the left side of the finder window. I see that you ca

  • Language DVD fo ECC 6.0 upgrade

    Hi All, We are in process of doing the upgrade from 4.7-> Ecc 6.0, presently we are in Prepare module where we unable to go forword from Lang_select phase. We have downloaded the  CD from market place 51032235_1 to 6 and when we trying to give the mo

  • Fusion drive + Bootcamp on mid 2012 MacBook Pro 15"

    Dear all, I am in a sort of delimma now, as I am trying to set up a Fusion Drive with a Bootcamp partition on my 2012 MacBook Pro 15" with a Hitachi 750G HDD and a Crucial Micron M4 256G SSD. Here are the challenges I read up from other threads or pe

  • Mountain Lion Running Very slow

    I am running ML on a Mac Mini, 2011, i7, 8Gb RAM.  Clean Install recently after similar problems with upgrade from Lion.  Etrecheck report below.  Any help would be very appreciated. Hardware Information:     Mac mini - model: Macmini5,2     1 2.7 GH

  • Reading Books on Color Ipod

    I take a big reference book to work with me everyday. It would be cool if I could somehow download and organize by chapter the text in the book to my ipod. Does anyone know if this can be done?