Update objects in prestore

Hi
I am using kodo version 3.3.2 and
I am updating object x and using x prestore method to retrieve object y
(different type) and update it.
If the object y does not exist in datastore i am creating a new one and
storing it.
The result :
when object y does not exist in datastore = object x is updated and object
y is being created.
when object y exist = only object x is being updated.
i tried it several times with many additional tests and it seems that no
updates to existing pc objects can be done in prestore.
i also checked that
I am in active transaction,
I am using the same pm all the way.
when i moved the code that in the prestore to before the commit, all
worked properly.
is there a way to fix it ?
Thanks
Dani

Can you send a test case for this to [email protected]? We
have recently invalidated the bug.
Dani wrote:
Thanks
What is the target version for the fix ?
Dani
Stephen Kim wrote:
We have logged a bug report for this:
http://bugzilla.solarmetric.com/show_bug.cgi?id=1162
Dani wrote:
Hi
I am using kodo version 3.3.2 and
I am updating object x and using x prestore method to retrieve object y
(different type) and update it.
If the object y does not exist in datastore i am creating a new one and
storing it.
The result :
when object y does not exist in datastore = object x is updated and object
y is being created.
when object y exist = only object x is being updated.
i tried it several times with many additional tests and it seems that no
updates to existing pc objects can be done in prestore.
i also checked that
I am in active transaction,
I am using the same pm all the way.
when i moved the code that in the prestore to before the commit, all
worked properly.
is there a way to fix it ?
Thanks
Dani
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com

Similar Messages

  • Error in updating object SURVEY

    Hi Experts,
    The following error occurs not always but very rarely while updating the notes field or while saving an Activity.
    SAP Note
    The following error text was processed in the system P60:
    Error in updating object SURVEY
    The error occurred on the application server crmpcs2c_P60_09 and in the work process 6.
    The termination type was: ABORT_MESSAGE_STATE
    The ABAP call stack was:
    Function: CRM_SURVEY_UPDATE_DY of program SAPLCRM_SURVEY_DU
    Form:CRM_SURVEY_UPDATE_DY of program SAPLCRM_SURVEY_DU
    Form:%_UPDATES_NO_UTASK of program SAPMSSY4
    Form: LOCAL_UPDATE_TASK of program SAPMSSY4
    START-OF-SELECTION of Program SAPMSSY4
    Could you help me in this regard.
    Thanks in Advance.
    I will reward full points to the expert.
    Regards,
    Madhura.

    Hi Gervase,
    No, but there was an associated dump in the transaction SM13.
    Here is the detail:
    Function Module: CRM_SURVEY_UPDATE_DU
    Status: Update was terminated
    Report: LCRM_SURVEY_DUU02
    Row: 94
    Error details   Class: CRM_ORDER_MISC Number: 002
    Error in updating object SURVEY
    Thanks in Advance.
    Regards,
    Gabriel.

  • Account Update not returning the correct updated object

    I have a process that updates the Owner of the Account.
    The web service call works. I can see the owner change in OnDemand.
    The documentation tells me that the return from this call should be the updated object.
    However when I inspect the AccountUpdate_Output object the OwnerID is null.

    Hi,
    I don't think after update process siebel returns the updated object.
    according to my knowledge it return the status keys.that are
    1.all user keys
    2. all audit fields.
    Dinesh
    CRMIT

  • Errors when 'Updating Objects' during migration from r2 to 3.1 FP1.8

    Has anyone seen errors like this the Update Objects error log file.  I've done 5 or 6 test migrations, and before it was normally working fine, but a couple of times I would get thousands and thousands of rows in the log file such as this:
    ID     Object     Path     Error
    1000023     1000023     ...     
    1000029     1000029     ...     
    1000036     1000036     ...     
    1000069     1000069     ...     
    1000070     1000070     ...     
    1000075     1000075     ...     
    1000107     1000107     ...     
    1000116     1000116     ...
    In testing, there doesn't seem to be much of an indication of any problems, except that recurring schedules don't work after the upgrade, which is a big deal for us as we have about 1000 of them.

    I can't tell what  the compiler is complaining about. I tried a version of your code sample:
    struct Error { Error(int); };
    struct Warning : public Error {
        Warning(void) : Error(-8) {}
    struct Warning_NoNewMilestones : public Warning {
        Warning_NoNewMilestones(void) { }
    int main()
        throw  Warning_NoNewMilestones();
    It compiled without complaint using C++ 5.12 (Studio 12.3).
    There are always two possibilities: The code is OK and you hit a compiler bug, or the code was always invalid but the earlier compiler did not catch the error. Since you seem to have a variety of error messages, the most likely scenario is that the new compiler is catching more errors in your code.
    In general, there is no option to have the compiler accept invalid code. In rare cases, where the error is harmless, or when other compilers typically accept the invalid code, we have an option to allow the code. Please review the list of compiler options in Appendix A of the C++ Users Guide.
    Oracle Solaris Studio 12.3 Information Library
    If the reason for an error message is not obvious, you can post a (preferably small) example that can be compiled to show the error message. Someone in the forum can then probably explain the error, or verify that you hit a compiler bug.
    Here is an example of the badbinaryop error message:
    % cat z.cc
    struct S { };
    int main()
        S s;
        int j = s + 3;
    % CC z.cc
    "z.cc", line 5: Error: The operation "S + int" is illegal.
    1 Error(s) detected.
    I hope the reason for the error is obvious in this case.

  • Can we do mass update object descriptions in universe?

    Hi,
    I am looking a classic way to do mass (multiple) update "object descriptions" in universe.
    However, I am now using BO XI 3.1
    Regards,
    /Ni-on

    i think you can do this using the business objects SDK.
    good luck
    Amr

  • Updating objects

    The recommended way for updating objects is to read first from uow or register with uow. either way we get a clone.
    How deep is this clone? does this contain any references to cached objects? how deep can we go modifying this clone?

    In our case, we can pick one object and navigate through the entire object model from there. ( I believe this is not an uncommon scenario !)
    So,
    1. if register() is cloning everything, is this going to affect performance?
    2. does it matter which object is registered, because we can always navigate to the object we want to update?

  • Flex/Air Update Object Issue...

    The following code is from the Air Employee Directory example
    to which I have added an Update Object, the app installs and
    updates with no problem, but as soon as the update is done and it's
    time for the app to start, the app just doesn't come up. It was
    working fine before I added the update object... Any idea on what I
    could be doing wrong?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" xmlns:ui="com.adobe.empdir.ui.*"
    applicationComplete="onApplicationComplete()" height="100%"
    width="100%" frameRate="45"
    horizontalScrollPolicy="off" verticalScrollPolicy="off"
    visible="false"
    showEffect="Fade" xmlns:local="*"
    creationComplete="checkUpdate()">
    <mx:Script>
    <![CDATA[
    import mx.logging.Log;
    import com.adobe.empdir.commands.ui.CloseApplicationCommand;
    import mx.binding.utils.BindingUtils;
    import mx.events.StateChangeEvent;
    import mx.events.ResizeEvent;
    private function onApplicationComplete() : void
    callLater( ui.init );
    // We listen to CLOSING fromboth the stage and the UI. If
    the user closes the app through the taskbar,
    // Event.CLOSING is emitted from the stage. Otherwise, it
    could be emitted from TitleConrols.mxml.
    ui.addEventListener( Event.CLOSING, onWindowClosing );
    stage.nativeWindow.addEventListener( Event.CLOSING,
    onWindowClosing );
    stage.nativeWindow.addEventListener( Event.CLOSE,
    onWindowClose );
    private function onWindowClose( evt:Event ) : void
    NativeApplication.nativeApplication.exit();
    private function onWindowClosing( evt:Event ) : void
    evt.preventDefault();
    var cmd : CloseApplicationCommand = new
    CloseApplicationCommand();
    cmd.execute();
    ]]>
    </mx:Script>
    <mx:Script>
    <![CDATA[
    import air.update.events.UpdateEvent;
    import mx.controls.Alert;
    import flash.events.ErrorEvent;
    import air.update.ApplicationUpdaterUI;
    * @var the object that that handles the update related
    actions
    private var appUpdater:ApplicationUpdaterUI = new
    ApplicationUpdaterUI();
    * This function is triggered when the application finished
    to load;
    * Here we initialize <code>appUpdater</code> and
    set some properties
    private function checkUpdate():void {
    setApplicationVersion();
    // we set the URL for the update.xml file
    appUpdater.updateURL = "
    http://localhost/updater/update.xml";
    //we set the event handlers for INITIALIZED nad ERROR
    appUpdater.addEventListener(UpdateEvent.INITIALIZED,
    onUpdate);
    appUpdater.addEventListener(ErrorEvent.ERROR, onError);
    //we can hide the dialog asking for permission for checking
    for a new update;
    //if you want to see it just leave the default value (or set
    true).
    appUpdater.isCheckForUpdateVisible = false;
    //if isFileUpdateVisible is set to true, File Update, File
    No Update,
    //and File Error dialog boxes will be displayed
    appUpdater.isFileUpdateVisible = false;
    //if isInstallUpdateVisible is set to true, the dialog box
    for installing the update is visible
    appUpdater.isInstallUpdateVisible = false;
    //we initialize the updater
    appUpdater.initialize();
    * Handler function triggered by the
    ApplicationUpdater.initialize;
    * The updater was initialized and it is ready to take
    commands
    * (such as <code>checkNow()</code>
    * @param UpdateEvent
    private function onUpdate(event:UpdateEvent):void {
    //start the process of checking for a new update and to
    install
    appUpdater.checkNow();
    * Handler function for error events triggered by the
    ApplicationUpdater.initialize
    * @param ErrorEvent
    private function onError(event:ErrorEvent):void {
    Alert.show(event.toString());
    * A simple code just to read the current version of the
    application
    * and display it in a label.
    private function setApplicationVersion():void {
    var appXML:XML =
    NativeApplication.nativeApplication.applicationDescriptor;
    var ns:Namespace = appXML.namespace();
    ]]>
    </mx:Script>
    <mx:TraceTarget level="0" includeDate="false"
    includeTime="false"
    includeCategory="true" includeLevel="true">
    <mx:filters>
    <mx:Array>
    <mx:String>*</mx:String>
    </mx:Array>
    </mx:filters>
    </mx:TraceTarget>
    <ui:ApplicationUI id="ui" width="100%" height="100%"
    />
    </mx:Application>

    The following code is from the Air Employee Directory example
    to which I have added an Update Object, the app installs and
    updates with no problem, but as soon as the update is done and it's
    time for the app to start, the app just doesn't come up. It was
    working fine before I added the update object... Any idea on what I
    could be doing wrong?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" xmlns:ui="com.adobe.empdir.ui.*"
    applicationComplete="onApplicationComplete()" height="100%"
    width="100%" frameRate="45"
    horizontalScrollPolicy="off" verticalScrollPolicy="off"
    visible="false"
    showEffect="Fade" xmlns:local="*"
    creationComplete="checkUpdate()">
    <mx:Script>
    <![CDATA[
    import mx.logging.Log;
    import com.adobe.empdir.commands.ui.CloseApplicationCommand;
    import mx.binding.utils.BindingUtils;
    import mx.events.StateChangeEvent;
    import mx.events.ResizeEvent;
    private function onApplicationComplete() : void
    callLater( ui.init );
    // We listen to CLOSING fromboth the stage and the UI. If
    the user closes the app through the taskbar,
    // Event.CLOSING is emitted from the stage. Otherwise, it
    could be emitted from TitleConrols.mxml.
    ui.addEventListener( Event.CLOSING, onWindowClosing );
    stage.nativeWindow.addEventListener( Event.CLOSING,
    onWindowClosing );
    stage.nativeWindow.addEventListener( Event.CLOSE,
    onWindowClose );
    private function onWindowClose( evt:Event ) : void
    NativeApplication.nativeApplication.exit();
    private function onWindowClosing( evt:Event ) : void
    evt.preventDefault();
    var cmd : CloseApplicationCommand = new
    CloseApplicationCommand();
    cmd.execute();
    ]]>
    </mx:Script>
    <mx:Script>
    <![CDATA[
    import air.update.events.UpdateEvent;
    import mx.controls.Alert;
    import flash.events.ErrorEvent;
    import air.update.ApplicationUpdaterUI;
    * @var the object that that handles the update related
    actions
    private var appUpdater:ApplicationUpdaterUI = new
    ApplicationUpdaterUI();
    * This function is triggered when the application finished
    to load;
    * Here we initialize <code>appUpdater</code> and
    set some properties
    private function checkUpdate():void {
    setApplicationVersion();
    // we set the URL for the update.xml file
    appUpdater.updateURL = "
    http://localhost/updater/update.xml";
    //we set the event handlers for INITIALIZED nad ERROR
    appUpdater.addEventListener(UpdateEvent.INITIALIZED,
    onUpdate);
    appUpdater.addEventListener(ErrorEvent.ERROR, onError);
    //we can hide the dialog asking for permission for checking
    for a new update;
    //if you want to see it just leave the default value (or set
    true).
    appUpdater.isCheckForUpdateVisible = false;
    //if isFileUpdateVisible is set to true, File Update, File
    No Update,
    //and File Error dialog boxes will be displayed
    appUpdater.isFileUpdateVisible = false;
    //if isInstallUpdateVisible is set to true, the dialog box
    for installing the update is visible
    appUpdater.isInstallUpdateVisible = false;
    //we initialize the updater
    appUpdater.initialize();
    * Handler function triggered by the
    ApplicationUpdater.initialize;
    * The updater was initialized and it is ready to take
    commands
    * (such as <code>checkNow()</code>
    * @param UpdateEvent
    private function onUpdate(event:UpdateEvent):void {
    //start the process of checking for a new update and to
    install
    appUpdater.checkNow();
    * Handler function for error events triggered by the
    ApplicationUpdater.initialize
    * @param ErrorEvent
    private function onError(event:ErrorEvent):void {
    Alert.show(event.toString());
    * A simple code just to read the current version of the
    application
    * and display it in a label.
    private function setApplicationVersion():void {
    var appXML:XML =
    NativeApplication.nativeApplication.applicationDescriptor;
    var ns:Namespace = appXML.namespace();
    ]]>
    </mx:Script>
    <mx:TraceTarget level="0" includeDate="false"
    includeTime="false"
    includeCategory="true" includeLevel="true">
    <mx:filters>
    <mx:Array>
    <mx:String>*</mx:String>
    </mx:Array>
    </mx:filters>
    </mx:TraceTarget>
    <ui:ApplicationUI id="ui" width="100%" height="100%"
    />
    </mx:Application>

  • Invalid table name  error when updating object in collection using SQL

    Hi,
    I have pl/sql code where I am selecting a object from a collection using sql select query. I am processing this record and now I want to update the collection with the new object. ie. ensure that the object that was fetched be removed and this new one be added.
    considering my_ot is the object type and my_tt is the table type.
    DECLARE
    my_col my_tt;
    my_col1 my_tt
    my_var my_ot;
    my_var2 VARCHAR2(10);
    BEGIN
    // populating my_col1 with select query
    //populating my_col with select query
    FOR my_col1.FIRST .. my_col.LAST LOOP
    //populating my_var2
    BEGIN
    SELECT my_ot(c.field1, c.field2 ,c.field3) INTO my_var FROM TABLE(my_col) c WHERE c.field3 = my_var2
    //processing the field my_VAR
    UPDATE TABLE(my_col) c SET c.field1 = my_var.field1 , c.field2 = my_var.field2 , WHERE c.field3 = my_var.field3;
    EXCEPTION WHEN NO_DATA_FOUND
    my_col.EXTEND;
    my_col(my_col.LAST) := // new my_ot object
    END;
    END LOOP;
    Here, when compiling the update query is not being compiled. I am getting a error 'invalid table name'. Is there any way to modify an object in the collection without knowing its index?
    If not, is it possible to find the index of a object in the collection in select query?
    Thanks in advance
    Paddy

    Hi,
    Is there any way to find the index of a object in the collection? Then I will simply replace the object at that index, right!
    Thanks
    Paddy

  • BAPI_DOCUMENT_CREATE2 -Updating object links

    Hi I am using this bapi to create documents through CV01n.
    but, problems is i could not update this OBJECT links tab. I want to populate Customer no. I am trying by sending through Object links structure, but no use.
    What mght be the Problem?
    Pls. Help Me.
    Regards,
    Krishna.

    Hi,
    Please read the Function module documentation. An example is given there.
    **.... Object links
       DATA:    lt_drad  LIKE bapi_doc_drad OCCURS 0 WITH HEADER LINE.
    **.... Object link to material master
    CLEAR lt_drad.
    REFRESH lt_drad.
    lt_drad-objecttype = 'MARA'.
    lt_drad-objectkey  = 'M4711'.
    APPEND lt_drad.
    You can find the entries for the object type 'OBJECTTYPE' in the table TCLO (MARA for material). The object key 'OBJECTKEY' is made up of the key fields of the SAP object that is also is in the table TCLO.
    Edited by: Neenu Jose on Nov 3, 2008 9:41 AM
    Edited by: Neenu Jose on Nov 3, 2008 9:42 AM
    Edited by: Neenu Jose on Nov 3, 2008 9:44 AM
    Edited by: Neenu Jose on Nov 3, 2008 9:47 AM

  • Update Objective Setting & Appraisals(Received) tab in PA20

    Hi all,
    I am currently working on OSA appraisal. I managed to create appraisal. How can i update the Objective Setting & Appraisals(Received) and  Objective Setting & Appraisals(Created) tab in PA20, infotype 25 ?
    Appreciate your all help.
    Thank you.

    Hi Binu,
    I am not entirely clear about your requirement, but in OOHAP_VALUE_TYPE, for a specific proficiency value, if you have maintained a description for the value under 'Value description' then it will be displayed on the form within the 'Info' button.
    Regards,
    Priya.

  • Unable to update objects in console (hangs on "apply")

    Hi,
    I seem to be unable to update, create or delete any objects in SCCM console. For example, I can open properties of an existing application, enter some values, but when I click on "Apply", the console hangs and seems to be stuck in that state
    forever, but no application crash. If I kill SCCM console task, reopen console and check the properties again, nothing was updated. I am also unable to create new collections, the wizard just seems to work forever (without freezing).
    I rebooted our SCCM site server several times and also restarted SQL service (which is running on another server), but no luck.
    Under site status, I can't find anything that seems to be related to the issue. I'm unsure what log file to check, has anybody an idea?
    I recently uninstalled SUP and WSUS, maybe this is related?
    Thanks!

    I got this error as a pop-up today for the first time. I updated a value in the properties dialogue of a collection. Did this two times before today, both times nothing happened for about one hour and then the change was commited. Third time I got this:
    "The SMS Provider reported an error."
    ConfigMgr Error Object:
    instance of SMS_ExtendedStatus
    CauseInfo = "11";
    Description = "Unable to update collection due to SQL error.";
    ErrorCode = 3242722566;
    File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspcollection.cpp";
    Line = 830;
    ObjectInfo = "";
    Operation = "PutInstance";
    ParameterInfo = "";
    ProviderName = "ExtnProv";
    SQLMessage = "[HYT00][0][Microsoft][SQL Server Native Client 11.0]Query timeout expired";
    SQLSeverity = 0;
    SQLStatus = 0;
    StatusCode = 2147749889;
    Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryException
    The SMS Provider reported an error.
    Stack Trace:
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put()
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(IResultObject resultObject, List`1 resultObjectsPut, Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.DialogFramework.Forms.SmsPropertySheet.Put(ActionTrigger trigger)
    System.Management.ManagementException
    Generic failure
    Stack Trace:
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put()
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(IResultObject resultObject, List`1 resultObjectsPut, Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.DialogFramework.Forms.SmsPropertySheet.Put(ActionTrigger trigger)
    Maybe someone can get any useful information out of this? I still don't know what to do...

  • Updating objects in a HashMap

    I have a HashMap and I need to write a method that updates certain field in the objects stored in it.
    I basically need to access random objects in the map and call a set method in the object to set a field to a specific value.
    How do I access the objects in the map and (presumably) cast them as their real class then call a method?
    Any ideas?

    the code i gave you should work without any mods...well, i mean, you don't have to worry about "putting" it back in the hashmap cuz it will be changed when you call someMethod() on it...
    remember, objects are pass by reference
    (or as some argue, pass by value where the value happens to be a reference... but i digress)

  • URGENT!!!! (working with data transfer workbench:updating objects)

    I have tranfered the BP code and name along with phone and other header details. Now i want to im port the address. I have tried the following steps:-
    1. used the address template filled up all colums- address name , block, city, code
    2.when i am using the DTW I am selecting the main bp template in the "query Params" and in the BPAdress i nput the address csv
    3. update existing objects
    4. Select-"Add all items in the schema if cant find corresponding item"
       but then at last no file is being imported.
    Errors- " Cant find the object in B1 Application"
               "Object not defined"

    Line number should be left blank.  They will not be used for importing addresses
    For addresses import you will need both the BP template and Addresses template
    In the BP template which you used to import BPCOde, Name, Phone etc...  Just keep the RecordKey and BP Code for the BP's whose address needs to be imported.
    Now in the addresses template match the recordkey to the BP template (the recordkey is what is used to match the Header and the Addresses template)
    Header Sample
    RecordKey............BPCode
    Line Sample
    RecordKey............AddresType.........rest of the fields

  • Problem with UDF updation - Object type 46

    Hi Experts,
    Scenario :
    For printing the amounts(in words- Indian format) in Cheque and marketing documents, we created UDFs in Title of marketing documents and outgoing payments.
    Then created a function in the DB for convertion of amounts into words and invoked it from  SBO_SP_TransactionNotification for object type '46' (Outgoing payment) and for transaction type 'A'.
    We tried it  with Out going payments
    Problem :
    Initially It was not working at all. When we removed the  transaction type condition the amount got updated on updation of existing records. Still It is not updating the UDFs while adding a new outgoing payment.
    We inserted the values like object type , transaction type etc into a temp table for testing from SBO_SP_TransactionNotification .
    The value we got for Out going payment addition is
    Object type: 30 and transaction type : A (Why this is 30 while adding outgoing payment?)
    The value we got for Out going payment modification is
    Object type: 46 and transaction type :U
    Please Help us on this
    I don't know whether this is the right forum or not.
    We are using SAP Business One 2007 B PL 13
    Thanks and regards
    Ajith G
    Edited by: Ajith G on Oct 5, 2009 11:48 AM

    Hi,
    Step to have check print in Indian format
    1)create function
    2)create user field in that master table
    3)make user define query
    declare @Doc_total numeric (19,6)
    set @Doc_total= (SELECT $[ORPC.DocTotal])
    declare @F100 varchar(20)
    declare @DocCurr varchar(20)
    SET @DocCurr= (SELECT $[ORPC.DocCur])
    set @F100= (SELECT Chk100Name FROM OCRN WHERE CurrCode = @DocCurr)
    select REPLACE(SBO_DB.dbo.AmountToWords (@Doc_total), 'Paise',  @F100)
    4)save above query and define that query in user field by shift+F2
    i hope u may know next step
    Kevin

  • Correct way to handle the updated object

    Hi,
    I have a thread, test2.java, that periodically update a object that pass from test.java. In test.java, the "data" object need to be most updated coz this object is used in other thread also. I can ensure that only test2.java do the write, others threads are read only.
    My question is: I can write some dirty code to do what I want. But for a programmer, I want to know the formal, oo way to handle this situation.
    Thanks.
    Tommy
    public class test{
    data d;
    test2 t2;
    public test(){
    d = new data(1, getClass().toString());
    t2 = new test2(d);
    t2.start();
    public void runServices(){
    while(true){
    //If i don't do anything, the following code only print out
    //the instance that i init. here.. Not the updated one
    System.out.println(d.toString());
    try{
    Thread.sleep(5000);
    }catch(InterruptedException ex){}
    public static void main(String[] args){
    test t = new test();
    t.runServices();
    * This class will periodically update the "data" object that
    * passed from test.java
    public class test2 extends Thread{
    int count = 1;
    data d;
    public test2(data a){
    this.d = a;
    public void run(){
    while(true){
    d = new data(count++, getClass().toString());
    System.out.println(d.toString());
    try{
    sleep(5000);
    }catch(InterruptedException ex){}
    public class data{
    int count;
    String s = "";
    public data(int a, String b){
    count = a;
    s = b;
    public String toString(){
    return s + " count:" + count;

    Sorry nearly missed that :(
    You should try to modify the instance of data you have been given in the constructor for test2 instead of creating a new object:
    * This class will periodically update the "data" object that
    * passed from test.java
    public class test2 extends Thread {
      int count = 1;
      data d;
      public test2(data a) {
        this.d = a;
      public void run() {
        while(true) {
          d.refreshWith(count++, getClass().toString());
          System.out.println(d.toString());
         try {
           sleep(5000);
         } catch(InterruptedException ex){}
    }

Maybe you are looking for

  • Error while deploying BPEL Process using FTPAdapter

    Hi, I have process which uses FTPAdapters. When I deploy in developer instance it doesn't give any error, but when I try to deploy in middle tier instance i get below error Error deploying BPEL archive.An error occurred while attempting to deploy the

  • ASCII to EBCDIC conversion

    Hi there! I am working on an Oracle data extract project. My output file will send to a DB2 database and a mainframe application. In my file, some fields' type is COMP-3. I use Oracle build-in function convert () to convert to EBCDIC. This works fine

  • How do I get these automated FIOS marketing phone calls to stop

    I get a phone call on my mobile phone every couple of days from 410-910-0614, and it is a recorded message for Verizon Fios. It is extremely annoying and I would like it to stop, how can I be removed from this automated dialer?

  • ITunes no longer opening since upgrade

    I installed the newest 7.1.1 version of iTunes (and also had to upgrade quicktime to 7.1.5). iTunes no longer opens and none of the possible fixes I've seen in the discussion boards has worked. Please let me know if anyone cracks the case. I am on OS

  • After upgrading the OS to 10.6.8, my Skype clashes when open and iMail crashes when trying to attach Pages File !?? What happen?

    I just updated my mac book pro to OS 10.6.8 and now my skype crashes after launching and iMail crashes after trying to attached Pages file. The OS is very unstable !!! what happen ! this is first time i am experiencing this...so sad What can i do now