Synchronized qeustion.

Hi,
I a really newbie to JAVA .
I'm trying to understand the meaning of synchronized via an example :
I've created 3 JAVA class :
Stacky
Thread1
Thread2
Thread1 will fill the Stacky .
Thread1 will read from the Stacky .
without the synchronized reserved word I get error - ok , I understand it.
I would expect the synchronized to resolve this problem but it didn't ...
please ... what am I doing wrong ?

My JAVA CODE ....
package Synchronized;
public class Main {
          public static void main (String[] args)
               Stacky stc = new Stacky();
               Thread1 trd1 = new Thread1(stc );
               Thread2 trd2 = new Thread2(stc);
               trd1.start();
               trd2.start();
package Synchronized;
public class Stacky {
     private int top = 0;
     private int data[] = new int[10];
     public void push(int num) {
          /**Try run this code with and without the synchronized command [in the push and in the pop methods]**/
          synchronized(this)
                    System.out.println("Insert " + top);
                    data[top] = num;
                    top++;
     public int pop() {
          /**Try run this code with and without the synchronized command [in the push and in the pop methods]**/
          synchronized(this){
               int temp = --top;
               System.out.println("Get" + temp );
               return data[temp];
package Synchronized;
public class Thread1 extends Thread{
     Stacky stc;
     public Thread1(Stacky s )
          stc = s;
     public void run()
          for (int i = 0; i < 10; i++) {
               stc.push(i);     
               //dummy wait code ...
               try{
                    Thread.sleep(1900);
                    catch(InterruptedException e){
                    System.out.println("Sleep Interrupted");
package Synchronized;
public class Thread2 extends Thread{
     Stacky stc;
     public Thread2(Stacky s )
          stc = s;
     public void run()
          for (int i = 0; i < 10; i++) {
               stc.pop();     
}

Similar Messages

  • Issue in Synchronous File Read in clustered environment

    Hi,
    We are using clustered environment (4 managed servers) in Unix. In a OSB 11gR3 proxy service we are using Synchronous File Read. Randomly we are getting the below error. Let us know what could cause the issue. But the same code is working fine in a single stand-alone server configuration.
    Error Code : BEA-380002 , Error Reason : Invoke JCA outbound service failed with connection error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderNamer/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:153)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:598)
    at sun.reflect.GeneratedMethodAccessor1115.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at $Proxy142.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:670)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatchSync(PipelineContextImpl.java:551)
    at stages.transform.runtime.WsCalloutRuntimeStep$WsCalloutDispatcher.dispatch(WsCalloutRuntimeStep.java:1391)
    at stages.transform.runtime.WsCalloutRuntimeStep.processMessage(WsCalloutRuntimeStep.java:236)
    at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
    at com.bea.wli.sb.stages.impl.SequenceRuntimeStep.processMessage(SequenceRuntimeStep.java:33)
    at com.bea.wli.sb.pipeline.PipelineStage.processMessage(PipelineStage.java:84)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
    at com.bea.wli.sb.pipeline.Pipeline.processMessage(Pipeline.java:141)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
    at com.bea.wli.sb.pipeline.PipelineNode.doRequest(PipelineNode.java:55)
    at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
    at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
    at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
    at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:375)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl$4.run(JCATransportInboundOperationBindingServiceImpl.java:415)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl$4.run(JCATransportInboundOperationBindingServiceImpl.java:413)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl.sendMessage(JCATransportInboundOperationBindingServiceImpl.java:413)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl.invokeOneWay(JCATransportInboundOperationBindingServiceImpl.java:126)
    at com.bea.wli.sb.transports.jca.binding.JCAInboundRequestListener.post(JCAInboundRequestListener.java:39)
    at oracle.tip.adapter.sa.impl.inbound.JCAInboundListenerImpl.onMessage(JCAInboundListenerImpl.java:170)
    at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:502)
    at oracle.tip.adapter.file.inbound.Publisher.onMessageDelegate(Publisher.java:493)
    at oracle.tip.adapter.file.inbound.Publisher.publishMessage(Publisher.java:419)
    at oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.xlate(InboundTranslatorDelegate.java:484)
    at oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.doXlate(InboundTranslatorDelegate.java:121)
    at oracle.tip.adapter.file.inbound.ProcessorDelegate.doXlate(ProcessorDelegate.java:388)
    at oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDelegate.java:174)
    at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:349)
    at weblogic.work.ContextWrap.run(ContextWrap.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:259)
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:150)
    ... 56 more
    Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:662)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:353)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:312)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:350)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:253)
    ... 57 more
    Caused by: BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at oracle.tip.adapter.file.outbound.FileReader.readFile(FileReader.java:277)
    at oracle.tip.adapter.file.outbound.FileReader.executeFileRead(FileReader.java:181)
    at oracle.tip.adapter.file.outbound.FileInteraction.executeFileRead(FileInteraction.java:331)
    at oracle.tip.adapter.file.outbound.FileInteraction.execute(FileInteraction.java:395)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:529)
    ... 61 more
    Edited by: 842347 on Jul 6, 2011 3:11 AM

    I face the same issue and I have given all permissions to the folder for OS user.
    Because of this error my server is not starting up . Is there any way I can undeploy this composite to get my server running.
    I cant do this from EM because SOA server is failing to start up.
    I have tried removing it from $DOMAIN_HOME/deployed-composites but still when i try restarting the soa server the composite comes up there. Do we need to delete the entry some where else too. Kindly help.
    Thanks,
    Sri.

  • Oracle db to SAP R/3 synchronous solution ?

    Hi,
    I am looking for some comments from SDN members to come up with a solution.
    <u>Requirement:</u> Automatically update the R/3 system based on the updates in the "external" Oracle database.
    In order to accomplish this, currently we are working on the JDBC (Sender)> XI> R/3 ( RFC receiver) asynchronous scenario using poll interval to pull the data from Oracle db to R/3.
    Instead we are looking for a synchronous sort of solution where Oracle pushes the data into R/3 as soon as update happens in the Oracle tables.
    One of the possibility is to have a trigger in the database to generate the XML files using XMLGen.getxml utility.
    Thanks for your time,
    Sunil

    Hi Sunil.
    If I understand correctly, you want to push data from Oracle to XI rather than polling the database from XI and retrieving data.
    You may consider exposing your outbound interface in XI as a web service and then calling the web service from the triggers in Oracle. Thus data would be passed from the Oracle trigger to XI over SOAP.
    This link would help you on how to call web service from PL/SQL
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    These links would help you on how to expose a web service from XI.
    http://help.sap.com/saphelp_nw04/helpdata/en/31/daa0404dd52b54e10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/336365d3-0401-0010-9884-a651295aeaa9
    You can write the trigger for the appropriate action (INSERT, UPDATE, DELETE) on the database table and then call the web service.
    Hope this help ,
    Gaurav

  • Slave instance can not synchronized with the master for a long time

    Hi,
    Slave instance can not synchronized with the master for a long time, and the gap of LSNs between slave and master are more and more larger. The transfer bytes per second between master and slave is 118MB/s , upper limit to the ethernet card. Why???
    ENVIRONMENT:
    1. A network program which we called mcdb is based on BDB 4.8.30. It is used to accept get/set requests and then query data from bdb or save data to bdb.
    2. mcdb implements replication with bdb replication manager api. The default start replication policy is DB_REP_ELECTION, rep ack policy is DB_REPMGR_ACKS_ONE_PEER and rep priority is 100.
    3. The bdb data files, bdb log files, region files and rep files are all in the same home directory.
    4. There are two instances of the mcdb are separately on two standalone servers which has no other programs. These two instances are in one replication group which can elect a master automatically.
    5. The master instance is online, which has lots of requests (get, set, delete).
    ACTIONS:
    1. Start two mcdb instances on two servers and the two instance make a replication group. Slave has already synchronized with the master.
    2. Stop the slave for a long time (more than 20 hours).
    3. Start the slave instance to synchronize data with master.
    RESULT:
    1. the gap of LSNs between slave and master are more and more larger.
    2. db_stat of master and slave:
    master db_stat:
    467170     Number of PERM messages not acknowledged
    9245     Number of messages queued due to network delay
    172415     Number of messages discarded due to queue length
    25880     Number of existing connections dropped
    3407     Number of failed new connection attempts
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    DB_REPMGR site information:
    10.67.15.146 (eid: 0, port: 30011)
    Environment configured as a replication master
    331726/3574994     Next LSN to be used
    0/0     Not waiting for any missed log records
    328872/466092     Maximum permanent LSN
    0     Next page number expected
    0     Not waiting for any missed pages
    0     Number of duplicate master conditions originally detected at this site
    2147M     Current environment ID (2147483647)
    100     Current environment priority
    49     Current generation number
    50     Election generation number for the current or next election
    2323     Number of duplicate log records received
    0     Number of log records currently queued
    6768     Maximum number of log records ever queued at once
    55284     Total number of log records queued
    120M     Number of log records received and appended to the log (120475988)
    111     Number of log records missed and requested
    2147M     Current master ID (2147483647)
    2     Number of times the master has changed
    0     Number of messages received with a bad generation number
    8505306     Number of messages received and processed
    12     Number of messages ignored due to pending recovery
    471869     Number of failed message sends
    12M     Number of messages sent (12959945)
    0     Number of new site messages received
    1     Number of environments believed to be in the replication group
    990543     Transmission limited
    0     Number of outdated conditions detected
    0     Number of duplicate page records received
    0     Number of page records received and added to databases
    0     Number of page records missed and requested
    Startup complete
    6244678     Number of transactions applied
    0     Number of startsync messages delayed
    1     Number of elections held
    1     Number of elections won
    No election in progress
    0.057097     Duration of last election (seconds)
    8944103     Number of bulk buffer sends triggered by full buffer
    0     Number of single records exceeding bulk buffer size
    5273M     Number of records added to a bulk buffer (5273592170)
    10M     Number of bulk buffers sent (10490865)
    0     Number of re-request messages received
    0     Number of request messages this client failed to process
    0     Number of request messages received by this client
    slave db_stat:
    0     Number of PERM messages not acknowledged
    0     Number of messages queued due to network delay
    0     Number of messages discarded due to queue length
    1454     Number of existing connections dropped
    0     Number of failed new connection attempts
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    DB_REPMGR site information:
    10.67.15.147 (eid: 0, port: 30011)
    Environment configured as a replication client
    329544/2916048     Next LSN expected
    330433/2013808     LSN of first log record we have after missed log records
    329543/5500501     Maximum permanent LSN
    0     Next page number expected
    0     Not waiting for any missed pages
    0     Number of duplicate master conditions originally detected at this site
    2147M     Current environment ID (2147483647)
    100     Current environment priority
    49     Current generation number
    50     Election generation number for the current or next election
    5256M     Number of duplicate log records received (5256599432)
    3925284     Number of log records currently queued
    3925285     Maximum number of log records ever queued at once
    4880561     Total number of log records queued
    3578038     Number of log records received and appended to the log
    1912297     Number of log records missed and requested
    0     Current master ID
    1     Number of times the master has changed
    0     Number of messages received with a bad generation number
    12M     Number of messages received and processed (12980442)
    2     Number of messages ignored due to pending recovery
    0     Number of failed message sends
    1912307     Number of messages sent
    0     Number of new site messages received
    0     Number of environments believed to be in the replication group
    0     Transmission limited
    0     Number of outdated conditions detected
    0     Number of duplicate page records received
    0     Number of page records received and added to databases
    0     Number of page records missed and requested
    Startup incomplete
    110568     Number of transactions applied
    80     Number of startsync messages delayed
    0     Number of elections held
    0     Number of elections won
    No election in progress
    0     Number of bulk buffer sends triggered by full buffer
    0     Number of single records exceeding bulk buffer size
    0     Number of records added to a bulk buffer
    0     Number of bulk buffers sent
    0     Number of re-request messages received
    0     Number of request messages this client failed to process
    0     Number of request messages received by this client
    Edited by: 899585 on 2013-1-4 下午10:54
    Edited by: 899585 on 2013-1-4 下午10:55

    Hi,
    Unfortunately, this issue is beyond the level of what is supported over the forum. Performance related issues are extremely complex and require an in-depth understanding of your environment and dedicated support. In a generic sense, you can look at this as a basic queueing problem. You have a server that went down and work is still coming in. When the server gets started it is possible that it may never catch up depending on new work coming in and the rate at processing the old work.
    So what would you do in this case --- one thing would be to reduce the new work coming in. In HA terms this would be slowing the master down and you can increase DB_REP_ACK_TIMEOUT for this. Another thing you could do is add fresh servers to help reduce the workload. In HA terms, this would be the equivalent of restarting the client and give it a fresh look at everything. Another thing you could do is replan the system and load balance. In HA terms, it would mean something like take a hot backup of the master and reinit a client from scratch.
    If you are interested in getting a dedicated support person working on this concern, please let me know and we can move forward down that path. Just respond to the thread with your email address and I will get in contact with you so we can pursue that approach.
    thanks
    mike

  • How can I reset the value of an indicator in a while loop, from another synchronous while loop?

    I am running 2 synchronous while loops, one which is keep track of time, and the other is measuring periods. In the while loop that is measuring periods, I have a boolean indicator displaying whether the signal is on or off. My problem is that when the signal is off, the VI I use to measure the periods is waiting for the next signal, and displays the boolean value from the previous period measurement. While this VI is waiting, I want the indicator to display false and not the value from the last iteration of the loop.
    I am using LV 5.1 for MAC.

    Two things you can try:
    In preface to the first, the most common (perhaps ONLY) use of local variables should be in transferring data between parallel loops. This is a matter of discipline, and creates programs that are easier to understand, take less time and memory, and are just plain cleaner. Having said that, to transfer data between loops, use a local variable.
    Second solution: Instead of setting the value to false, just hide the indicator in question by using control references (property nodes for prev. version of LabVIEW). Control references are a great way to control items on a dialog or HMI screen.

  • Synchronous RFC Receiver inside of a Loop in BPM

    Hi there,
    we have a RFC -> XI scenario where a BPM needs to receive messages from a RFC inside of a loop, to bundle these messages, just like the first example here: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm</a>.
    But the problem is that the RFC is set as synchronous (best effort), thus we need to use a receiver in "Open S/A Bridge" mode, but this mode is not available for receivers inside a loop.
    Actually, we have managed to get the scenario working by creating another BPM which just receives the RFC messages in a S/A Bridge, sends the asynchronous message to the main BPM and sends a response back to RFC, closing the S/A bridge. But I think this solution is kind of "messy".
    Is there any other cleaner way of doing it?
    Thanks in advance,
    Henrique.

    Hi Henrique,
    Read this page carefully:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/d92e428819da2ce10000000a1550b0/frameset.htm
    "Do Not Transfer Application Logic
    Do not use integration processes to transfer application logic from the application systems to the Integration Server.
    No Replacement for Mass Interfaces
    Check whether it would not be better to execute particular processing steps, for example, collecting messages, on the sender or receiver system."
    I so recommend to rewrite the sending interface to collect the messages before sending.
    Andother idea is sending the messages with an asynchronous call.
    Regards
    Stefan

  • I've done everything I know in order to get my calendar in iCloud synchronized with my macBook, my IPad and my iPhone, but get no success. I've checked if all devices are set to the same account. Can you help me?

    I've done everything I know in order to get my calendar in iCloud synchronized with my macBook, my IPad and my iPhone, but get no success. I've checked if all devices are set to the same account. Can you help me?

    The only thing I can see strange is that when I login my iCloud account through my principal email address, when I check my preferences is marked an @me.com address that is old and I don't use it anymore, but I can't erase it or even change it.

  • Synchronizing Microsoft Excel 2010 with Sharepoint 3.0

    We would like to synchronize calendar entries from MS Excel 2010 (64-bit) to SharePoint 3.0, so that every time a change is made in Excel, it automatically syncs in SharePoint 3.0.  We have already installed
    an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed to help the synchronization of Excel to SharePoint, but it did not work.  ANY IDEAS?

    ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Synchronous Get File

    Hello,
    My requirement is to get the file from the FTP server and place it on a local server. BPEL process needs to be scheduled to run every night.
    I have created a one way bpel process with Sync Get File from the FTP adapter and write the file to the local server. While defining the Sync Get file delete files after successful retrieval is greyed out. When I execute the process, I am getting the below error.
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'SynchRead' failed due to: Error deleting file from FTP Server. Error deleting file from FTP Server. Unable to delete file from server. Please ensure whether the remote file has delete permission. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Thanks.

    oh ok, in that case you have only getfile option , but in this you can not schedule a process it will become polling process, whenever file comes to your ftp location it will read the file and move to your local server.
    once it is moved to your local server you can have another bpel process which you can shedule to read the file. You can use ora:readFile function to read data synchronously
    -Umesh

  • SAP PI 7.4 SOAP - ABAP Proxy Synchronous Webservice

    Hi Everyone,
    I am developing the following scenario:
    3rd party makes a SOAP call to SAP (via PI) to determine whether a vendor exists or not in the SAP system. The link for the call is provided by us from the Integrated Configuration.
    The request comes in, calls an ABAP Proxy to check if a vendor exists and sends a response back to the SOAP call with a 'Y' or an 'N'.
    I've read a lot about various scenarios but I'm having trouble connecting the dots as I'm fairly new to PI. I'd appreciate any help.
    I've made the following set-up based on assuming I need separate Service Interfaces for the SOAP Request & Proxy Response
    ESR
    1. Message Types
         SOAP (MT_SOAP_REQ & MT_SOAP_RESP) - PROXY (MT_PRXY_REQ & MT_PRXY_REQ)
    2.  Message Mappings
         MM_REQUEST    which maps MT_SOAP_REQ   to  MT_PRXY_REQ)
         MM_RESPONSE which maps MT_PRXY_RESP   to MT_SOAP_RESP)
    3. Service Interfaces (Synchronous)
        (SOAP Request)
        SI_IN (Inbound Interface)       with Request = MT_SOAP_REQ and Response = MT_SOAP_RESP
       (Proxy Response)
        SI_OUT (Outbound Interface) with Request = MT_PRXY_REQ and Response  = MT_PRXY_RESP 
    4. Operation Mapping
        OM_LOOKUP which maps SI_IN to SI_OUT with Request    (MT_SOAP_REQ  to MT_PRXY_REQ)
                                                                        and  Response (MT_SOAP_RESP to MT_PRXY_RESP)
    I create the ABAP Proxies for each Service Interface. SI_IN contains the required coded method to check if there is a vendor.
    I create the webservice and binding for SI_IN in SOAMANAGER
    At this point I'm somewhat unsure - what do I need to do for SI_OUT ? Do I need to create a logical port ? how is SI_OUT associated to SI_IN (apart from the Operation)  to get the response.
    ID
    In the Integration Directory I've created a SOAP_SENDER communication channel for System A and SOAP_RECEIVER channel for SAP.  For the SOAP Receiver I need to specify a URL - what should this be ? Is it meant to point to the web service for SI_IN in SICF or just to the generic http://host:8000/sap/xi/engine?type=entry 
    Do I need to use the HTTP_AAE adapter for the receiver instead of SOAP ?
    I created an Integrated Configuration for the SI_IN Service Interface with comm channel SOAP_SENDER from System A and SOAP_RECEIVER for SAP backend.  I then got the WSDL for this to provide to the 3rd Party to test (via SOAP UI)  . Again my concern is how is the SI_IN linked to the SI_OUT to achieve the response ?
    I appreciate you taking the time to go through this .  Any help is greatly appreciated.
    Thanks very much
    Gary

    I create the webservice and binding for SI_IN in SOAMANAGER
    At this point I'm somewhat unsure - what do I need to do for SI_OUT ? Do I need to create a logical port ? how is SI_OUT associated to SI_IN (apart from the Operation)  to get the response.
    >>>>No need to do anything in SOAMANAGER
    Do I need to use the HTTP_AAE adapter for the receiver instead of SOAP ?
    >>> No. Soap adapter is fine. Configure your receiver channel as explianed in the below blog (section 4.3)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70066f78-7794-2c10-2e8c-cb967cef407b?overridelayout=t…
    Again my concern is how is the SI_IN linked to the SI_OUT to achieve the response ?
    >>>>Your receiver determination and interface determination takes care of this.(receiver interface  & outbound processing tabs in ICo)

  • Which object's monitor does a synchronized method acquire?

    from the Java Tutorial for concurrency programming:
    " When a thread invokes a synchronized method, it automatically acquires the intrinsic lock _for that method's object_ and releases it when the method returns. The lock release occurs even if the return was caused by an uncaught exception. "
    what exactly does this mean?
    do synchronized methods acquire the monitors for objects of type: java.lang.reflection.Method
    please consider this code:
    public class Foo {
      private int counter = 0;
      public synchronized void incriment() { counter++; }
      public synchronized void decriment() { counter--; }
    Foo f = new Foo();
    Class[] sig = new Class[0];
    Method m = f.getClass().getMethod("incriment", sig);
    // ok. so "m" is the relevant method object.
    f.incriment(); // <-- is the monitor for "m" ,
                          // or the monitor for "f", acquired?
    .......my reading of the Concurrency Tutorial is that synchronized methods use the monitors of java.lang.reflection.Method objects?
    and thus, Foo is not thread safe, right?
    however, this simple change makes Foo thread-safe?
    public class Foo {
      private volatile int counter = 0; // "volatile"
      public void incriment() { counter++; }
      public void decriment() { counter--; }
    }thanks.
    Edited by: kogose on Feb 23, 2009 7:13 PM

    tensorfield wrote:
    jverd wrote:
    tensorfield wrote:
    kogose wrote:
    what exactly does this mean?It means you're complicating things.
    If a method is synchronized, it is. You don't need to go beyond that. The method is synchronized.Not true. You have to know what it means for a method to be synchronized. Often people come in with the erroneous impression that it somehow prevents you from using or accessing the object in any other thread.It's very simple. If a synchronized method is called at the same time from many threads only one call will be executed at a time. The calls will be lined up and performed one after the other in sequence.
    AND because synchronization is on a per object basis, when one synchronized method is being called from one thread, all synchronized methods of that same object are blocked for calling from other threads.
    Simple as that.No, it's not that simple, and as stated, that is not correct. In particular, you didn't mention that for an instance method, all the various threads have to be trying to call instance methods on the same object in order for execution to be sequential.
    You really can't understand Java's syncing without understanding how it relates to locks, and what it means for a method to be synchronized in terms of which lock it acquires.
    Edited by: jverd on Feb 25, 2009 2:47 PM

  • Mapping Issue for Synchronous interface

    Hi Experts,
    We are facing the below issue in a SOAP to RFC synchronous scenario.
    Data from WS is successfully uploaded to RFC via RFC request. However we face the below issue when the RFC response is received.
    com.sap.aii.utilxi.misc.api.BaseRuntimeException:Character reference &quot;&amp;#00&quot; is an invalid XML character.
    We receive this error particularly when one field has the below values.
    <FIELD> X 20140812201409101211 1 USD TP 00000000 </FIELD>
    When we click on view source the same field shows as below:
    <FIELD> &#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#12;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#12;X  20140812201409101211            1             USD     &#00;&#00;&#00;&#00;&#12;&#00;&#00;&#00;&#00;&#12;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#00;&#19;TP&#12;     00000000&#00;&#12;&#00;&#12;&#00;&#12;&#00;&#00;&#12;&#00;&#00;&#12;</FIELD>
    Even while pasting the same source xml from view source in Message Mapping we get the below error:
    Unable to display tree view; Error when parsing an XML document (Character reference "&#00" is an invalid XML character.)
    How is a simple value getting converted to some huge value when we open it using view source.
    Please help me resolving the same.
    Regards,
    Shai

    Hi Shaibayan
    looks like there is inconsistency in the RFC maintained in ECC to PI as non unicode.
    In RFC channel check the flag for Unicode.
    Or
    Write a java mapping to remove the special characters
    Regards
    Osman

  • Error While synchronizing with DOE

    Hello Experts!
    I have installed NW Mobile 7.1 client on PDA. I created device in DOE, after giving required sync settings, I could see synchronize my device with the DOE. The device status in DOE gets changed from Initial to Registered after Sync. However, on my PDA while I am synchronizing, it gives messages"exchanging messages with the server". This message comes until the status bar is at 50 %, after reaching this point, the status bar doesn't go ahead and after some time I get an error message "unexpected end of file from server".
    Am I missing out on any setting. I think I am able to connect to the server but the synchronization cycle is not completing.
    In the Synchronization log it is showing that last sync was successful and Device ID, Physical ID , Device Name is getting displayed.
    Can anyone help me out with this.
    I am attaching the error message in the trace file below.
    <r id="1232620884343" t="16:11:24" d="2009-01-22" s="E" c="000" u="SISLMOB1" g="en" m="Error during synchronization --&gt; java.net.SocketException: Unexpected end of file from server
          at sun.net.www.http.HttpClient.parseHTTPHeader()
          at sun.net.www.http.HttpClient.parseHTTP()
          at sun.net.www.http.HttpClient.parseHTTPHeader()
          at sun.net.www.http.HttpClient.parseHTTP()
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream()
          at java.net.HttpURLConnection.getResponseCode()
          at com.sap.tc.mobile.cfs.sync.transport.HttpSynchronizer.readHttpResponse()
          at com.sap.tc.mobile.cfs.sync.transport.HttpSynchronizer.exchangeMessagesWithServer()
          at com.sap.tc.mobile.cfs.sync.transport.HttpSynchronizer.doSynchronize()
          at com.sap.tc.mobile.cfs.sync.SyncManager.synchronize()
          at com.sap.tc.mobile.wdlite.container.SyncProgress.doSync()
          at com.sap.tc.mobile.wdlite.container.SyncProgress.access$500()
          at com.sap.tc.mobile.wdlite.container.SyncProgress$SyncThread.run()
          at java.lang.Thread.run()
    ">
    Regards
    Srikumar

    Hi,
    Here are some possible reasons...
    1. The connection seems to have been dropped by the server.
    2. A non-suuported HTTP version or format was used.
    - HTTP 1.0 does not issue Status Lines that begin with "HTTP/1.1", so
    if you expect a different version and it is not there, then this would
    be an Exception (to the rule).
    3. Packets are being dropped without retransmission from the server.
    4. Non-Implemented Method (GET, HEAD, POST, TRACE, DELETE, PUT), if you
    expect to get a POST and in reality get a TRACE, then the line will be different and could possibly cause an error (but an exception?).
    5. A timeout or connection was reset.
    Regards
    Manohar

  • Some questions on versioning and synchronizing metadata

    Hy all!
    I am quite new to warehousing and Oracle Warehouse Builder, and so i would have some questions regarding on some common issues. I would appriciate if you guys would who have experience in this domain to share some good practice knowledge :)
    I am using OWB 10.2
    So first of all i would like to know if you have some proposal of the way of versioning control and synchronizing projects between team memebers when working on a bigger project, team memebers that don't work on the same repository (cause i saw that OWB has an integrated multiuser support for handeling object locks and user sessions).
    I saw that a way of migrating data from one place to a nother is using the import/export options integrated in OWB. This creates mdl files wich are some kind of "dumps" of the metadata informations, but the thing with these mdl files wich i don't think is a good way to synchronize is that first of all the .mdx and .xml files contained in the .mdl (wich is kind of a zip) contains many informations in it (like creation date, some timestamps, etc) wich are always updated when exporting, and if synchronizing these files maybee using CVS, we always will get differences between the files alltough they would contain the same thing, only timestamps changed.
    Then a nother issue with this, is that we could have 2 alternatives: dump the whole project, wich is odd to have to synchronize a single file between users, especialy on a big project, then the orher way would be doing for each object from the project (each mapping, each table, etc) an separate .mdl filem then to synchronize each file of each object, wich will be unefficient on reimporting each file in part.
    So please if you can share the way you work on a big project with many implementers with OWB, i would really appriciate.
    A nother thing i would like to know is: is there a way to generate from an existing project (like one created with OWB) the OMB commands dump (maybee in a tcl script)? Cause i saw that the way the exeprienced users implement warehousing is using TCL with OMB language. I downloaded the example from oracle for warehouse project, and i saw that is entirely made from tcl scripts (so no mdl file involved). And this i think would be nice, to have the OMB commands generated from an existing projects.
    I see this OWB projects like a database wich can be built up from only OMB commands and OWB a graphical tool to do this (same as constructing a database only from DDL commands or using SQL developer to do this), this is why i am asking about a way of dumping the OMB commands for creating an OWB project.
    Please give me some advices, and correct me if i sad some dumb things :D but i really am new to warehousing and i would really appriciate if you guys with experience could share some informations.
    Thank you verry much!
    Alex21

    Depends. Having everyone working on the same project certainly simplifies things a lot regarding merging and is generally my preference. But I also recognize that some projects are complex enough that people wind up stepping on each other's toes if this is the case. In those cases, though, I try to minimize the issue of merging changes by having common structural objects (code libraries, tables, views, etc) retained in a single, strictly controlled, central project schema and having the developer's personal work areas reference them by synonym, thus being unable to alter them to the detriment of others.
    If they want to change a common object then need to drop their synonym and make a local copy which they can alter, and then there is a managed process by which these get merged back into the main project schema.
    This way any changes MUST go through a central schema, we can put processes in place to notify all of the team of any impending changes, and can also script updates across the team.
    Every hour a script runs automatically that checks for dropped synonyms and notifies the project leader. It especially checks for two developers who have built local copies of the same object and notifies each that they need to coordinate with each other as they are risking a conflict. When a structural change is submitted back to the central shared schema, it is added to a batch that is installed at end of business and a list of those impending changes is circulated to the team along with impact analysis for dependencies. The install script updates the main schema, then also drops the local copy of the object in the developer's schema who made the change and re-establishes the synonym there to get back to status quo for the change monitoring. Finally, it then updates itself in all of the developer areas via OMBPlus. So, each morning the developers return to an updated and synched environment as far as the underlying structure.
    This takes care of merging structural issues, and the management of the team should minimize other metadata merging by managing the worklist of who is to be working on a given mapping or process flow at a given time. Anyone found to be doing extraneous changes to a mapping or process flow when it is not in their job queue without getting pre-approval will be spoken to VERY firmly as this is counter to policy. And yes, OWB objects such as mappings are then also coordinated to the central project via import/export. OMBplus scripts also propogate these changes daily across the team as well.
    Yep, there is a whole lot of scripting involved to get set up.... but it saves a ton of time merging things and solvinv conflicts down the road.
    Cheers,
    Mike

  • How can I record data from 2 devices synchronously

    Hi,
    I've been working on this VI for some time now and I've already recieved some prior help from these forums, so I hope I can get this problem solved.
    I have a DAQpad 6020e, a hot wire thermo anemometer, and Labview 7.1.  I need to take voltage measurements from the DAQpad at a scan rate I specify (I have it set to 1000 in the screenshot), while simultaneously taking readings from the anemometer.  However, the anemometer only takes readings every 1.6 seconds, which it sends to the serial port in ASCII.
    I have tried many iterations of this vi to try to get the data to come out synchronously.  By synchronously, I just mean I want both measurements to START at the EXACT same time.  Obvisously the scan rates are drastically different so I will have far more measurements from the DAQpad, but that is ok so long as both measurements start at the same time.  I cannot control when the anemometer makes its reading, so what I have attempted to do is as follows:
    1.  VI starts, both reads initialize, then DAQpad scan begins.
    2.  If Scan Rate and "Scans to read" are equal, it takes one second for measurements to start being recorded from the DAQpad.
    3.  In an attempt to synchronize the measurements, I attempted to tell the anemometer WHILE loop (serial) to wait until the first measurement has been recorded from the DAQpad.  (**Note, I have also tried using the "number read" lead off of the AI read command).
    4.  Because I only get 1 reading from my anemometer per 1.6 seconds, I can't predict when the next reading will be.  But I want my measurements to be corrolated in time, so I have attempted to start the measurement file as soon as the case structure starts.  This way, even if the very first reading is invalid, the rest of the readings will be valid and will be taken at times that directly correlate with the DAQpad measurements.
    I have run this vi many times, with different results.  I have gotten it to run sucessfully many times, meaning that both measurement files started recording data at the exact same instant, even if the anemometer reading wasn't available yet (I know this because the second measurement was taken at a time earlier than 1.6 seconds, meaning that the file did not wait for a measurement to be obtained in order to assign a value at 0 time).  HOWEVER, other times, this vi does not run correctly.  Sometimes the anemometer readings begin before the DAQpad readings, sometimes after.  In every case where the vi does not work, it appears that the anemometer measurement has waited for its first measurement to be recorded at time 0 instead of starting the measurement file when the DAQpad starts.
    I need to know why this vi doesn't run consistently.  I can see it do what I want it to do over and over again, but I can't use this vi if it is not 100% consistent.
    Thank you,
    Jake
    Attachments:
    LabVIEW Synchronization Attempt.pdf ‏78 KB

    For future reference, just post the actual VI.  It is easier to troubleshoot than a print as a PDF.
    Given the software complexities of separate threads and serial bus versus PCI bus, I don't see how you can say that the measurements actually start at the same time.  The only way you can say that the measurements started together was if you were using a hardware trigger.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • How can I get the camera type of a photo?

    I want to select photos according to camera type using AplleScript. How can I get this information? (I used 'properties' but did not succed in selecting one out of the 24 items.) Hans

  • Bold in CSS doesn't display in IE7

    I have created content using external CSS, the Bold in the head1 displays properly within Dreamweaver and in Firefox, but not in IE7. All other styles; font size, color display properly. Any suggestions?

  • Time Machine deleting files on drive

    I have an external drive which had all of my photos stored on it. I then decided I would use this drive also for Time Machine. I have just gone to find my photo files and all that is on there is "bakups", I am so so hoping that I have not lost all my

  • No DataTimeDigitized value in movies as is in photos?

    In a photo there is a metadata value that shows the date the photo was shot, that is different from when the file was created, so you don't have to worry if you copy or change the file later and the date of the it changes, since the date of the shot

  • How to append datas to a text file?

    Hi, I want to append the data to a already created text file.When i used Write to text file.vi. It overwrites the previous data. Solved! Go to Solution.