Non-trasactional write problem

Hi all,
I use query to retreive some objects and then i change the values of these
objects not within a transaction. Later i use query retreive these objects
again, but i found the values is changed? How can i retrevie back the
original values?
Thank you very much

Try pm.refresh () or pm.evict (). Or begin a transaction as the objects
will be restored back to their original values.
On Thu, 14 Aug 2003 11:35:50 +0800, Tim wrote:
Hi all,
I use query to retreive some objects and then i change the values of these
objects not within a transaction. Later i use query retreive these objects
again, but i found the values is changed? How can i retrevie back the
original values?
Thank you very much--
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com

Similar Messages

  • Non-blocking write problem

    Hi all,
    I have an HLS IP that is interracting with memory interface and other IPs. I want to always consume a fifo input to avoid potential deadlock, so here is what my design looks like:
    void top(stream<data_t>& in, stream<data_t>& out, ......) {
    #pragma HLS DATAFLOW
            static stream<data_t> fifo;
            moveTo(in, fifo);
            main_function(fifo, .......);
    main_function is the main processing unit, which interracts with other IPs and memory interface. The input fifo "in" cannot be blocked, so I just have to consume it whenever possible. My solution is to have an internal fifo and use function "moveTo" to consume it. Here is what my moveTo function looks like:
    void moveTo(stream<data_t>& in, stream<data_t>& out) {
    #pragma HLS PIPELINE II=1
             if (!in.empty()) {
                      data_t temp = in.read();
                      out.write_nb(tmp);
    However, in hardware, I can see that the input fifo "in" is valid but not ready, which means the consumer funciton is blocked. I also tried to manually detect full signal like
          if(!out.full())
                 out.write(tmp);
    , but it doesn't make any difference. Is there any recommended way to do what I am trying to achieve? I used a similar syntax when writing to an external fifo and it was working fine in hardware, so I am not sure why it is not working with internal one. Note that all the interfaces are eventually implemneted with "#pragma HLS resource core=AXI4Stream variable=" pragma to be synthesized as axi_stream interface. 
    Thanks,
    Jimmy

    So I am able to figure out that when the "main_function" is blocked by a write to an external fifo, the start signal of "moveTo" will be disabled too despite the fact that the internal fifo is not full yet. Shouldn't DATAFLOW make each function independent from each other?

  • Why non-blocking write would block usually?

    I want to know that why my non-blocking socket's write will consume such a long time. sometimes 400ms worst.
    and this is my strace result:
    19:17:48.886276 write(1306, "\n\365\31:h#\t\7\237\20\3\21\337\36\276\317\6\3023\6\204\223,-\306\30\322\"\f\1\30\0\n"..., 121) = 121 <0.403088>
    It use 0.403088 seconds to finish the write, And I am sure of that the fd 1306 is a non-blocking socket.
    Another records shows:
    19:15:27.949736 write(995, "\n\365'\236UN\24\10\26Y\16\30\373\26\306\240\36\267z\10\20\342\f\17\301&\253\240\2\325\\\314\354"..., 160) = 160 <0.368412>
    19:15:28.410003 write(1466, "\n\365't\360`\20\10\20\342&\253\240\36\267z\10\26Y\26\306\240\16\30\373\2\325\\\f\17\301\314\354"..., 194) = 194 <0.199244>
    19:15:28.627854 write(1821, "\n\365'\260*s*\f\17\301\16\30\373\10\26Y\10\20\342\26\306\240\2\325\\&\253\240\36\267z\314\354"..., 160) = 160 <0.397758>
    19:15:29.029411 write(755, "\n\365'f\356\1\1&\253\240\36\267z\10\26Y\26\306\240\16\30\373\f\17\301\2\325\\\10\20\342\314\354"..., 160) = 160 <0.399817>
    19:15:29.440261 write(614, "\n\365'b\345H\6\36\267z&\253\240\10\26Y\2\325\\\26\306\240\10\20\342\f\17\301\16\30\373\314\354"..., 305) = 305 <0.396985>
    19:15:29.846446 write(892, "\n\365'\354\2256t\16\30\373\f\17\301\2\325\\\10\20\342\10\26Y&\253\240\26\306\240\36\267z\314\354"..., 160) = 160 <0.399170>
    19:15:30.250257 write(515, "\n\365'\376\343\214i\10\20\342\26\306\240\f\17\301&\253\240\10\26Y\2\325\\\36\267z\16\30\373\314\354"..., 231) = 231 <0.398990>
    19:15:30.652666 write(262, "\n\365'\274so\6&\253\240\10\26Y\2\325\\\26\306\240\36\267z\16\30\373\f\17\301\10\20\342\314\354"..., 168) = 168 <0.396569>
    19:17:46.885289 write(908, "t\213\16\222\0\0\0\0\240@\33L\0\0\3219\0\0\333J\0\0\2218\0\0\2\0|\203\16\222\0"..., 189) = 189 <0.396330>
    19:17:47.351419 write(1529, "\n\365\31\352\2\10\252\36\276\317\30\322\"\6\204\223\6\3023\f\1\30\7\237\20\3\21\337,-\306\0\n"..., 128) = 128 <0.293829>
    19:17:47.651080 write(683, "\n\365\31~ZG=\30\322\"\6\204\223\7\237\20\36\276\317\6\3023\3\21\337,-\306\f\1\30\0\n"..., 121) = 121 <0.398178>
    19:17:48.062419 write(175, "\n\365\31\224H\260\313\f\1\30\6\3023\3\21\337\36\276\317\6\204\223\7\237\20,-\306\30\322\"\0\n"..., 121) = 121 <0.398811>
    19:17:48.467481 write(569, "\n\365\31v5]H\3\21\337\30\322\"\f\1\30\6\3023\6\204\223\7\237\20,-\306\36\276\317\0\n"..., 121) = 121 <0.192335>
    19:17:48.663023 write(173, "\n\365\31\376\nJ\0\36\276\317,-\306\7\237\20\30\322\"\3\21\337\6\204\223\6\3023\f\1\30\0\n"..., 121) = 121 <0.206703>
    19:17:48.886276 write(1306, "\n\365\31:h#\t\7\237\20\3\21\337\36\276\317\6\3023\6\204\223,-\306\30\322\"\f\1\30\0\n"..., 121) = 121 <0.403088>
    BTW, This application is for the service of 3-4K client.
    And I do want to ask that:
    1.Why non-blocking write will make our process lose the CPU ( I think it is blocked ).
    2.What our process waiting for? Why not just return EAGAIN?
    3.Can we avoid this problem?
    Our server's info:
    Linux hz172-96 2.6.32-bpo.5-amd64 #1 SMP Mon May 2 11:40:03 UTC 2011 x86_64 GNU/Linux
    Looking forward to your answer, Thank you!

    thank you for your answer.
    and i have resolve this ploblem in using the linux kernel 2.6.30, using  kernel  2.6.32 before.
    but, i don't kown Is there some bug in linux kernel 2.6.32 or for other reason.

  • Help needed to install Flash Player : 'Non-Current Release' problem!

    I been encountering problems while trying to install Flash Player on my laptop running Windows 7.
    Originally Flash Player does not work as I understand it is not supported on 64-bit Internet Explorer.
    After installing 32-bit IE, the following issue of 'non-latest version' arises and all installation were aborted by the application :
    The below were steps I had taken to no success.
    1.  Via the 32-bit browser, downloaded flash player un-install program and did the uninstallation with success.
    2.  Rebooted the laptop.
    3.  Via the 32-bit browser, downloaded the flash player version 10.0.45.2 from http://get.adobe.com/flashplayer.
    4.  After downloading it automatically did the installation with 100% completion.
    5. The program proceeded to activate the flash player with a webpage saying if the flash player is working properly, I should see a video and Flash Player's logo.
    6.  Before anything was displayed, an error message popped up to say I was trying to install a non-current version and that I should go to same webpage to download the latest version. The activation was then aborted.
    Tried many times but always encountered same problem and hence cannot proceed to use the flash player.
    Need assistance to diagnose the problem and to get Flash Player working on my laptop. Appreciate any help to get it working.
    Regards.

    Thanks to efforts of eidnolb and Bob, the installation of flash player into my laptop is now working .
    Bob's installer enabled the download successfully.
    Eidnolb's link in post 6 trigggered me that I may have previously installed the pre-release version 10.1, thereby leading to the 'non-current-version' problem too. Post in that link adviced to uninstall 10.1 using the pre-release uninstaller.
    I suggest others who had encountered this non-current release to uninstall first using that specific uninstaller, before attempting to install the most current release. I may have installed the 10.1 pre-release in desperation after failing numerous times trying to figure out why flash player does not install in browser not knowing its currently-non-support of 64-bit browser.
    Once again thanks for support, eidnolb and Bob.
    Cheers.
    Kelvin

  • Salve ho appena ricevuto indietro dall'assistenza l'iphone 4s però mi è stato segnalato che non presentava nessun problema tra quelli segnalati da me. Ho ricevuto anche un foglio con scritte le soluzioni che si avvicinavano di piu al mio caso, però vorrei

    Salve ho appena ricevuto indietro dall'assistenza l'iphone 4s però mi è stato segnalato che non presentava nessun problema tra quelli segnalati da me.
    Ho ricevuto anche un foglio con scritte le soluzioni che si avvicinavano di piu al mio caso, però vorrei sapere se è stato esaminato il problema giusto o un altro perche da quello scritto nel foglio non è stato esaminato il caso giusto anche perche il problema che ho segnalato non è stato risolto grazie mille ,
    cordiali saluti.

  • HT204268 I have zero idea what this message is telling me.  I signed in but I was not given any on-screen instructions. Please have a non-nerd write this again.

    I have zero idea what this message is telling me.  I signed in but I was not given any on-screen instructions. Please have a non-nerd write this again.

    What type of account have you signed in with ? The instructions only apply to AOL username accounts, if you've signed in to an account that's an AOL email address then you don't need to do anything with it, it's only usernames (e.g. account id's without the '@aol.com' part) that are affected.
    If it is a username account then when you sign in via the Store > View Account menu option on your computer's iTunes you should be prompted to change it an email address (you can't use an email address that is already the primary email address on an iTunes account)

  • If I use Explorer, none of these problems exist. This suddenly happened overnight! I have your newest upgrade and I haven't had any problems for the past year or so....this is weird.

    1. only in firefox - flashplayer won't upgrade, endless loop of "add plug-ins" etc.
    2. vertical scroll bar flipped from left side to right.
    3. crtl ++ to zoom doesn't function.
    4. can't load any "personas" when in Google gmail.
    If I use Explorer, none of these problems exist. This suddenly happened overnight! I have your newest upgrade and I haven't had any problems for the past year or so....this is weird.
    == This happened ==
    Every time Firefox opened
    == Monday 6/14

    Your above posted list of installed plugins doesn't show the Flash plugin for Firefox.
    See [[Managing the Flash plugin]] and [[Installing the Flash plugin]]

  • New Mac with major permission and disk-write problems

    Right, so I'm pretty new to Mac, after getting my first Mac computer (a 17-inch MacBook Pro) at the end of January this year. It's been great so far and I love the thing, but I've suddenly encountered some crazy problems which I'm pulling my hair out over because I have tried everything to fix them, and have had no luck.
    I'll try to include as many details as possible, and I'm prepared to bear with anyone who asks me about something I've alrady tried, just so I can get this sorted.
    Okay, so first of all, the main problem seems to be with permissions, mostly with disk-write permissions. Any apps that I want to install that required keychain access will no longer install. I enter my keychain password, hit Return, and the dialog box closes without continuing. So I hit "Install" again and it becomes a never-ending cycle of entering my password to no avail. Now, this happens with ANY application that requires keychain access to install. It is not limited to any particular application. I know my password is right because the box closes, and if I enter it wrong, the dialog box shakes because it is incorrect.
    Furthermore, it seems keychain access is problematic in other apps. If I want to authenticate something, it will do the same thing as I mentioned before, meaning I get nowhere with the application.
    From here, it gets worse. If I download something (anything), then restart my computer, it is still there. As it should be. However, if I delete an APPLICATION (not just any file) OR change preferences for some programs (one in particular that I specifically don't want starting up on.... startup), including through System Preferences>Users & Groups>Login Items, they will not save. This is driving me insane. For instance, I downloaded some free apps from the Mac App Store to try out, but decided I didn't want them. I tried to deleted them from the app folder and succeeded. Emptied trash. Gone. Restart, and.... they're back? So I tried to uninstall them via the Mac App Store, once I found you could do that. Again, it didn't work. Any Login Items preference changes don't stay after a restart.
    Originally, none of this was a problem and everything was working fine. The first sign that something was wrong would be Apple Mail often asking for passwords, usually for my Hotmail accounts, saying that they were rejected by the server (but are correct passwords, I get the emails from the accounts, and the passwords are always accepted once I type them in, only to be asked for them some time later on for no apparent reason). At the time, I tried to repair the keychain, tried deleting and recreating the mail account entries and what not, but nothing helped. It still happens, but at the time, it was more of a niggly thing than an outright problem.
    I should also mention that I did use BootCamp to install Windows 8 on a small partition, but after I couldn't boot back into Mac (I didn't realise you had to use the Option key whilst booting), I found out that you had to hold the Option key to get back into Mac, then used BootCamp to get rid of Windows. Everything was fine so far. Until I decided to reinstall Windows 8 with BootCamp. This is where things started going wrong. I decided to install a bootloader to make it easier for me to boot between the two systems. I was tossing up between rEFIt and Chameleon, and decided that rEFIt would be the best for my needs. So I downloaded and installed it, which seemed to go fine. Until I restarted. Mac would endlessly load (the spinning grey dots with the Apple logo).
    Now, I actually managed to fix this, but I should probably go into more detail. First of all, holding the option key and selecting my Mac partition would allow me back into Mac, and same with Windows 8. At this point, I decided to uninstall Windows 8 to try fix my problems, except now BootCamp was giving me errors. I believe it was something about being unable to unmount the disc, but it may have been a different error. I don't entirely remember. So then I decided to try getting rid of rEFIt. I followed the instructions on the official site but it didn't work. So then I tried deleting the files with root (sudo) access through terminal. Which also failed....
    So to the Recovery partition. Booting into Disk Utilities, I repaired permissions, which worked fine, and repaired the disk. I believe I had run the disk repair a few times before to try to fix BootCamp when it stopped working. Anywaym it had worked before, but this time, it said that it was corrupted and could not be repaired. Something about needing to reinstall Mac OS X. With all my files on this computer and currently nothing to back it up with (eventually I will have something to do backups with, but it'll have to wait a few months), I'm not going to do that.
    Finally, I managed to delete the rEFIt files through Terminal within the Recovery partition. I ran permission repair and disk repair again to clean anything up. Disk repair gave me the same error, but now I could get back into Mac without holding the option key on every **** boot.
    Now more problems had presented themselves. I decided that the lock under Login Items was probably preventing me form successfully changing my startup items. Trying to unlock it did the same thing as I previously mentioned. Type in my password, keychain accepts it, then nothing happens. The keychain settings were already defaulted so that keychain would stay unlocked after authenticated, and all stuff like that. Using "Get Info" on anything has permissions locked and again, I cannot unlock to change them, although looking at a PDF file just now, whilst still locked, it would allow me to add or remove users, so maybe that's not completely accurate. I believe I tended to look at the system folders though, and my name wasn't under ownership, although I don't believe it was meant to be, but I was hoping that maybe that would fix the problem. I guess not.
    At this time, I still had my Windows 8 partition sitting around and couldn't get rid of it. I heard of the manual way to do it through Disk Utility. I tried this in Mac OS X, and through the Recovery partition, but neither worked. An error about being unable to unmount the drive. I finally found a way to remove it. Honestly, I don't completely remember how I did it, but I believe it was through a command line, uh.... command. Now I had free space that I couldn't use to expand my Macintosh HD partition back to full size, again with the unable to unmount error. Finally, I fixed this by booting from a Mac OS X installation disc that I happened to have, and using Disk Utility off of that. After that, Disk Utility no longer gave me errors for disk repair.
    However, my other problems all still remained. I had written a little list of things I found on the internet for fixing my problems. One solution was to use "resetpassword" through terminal under the Recovery partition, then select Macintosh HD and select "Reset Home Directory Permissions and ACLs". That didn't work until I tried it through the Disk Utility on the Mac OS X installation disc. That worked, and once I was back into Mac, Spotlight started indexing again. However, nothing else had happened.
    I should also mention that keychain access isn't completely non-existent for me. Setting up a new WiFi connection worked for me (that is, connecting to a new network), but now every time I connect to the network, I have to authenticate it. However, it does accept my keychain password and eventually connect.
    Now, another thing on my list to try was single-user mode, and using "/sbin/fsck -fy" until everything was okay. Well, the first time, it found a bunch of errors, then fixed itself up. Then it was all okay. But nothing had changed. So trying again, I this time used ?/sbin/mount -uw /" which I believe is meant to allow writing access to the drive. Now when running "/sbin/fsck -fy", I had an error. Specifically, "Journal need to be replayed but volume is read-only".
    So that's pretty much where I am up to at the moment. It seems to be a poblem with write permissions, possibly among other things. If it was Windows, I might be able to work it out easier, but being new to Mac, I'm still finding my way around. I guess this is a good learning experience, but it's not fun to have to deal with it so early on.
    If anyone can help me, I'd greatly appreciate it. I have tried many things, so if you suggest something that I have tried and possibly forgot to mention, I'll let you know, but any help is still helpful, even if only eliminating possible problems/causes/solutions.

    Actually you first post is so long that most people just glance at it and move on. To say the least you are very verbose.
    Your problem stems from something going wrong with permissions, as you know. How and why that happen is usually a user error of some type.
    You can try to repair permissions and see if that corrects it. If not I will leave other options to someone that may know more about the permission system on a Mac.

  • Importing Non-SAP WebService - Problem: Data Transfer

    Hi all,
    I need to integrate a non-sap Web Service into Dynpro.
    I generated a client-proxy and a logical port.
    The Web Service needs one object (the structure from the object was generated correctly)
    In the next step I was programming the following code.
    *        Reference variables for proxy and exception class
             DATA:
             lo_clientproxy TYPE REF TO zrhco_testrules_services,
             lo_sys_fault TYPE REF TO cx_ai_system_fault,
             lo_app_fault TYPE REF TO cx_ai_application_fault,
    *        Structures to set and get message content
             ls_request TYPE zrhexecute_rules,
             ls_person TYPE zrhperson,
             ls_response TYPE zrhexecute_rules_response.
      ls_person-geschlecht = 'weiblich'.
      ls_person-age = 18.
      ls_person-name = 'Petra'.
      ls_person-icon1 = 0.
      ls_person-icon2 = 0.
      ls_request-person = ls_person.
      TRY.
    *    create proxy client
          CREATE OBJECT lo_clientproxy.
       CATCH cx_ai_system_fault.
      ENDTRY.
      TRY.
          CALL METHOD lo_clientproxy->execute_rules
            EXPORTING
              input = ls_request.
        CATCH cx_ai_system_fault INTO lo_sys_fault.
          WRITE: / 'Code:', lo_sys_fault->code.
          WRITE: / 'Text:', lo_sys_fault->errortext.
        CATCH cx_ai_application_fault INTO lo_app_fault.
      ENDTRY.
    The input is correctly filled with the required data but every time i executed the program an error occurred.
    SoapFaultCode:5
    I think that the real problem could be parsing abap into xml.
    SERIALIZE_APPLICATION_DATA
    I tested the Web Service in Web Services Navigator without any errors.
    The object is written in Java and the class implement Serializable, but i think the failure is on the abap site.
    Does anyone has a solution for my issue?
    Thanks a lot in advance!
    Regards,
    Robert

    Hello Leo,
    There are a number of options to do this. You can use the standard SAP tool named LSMW - Legacy System Migration Workbench (transaction LSMW) as a starting point.
    Also please read this [Documentation|http://help.sap.com/saphelp_47x200/helpdata/en/0d/414538bc0fe927e10000009b38f8cf/frameset.htm] before undertaking the data migration activity via LSMW.
    Additionally, there is also a Direct Input program available named RMDATIND - please go through the program documentation before you use it. You can use this program to transfer material master data to SAP but
    make sure you assign this program through LSMW for mapping structures etc. The internet link above will give
    more details and step-by-step instructions to follow.
    Hope this helps,
    Cheers,
    Sougata.
    p.s. It is sad to see useful answers remain unrewarded such as this one!
    Edited by: Sougata Chatterjee on May 9, 2008 10:13 PM

  • Non deductible tax problem

    Hello,   Created one condition type: ZVSB (VAT non-deductible) Condition class: D, Calculation type: A, Cond. category: N, Access sequence: MWST, item condition.    In Tax calculation procedure: (T/code OBQ3) - TAXINN   ZVSB condition type calculation - Basic price + service tax, account key: NVV (tax type:2, non-deductible, posting indi: 3)    In MM pricing procedure: (T/code M/08)   There are 2 condition type:  NAVS: Non-deductible tax JEXS: Taxes on the PO  Tax code created: ZX (Vat 5% non-deductible & 12.36% service tax)    Problem: At the time of creation of PO with tax code ZX.......the VAT value also fetch in condition NAVS & total tax value fetch in JEXS condition, which increased the PO value (Double VAT value)   For e.g. Basic price: 100 Service tax: 12.36 VAT: 5.62 Actual Po value should be: 117.98  but in my case: PO value is coming  Basic price: 100 NAVS: 5.62 Jexs: 17.98 PO value: 123.60   I want that vat value should come in non-deductible condition i.e. NAVS & service tax in JEXS. Kindly help.

    Hi,
      As of my knowledge, there is no standard condition type through which you can bring the deductible tax alone from tax procedure to MM pricing procedure. You may write a routine with the help of abapers to acheive this special reuirement. Or you may deduct the value of non deductible tax (NAVS condition) from total taxes on the PO (JEXS condition) in MM pricing. You can achieve this by adding a new condition type with 100% value of NAVS and add it to JEXS so that it will giv the deductible taxes alone.
    Hope its helpful.
    Regards,
    AKPT

  • Nio write problem: server data sent isn't fully read by client

    Hi everyone,
    still writing away with my nio server and once again have run into
    some problems. Essentially my main problem is that when the server
    writes to the client, the write appears to output all the bytes in the
    write operation, but the client never accepts them all, even if a
    buffer has been manually allocated to the correct size of the data.
    As background my server will accept connections. When a connection
    is established I register OP_READ on the key. When a OP_READ trigger
    occurs the server accepts the clients request, processes it, then
    attaches the output to the SelectionKey as a ByteBuffer that has
    already been encoded. At this point I then register OP_WRITE on that
    SelectionKey (as a side note i'm running this server on XP and had
    read that registering OP_READ and OP_WRITE on the same selector was
    bad, but then it looked like there was a work around to this) and wait
    for an OP_WRITE trigger.
    When an OP_WRITE occurs on that key I run a new method (with heavy
    influences from the thread: http://forum.java.sun.com/thread.jsp?forum=11&thread=530825 and the taming the nio circus thread) which will grab the attachment and attempt to send it. The code has been written that IF the send cannot complete it should re-attach the remaining bytebuffer to the key and wait for another OP_WRITE to occur so it can send the remainder.
    The problem is that whenever I write (and for this test the amount im writing is approx 10100 bytes) the server appears to send it all (by checking the int returned from socketchannel.write()), but at the client end it never reads all the data that is sent.
    If i'm using a blocking socket client, then I get a java.net.SocketException: Connection Reset exception, whilst if i'm using a non-blocking client, I get no exception, just not the whole amount of data, even when i've statically allocated a receiving bytebuffer that is big enough.
    The following code is a class that is used to do the writing from the server:
       /* code for nio write model referenced from:
         * http://forum.java.sun.com/thread.jsp?forum=11&thread=530825
        class NIOWriteHandler {
            private ByteBuffer sendBuffer;
            private SelectionKey localSelectionKey;
            NIOWriteHandler(SelectionKey currentKey) {
                localSelectionKey = currentKey;
            public void doWrite() {
                localSelectionKey.interestOps(SelectionKey.OP_READ);  //deselect write,
                sendBuffer = (ByteBuffer)localSelectionKey.attachment();
                // perform the writing
                SocketChannel writingChannel = (SocketChannel)localSelectionKey.channel();
                if (writingChannel.isOpen()) {
                    int len = 0;
                    if (sendBuffer.hasRemaining()) {
                        try {
                            System.out.println("Sending chunks o data");
                            len = writingChannel.write(sendBuffer);
                            System.out.println("value of len: " + len);
                        } catch (IOException ioe) {
                            ioe.printStackTrace();
                            // call close method
                            System.out.println("CLOSE INVOKED at POINT 8");
                            closeComplete(localSelectionKey);
                    System.out.println("Second IF coming...");
                    if (sendBuffer.hasRemaining()) {
                        // if we get here then the previous write did not fully
                        // complete, so need to save data etc
                        System.out.println("Couldn't send all data this time...");
                        localSelectionKey.interestOps(SelectionKey.OP_WRITE|SelectionKey.OP_READ);
                        localSelectionKey.attach(sendBuffer);
                    } else {
                        sendBuffer = null;
                        closeComplete(localSelectionKey);
                // write complete at this stage
        }This is the basic block client that is incredibly dumb:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    import java.nio.charset.*;
    import java.nio.channels.*;
    import java.nio.*;
    import java.nio.ByteBuffer;
    public class ServerTest {
        /* args 0 - the IP of the machine to connect to
           args 1 - the port number
           Simple client that connects to a specified IP & port, takes a line
           of input via stdin, sends that to the connected machine and prints
           out the response.
           Error handling and such isn't accounted for.
       public static void main (String args[]) throws Exception{
            Socket socket = new Socket(args[0], Integer.parseInt(args[1]));
            BufferedReader buffRead = new
                BufferedReader(new InputStreamReader((socket.getInputStream())));
            PrintStream ps =
                new PrintStream(socket.getOutputStream());
            Charset charset = Charset.forName("ISO-8859-1");
            BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
            System.out.println("[CLIENT]Data to send: ");
            String data = stdin.readLine();
            ps.println(data);
            String returned = buffRead.readLine();
            while (returned != null) {
                System.out.println(returned);
                returned = buffRead.readLine();
            System.out.println("[CLIENT]End server response");
            buffRead.close();
            ps.close();
            socket.close();
    }And here is the non-blocking basic client (which dosn't actually close at the moment):
    import java.net.*;
    import java.util.*;
    import java.io.*;
    import java.nio.charset.*;
    import java.nio.channels.*;
    import java.nio.*;
    public class ServerTestNonBlock {
        /* args 0 - the IP of the machine to connect to
           args 1 - the port number
           Simple client that connects to a specified IP & port, takes a line
           of input via stdin, sends that to the connected machine and prints
           out the response.
           Error handling and such isn't accounted for.
       public static void main (String args[]) throws Exception{
            InetSocketAddress addr = new InetSocketAddress
                (args[0], Integer.parseInt(args[1]));
            SocketChannel sc = SocketChannel.open();
            sc.configureBlocking(false);
            Selector selector = Selector.open();
            System.out.println("Starting connection...");
            sc.connect(addr);
            while(!sc.finishConnect()) {
               System.out.println("1,2,3,4 I will keep on counting...");
            System.out.println("Connection established..");       
            Charset charset = Charset.forName("ISO-8859-1");
            CharsetEncoder encoder = charset.newEncoder();
            sc.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);
            while (true) {
               int n = selector.select();
               if (n==0) {
                  continue;
               Set keys = selector.selectedKeys();
               Iterator it = keys.iterator();
               while (it.hasNext()) {
                  SelectionKey selKey = (SelectionKey)it.next();
                  if (selKey.isReadable()) {
                     // time to setup read
                     ByteBuffer incomingData =
                        ByteBuffer.allocateDirect(102000);
                     incomingData.clear();
                     int count;
                     while ((count = sc.read(incomingData)) > 0) {
                        System.out.println("Value of count: " + count);
                        // reading the data
                     System.out.println("Count value: " + count);       
                     int pos = incomingData.position();
                     incomingData.flip();
                     CharBuffer content = charset.decode(incomingData);
                     String inData = content.toString();
                     System.out.println(inData.trim());
                     System.out.println("[CLIENT]End server response");
                     System.out.println("Count value: " + count);       
                     System.out.println("Position value: " + pos);       
                     //sc.close();
                     //break;
                  if (selKey.isWritable()) {
                     BufferedReader stdin = new BufferedReader
                       (new InputStreamReader(System.in));
                     System.out.println("[CLIENT]Data to send: ");
                     String data = stdin.readLine();
                     ByteBuffer byteBufferOut = encoder.encode
                        (CharBuffer.wrap(data));
                     int length = sc.write(byteBufferOut);
                     System.out.println("Wrote: " + length + " bytes.");
                     selKey.interestOps(SelectionKey.OP_READ);
    }I'm kinda stuck at the moment and am making change for the sake of change without getting a good grasp of what is going on. If anyone can provide any help that'd be fantastic. If in the mean time I figgure something out i'll post a response.
    If you've gotten this far thanks a bunch for reading :)
    Cheers,
    Pete

    Hi Meesum,
    thanks for the reply :)
    I'm not convinced this is the error - as i've got two clients listed there, and the odd behaviour from both is that neither is getting through to the last of the data that is sent.
    If the null were the problem (which is only checked for in the basic dumb blocking client) i'd be expecting some sort of infinite loop or wait for more data from the server, not an abnormal termination (ala connection reset) from the server. I'll give it a shot anyhow, but I know that under a blocking write operation that that code worked fine.
    Thanks again though for the post, has got some of my cogs slowly turning :)
    Cheers,
    Pete

  • Resolution to non-playing DVD problem?

    It's been a while since I last dropped in here. Fortunately, I haven't had any problems! I was wondering if anyone ever figured out why so many people were having problems with DVD's that would play in their computers but not on DVD players. I may have an idea. I created a DVD project in iDVD 4.0 as a starting template. When I start a new project, I make a copy of the template and then proceed to modify it. Could this be the problem? In other words, could I get around the problem by deleting the template and creating a new template in iDVD 4.0.1 or iDVD 5? I was never able to get a playable DVD with either of these versions. Is there any chance this might work? It would be a bit of a pain to try it since I would have to upgrade the software and then reinstall the old version if there's a problem. But I will give it a try if anyone thinks it might work.
    G5 + Powerbook G4   Mac OS X (10.3.8)  

    Your original message said " I was wondering if anyone ever figured out why so many people were having problems with DVD's that would play in their computers but not on DVD players."
    My reply was to that 'observation'.
    I've been burning DVDs with the all the iDVD versions almost from the start of DVD burning on the Mac and have been a participant in these forums for all of that period. The necessary second generation 'Superdrives' could write at a maximum of 2x. There were some problems with DVD player compatability (discs would play in a computer drive but not in a stand-alone DVD player) at that time that were resolved by changing the brand of media (not all brands of media have the same rate of burn-errors).
    As DVD burners have increased in burn speed (4x, 8x and now 16x) we have seen a major increase in compatability problems on the forum which no longer can always be resolved by changing media brand. Higher speed burns create more burn-errors. Computer drives have the necessary error correction techniques to correct for these errors on playback. Consumer DVD players don't include the necessary error correction techniques to correct for these errors on playback because the stamped discs they are designed to play don't have these errors.
    I have observed the problem on several different computers with several
    different drives. I never have problems with iDVD 4.0. I am never able to get
    a playable disc using 4.0.1 or greater. It also has nothing whatsoever to do
    with the media.
    If the DVD discs you produce can't be played in computer drives as well as consumer DVD players, yes, you have a different problem. However, that was not addressed in your original statement " I was wondering if anyone ever figured out why so many people were having problems with DVD's that would play in their computers but not on DVD players".

  • PHP in Solaris 10 and Non-Global Zones: Problem of performance?

    Hi friends
    We are feeling a poor performance with applications developed with PHP in Solaris 10, with non-global and global zones, while Intel platform (Xeon and Pentium), performance is very good. Difference between both platforms is about 200% aprox, one second in Intel to 9, 12 or 20 seconds in Solaris depending of model.
    Our tests were developed in:
    1. SF T2000 server Solaris 10 global zone
    2. SF T2000 server Solaris 10 non-global zone
    3. SF280R server Solaris 10 non-global zone
    4. V240 server with 1 GB memory, 1*US III-i 1.0 GHz and Solaris 9 (really this version for test and comparisons)
    5. V240 server with 8GB memory, 2*US III-i 1.5Ghz and Solaris 9 (really this version for test and comparisons too)
    Intel platforms were:
    1. Intel Pentium 4 2GHz 2GB memory, Linux Fedora and PHP 4.4.4
    2. Intel Xeon 2 core, 2.33GHz 2GB memory, Linux Fedora and PHP 4.4.3
    Versions of products are:
    1. Solaris 9 or Solaris 10
    2. PHP 4.4.7 downloaded from http://www.php.net/downloads.php
    3. Apache 2.0.59
    4. MySQL 4.1.15-log
    Our php compilation and installation were:
    ./configure --prefix=/usr/local/php-4.4.7 \
    --with-pear \
    --with-openssl=/usr/local/ssl \
    --with-gettext \
    --with-ldap=/usr/local \
    --with-iconv \
    --enable-ftp \
    --with-dom \
    --with-mime-magic \
    --enable-mbstring \
    --with-zlib \
    --enable-track-vars \
    --enable-sigchild \
    --disable-ctype \
    --disable-overload \
    --disable-tokenizer \
    --disable-posix \
    --with-gd \
    --with-apxs2=/usr/local/apache2.0.53/bin/apxs \
    --with-mysql  \
    --with-pgsql \
    --with-oci8=/oracle/product/9.2.0 \
    --with-oracle=/oracle/product/9.2.0  \
    --with-png-dir=/usr/local \
    --with-zlib-dir=/usr/local \
    --with-freetype-dir=/usr/local \
    --with-jpeg-dir=/usr/local
    make
    make install
    Questions:
    Is there any problem of PHP with SunFire T2000 servers or 64-bits platforms?
    Is there any flag of PHP would be use to compilarion PHP in 64-bits or multithread?
    I wait for any comments or suggestions about our problem with PHP compilation and performance in Solaris 10. Thanks a lot.
    Sergio.

    I presume you compiled php on the Sun server, was this done using gcc or the Sun One C compiler.
    If the latter then you can also use the flag: --enable-nonportable-atomics when you run configure                                                                                                                                                                                                                                                                                                                                                                                                   

  • Windows 2008 R2 Folder assign permission "Read and Write" problem with *.doc file

    Hello All,
    I am a new one here,
    I am sorry for any mistakes and also my english is so poor.
    M Brother company runing Windows 2008 R2 as Active Directory...
    We have folder Name: Admin
    and in this folder, there are alot documents files as : *.doc, *.dwg, *.txt etc.....
    All user accesing to these files and they can open to edit and save...
    One day my brother want me to set Admin folder for all users just"Read and Write.." mean they still can open files to edit and save... but can't delete..
    I did success with this..
    But only one thing happen.. when they open *.doc file to edit and attempting to save, the message alert" access denide " and they can only "SAVE AS"...We don't want "Save as"
    Could you show me how can we fix error with *.doc file while they trying to save? because it allow only save as.. but other files as *.text file or *.dwg they can save without problem..
    Could expert here ever face this issues and fix by yourself, please share me with this..
    Please help me..
    Best regards,

    Hi,
    Office programs are specific. They will create a temp file when edit, then the temp file will be deleted when close. So Delete permission is needed for users to saving Office files like Excel/Word.
    For more detaile information, please refer to the thread below:
    Special Permissions - User cannot save files
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/721fb2f1-205b-46e5-a3dc-3029e5df9b5b/special-permissions-user-cannot-save-files
    Best Regards,
    Mandy 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Soap Attachment write problem

    Hello All,
    I'm seeing the error message given below. I'd been trying to write a soap attachment to a file output stream. I did the same thing in WSAD and it worked. But when I tried to work on unix box.. it wasnt supporting activation.jar and mail.jar resulting the error below. I'm urgently in need of help. Please help me. [java] at javax.activation.ObjectDataContentHandler.writeTo(Unknown Source)
    [java] at javax.activation.DataHandler.writeTo(Unknown Source)
    [java] at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1147) [java] at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:668)
    [java] at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233) [java] at weblogic.webservice.core.soap.SOAPMessageImpl.writeMimeMessage(SOAPMessageImpl.java:589) [java] at weblogic.webservice.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:513) [java] at
    I think there is a problem with the activation.jar and mail.jar.
    Please let me know about this problem if you have any idea since it is very urgent.
    I'm using Weblogic server which is on the solaris box and it is not supporting the activation.jar and mail.jar. The same worked on WSAD.
    Please advise.
    Thanks in advance,
    Vamshi

    Hi Hasan,
      Please, try to implement next xslt mapping before message mapping.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:stylesheet version="1.0" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:ns2="https://onlineservice.creditreform.de/webservice/0400-0005">
       <ns0:template match="node() | @*">
          <ns0:copy>
             <ns0:apply-templates select="node() | @*"/>
          </ns0:copy>
       </ns0:template>
       <ns0:template match="xop:Include"/>
    </ns0:stylesheet>
    Regards, Dzmitry

Maybe you are looking for

  • How do I get my phone billed corrected without wasting another 3 hours?

    On March 3, 2015, I ordered two “iPhone 6 plus 64 GB” along with 2 protective cases from verizonwireless.com/. The iPhones were on the edge plan, one was an upgrade and the other was a new line being transferred from Sprint.  They were to be shipped

  • How to have individual folder view?

    Hello, I would like the folders in OSX to remember individually the view, whether it is list, column or cover flow. E.g. I would like to view my pictures folder always in coverflow whereas my music folder should always display in list view. How can I

  • Derived tables and Order by clause

    Hi, I have a query that looks as below. The execution time of the query (10 sec) is fine when order by clause is removed from the query. But with order by clause, the execution time is 40 times more(400 sec). How to optimize this query so that it wil

  • Doubt in compareTo method while sorting string having special character

    I used compareTo method of String to sort below strings ??che ??in p?ch? I got the output in the below order : p?ch? ??che ??in Why does ??che appear before ??in because from http://www.asciitable.com/ ascii value of *?* is *154* and that of *?* is *

  • Trying to renew Line Rental Saver, unable to do so...

    Hi, I have had a look around but couldn't see a solution. I received an email telling me that my Line Rental Saver would soon run out and I could renew it. I have tried to do so but when I put in my phone number and my Postcode, I get the message. We