RMI+JCE How to prevent the CipherInputStream hanging

Dear sir/Madam,
In our Rmi application, i bind the Server object with the JCE encryption,by implementing RMIClientSocketFactory,RMIServerSocketFactory.
ie i bind like this
RMIClientSocketFactory csf = new EncClientSocketFactory();
RMIServerSocketFactory ssf = new EncServerSocketFactory();
Remote stub = (Remote) UnicastRemoteObject.exportObject(( Remote) obj, 0, csf, ssf);
Here i've overriden the createSocket method in both the classes.
ie
In "EncClientSocketFactory" the code look like this
public Socket createSocket(String theHost, int thePort)
throws IOException {
Security.addProvider(new com.sun.crypto.provider.SunJCE());
EncSocket encSocket = new EncSocket(theHost, thePort, key);
return encSocket;
In the Class "EncSocket" i've overriden InputStream and OutputStream methods.
* Returns a stream of type XorOutputStream.
public synchronized OutputStream getOutputStream() throws IOException {
if(cos == null) {
cos = new CipherOutputStream(super.getOutputStream(), outCipher);
return cos;
* Returns a stream of type XorInputStream.
public synchronized InputStream getInputStream() throws IOException {
if(cis==null) {
cis = new CipherInputStream(super.getInputStream(), inCipher);
return cis;
while running the Server the Input and OutputStreams are created but at the time rebind,
"m_registry.rebind(bindKey, stub);"
the server is hanging or waiting in the InputStream.
Your earliest reply is greatly appreciated.Iam breaking my head on this for the past one week.Million thanks for you.All the best
Awaiting for ur reply
kathiravan

pls see http://forum.java.sun.com/thread.jsp?forum=58&thread=309785 for one of the solutions.
Bill

Similar Messages

  • How to prevent the code viewing of jsp files

    hello friends
    How to prevent the code viewing on directly opening .jsp files at the server side
    Thanks in advance

    hello friends
    How to prevent the code viewing on directly opening
    .jsp files at the server side
    Thanks in advanceWhat exactly do you mean by code viewing? If by that you mean you don't want all the folders to show in the directory create a index.jsp file that has all the links to the pages you want to show
    If you mean something else please clarify

  • Hello , FMS is how to prevent the client into a large number of bytes?

    Hello , FMS how to prevent the client to pass a large number of bytes , such as one person put a 1G file in the argument , I also silly to receive ?Although there Client.setBandwidthLimit ( ) limit his maximum traffic per second , but is there a way , one more than the maximum amount of bytes to disconnect his.I assume that methods to determine the length is also obtained all of his transfer is finished , in order to determine out of it .

    How to limit the size of the parameters of the method.I wrote a method in the main.asc then the client NetConnection.call assignment, but if the client is malicious to upload very large data, how to limit it, I view the document did not find the clues, I hope that those parameters up to100KB.

  • How to prevent the user to submit leave request?

    Hi all,
    If the employee has wrong setup in the AME approval,the error "ERROR: An Invalid Setup has been detected for the current Transaction Type in Approvals" will be raised, although the employee will be able to submit the request, the request will have pending for approval status.
    How to prevent the user to submit the request when the error raised?
    Any idea.
    Regards

    Hi,
    Is this possible?  Pl check the error and your Transaction type. Refer ID 420381.1(How to Create the Approval Transaction Type for AME.A?) and also refer Oracle White paper on
    "Approvals Management Responsibilities and Setups in AME.B".
    Hope this helps.
    Regards,
    Siva

  • How to prevent the transaction code

    Hi
    I want to remove the common transaction code like /n,/o and /nex for particular user.
    Is there any SAP standard role availble or how to prevent the authurization for the above client independed
    transaction code.
    Regards,
    Jayakumar

    Hi,
    I want to know why you need to restrict these features when there is no harm.
    These are not transactions. They are extra features in SAP.
    /nT-code --- takes you to the new T-code by ending the previous T-code.
    /oT-code -
    creates a new session with the given T-code.
    /nex -
    ends the session.
    Rgds
    Suman

  • How to prevent the Canon 6D to climb to higher ISOs when it works in automatic mode?

    How to prevent the canon from 6D climbing to higher ISOs when it works in automatic mode?
    I was shooting at a basketball game at ground level and I left it in automatic mode because the moves were too fast, but when I passed to Lightroom, the photos were grainy, due to high ISO.

    Under the settings menu (third menu over), select ISO settings, and then set the Auto ISO limits for max to whatever you consider the maximum acceptable ISO.

  • How to prevent the program not to skip the process when exception is genera

    Hi, friends.
    How to prevent the program not to skip the process when exception is generated?
    For example, I am doing a process for 100 records. If the 15th record causes a Java Exception, I want to be able to skip it and continue processing the remaining 85 records.
    How it is possible with Java Exception handling? Any sample code?
    Thanks,
    Jaykishan

    [http://java.sun.com/docs/books/tutorial/essential/exceptions/]
    while (there are more lines) {
      try {
        process the next line
      catch (...) {
        log the error
    }[http://java.sun.com/docs/books/tutorial/essential/exceptions/]
    You'll want to be careful about which exceptions you catch though. For instance, if there's an unchecked exception, like NullPointerException, it's a sign of a bug in your code. Continuing to process as if that bug weren't there is often a worse approach than just failing. In this particular case, however, as long as you log the exception and then followup by fixing the bug that caused it, it may be acceptable to continue trying to process the rest of the file, even if some lines bring out a bug in your code.

  • Does anyone know how to prevent the YouTube volume from going up automatically?  I keep my volume down and it increases automatically when I play a video.

    Does anyone know how to prevent the YouTube volume from going up automatically?  I keep my volume down and it increases automatically when I play a video.

    Have you tried Windows Update in the Control Panel?
    Many times it will find the newest supported drivers for Hardware.
    Just be sure to install everything not just the Important ones.
    Let us know if this helps.

  • TS3276 On received mail, I delete sender's name, address, etc. then forward it.  The forwarded mail has a duplicate of the original mail, show original sender's name, etc.  How to prevent the duplicate from being sent?

    How to prevent duplicate of orginal mail (with original sender's name, address) being "attached" when forwarded?

    Maybe I am mis-understanding what you are seeing.
    When I forward a message, the receiver will see the original mail (unless I edit it, such as removing any previous sender's information) and the length will be the same as the message was before forwarding except for the added line "Begin forwarded message" (again, unless I edit bits out), and there will be no attached copy of the original message.
    So when you say in your reply above "The orginal email with the sender's name and address was also sent with my forwarded email." do you mean:
    a) that it is still visible at the head of the text of the message (which I was saying does not happen for me because "after hitting delete, the previous sender's information disappears." [and since] "it has disappeared, it cannot be in your forwarded mail." Disappeared means it is not there.
    b) another copy of the original message is attached to the forwarded email at the end, either as an included file or as repeated text.
    c) some other situation.
    Sorry about the previous mis-spellings! I hope that we can get to the bottom of this.

  • How to prevent the use of wild cards in select-option

    Hello experts,
    Is it possible to prevent the use of wild cards in a select-option? If yes, how is it done please?
    I have a
    SELECT-OPTIONS: o_comp  FOR dbtab-field OBLIGATORY DEFAULT 'FI'.
    and, I want to prevent the users for giving in some thing like FI* with the wildcard bc it would lead to dump.
    I want an error message to display and prevent the users for making such entry.
    Please I need your help and I would be very grateful.
    Thanks
    Nadin

    You have to use SELECT_OPTIONS_RESTRICT to restrict input allowed. Call this FM in INITIALIZATION or SELECTION-SCREEN OUPUT sections.
    Sample :
    TYPE-POOLS: sscr.
    INITIALIZATION.
    * Restrict SELECT-OPTIONS
      PERFORM restrict_select.
    FORM restrict_select.
      DATA: restrict TYPE sscr_restrict,
            opt_list TYPE sscr_opt_list,
            *** TYPE sscr_***.
    * Défine select-options modes (aka option list)
    * - ALL standard - all options allowed
      CLEAR opt_list.
      MOVE 'ALL' TO opt_list-name.
      MOVE 'X' TO: opt_list-options-bt,
                   opt_list-options-cp,
                   opt_list-options-eq,
                   opt_list-options-ge,
                   opt_list-options-gt,
                   opt_list-options-le,
                   opt_list-options-lt,
                   opt_list-options-nb,
                   opt_list-options-ne,
                   opt_list-options-np.
      APPEND opt_list TO restrict-opt_list_tab.
    * - EQU only equality allowed (list of values)
      CLEAR opt_list.
      MOVE 'EQU' TO opt_list-name.
      MOVE 'X' TO opt_list-options-eq.
      APPEND opt_list TO restrict-opt_list_tab.
    * Affect modes to parameters or block of parameters
    * ALL by default
      CLEAR ***.
      MOVE: 'A'          TO ***-kind,
            '*'          TO ***-sg_main,
            'ALL'        TO ***-op_main.
      APPEND *** TO restrict-***_tab.
    * EQU to internal material number
      CLEAR ***.
      MOVE: 'S'          TO ***-kind,
            'S-MATNR'    TO ***-name,
            'I'          TO ***-sg_main, " no exclusion
            'EQU'        TO ***-op_main. " only value list
      APPEND *** TO restrict-***_tab.
    * Call  FM
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
           EXPORTING
                restriction = restrict
           EXCEPTIONS
                OTHERS      = 1.
    ENDFORM.                    " restrict_select
    In the sample, only select-options for matnr is restricted to single value list.
    For your request build a mode with all options except "pattern" ones : CP and NP.
    Regards

  • Sequence file Version number. How to prevent the automatic resetting build version number whilst auto-incrementing revision number?

    Hi,
    I've got my environment set this way that each save of the sequence file increase the revision part of version number. However, during that increase the build counter is reset to 0. How to prevent it?
    TS 4.2

    Mimi,
    It is pretty common practice in software revisioning to reset a minor number to 0 when a major moves up 1.  There are many different schemes out there.  If you google or bing software versioning schemes you'll see what I'm talking about.
    So looking at it from left to right:  Major.Minor.Revision.Build = 0.0.0.1 
    if you change the Revision it would be expected that anything to the right (in this case Build) would reset to 0.  0.0.1.0!
    Let's say your version is 8.34.56.23.  It would make sense that if you were to change the Major number (which means a Major release) to 9 then your version would go to: 9.0.0.0. 
    A version number is just a unique way to tell someone which specific software you are using so it really doesn't matter that it resets to 0.  Although it makes sense because if you kept your build number sequential and didn't reset it then it would get outrageously larger which would be more annoying than anything. 
    Again this is common accepted practice in industry.
    Good Luck,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to prevent the regular password prompts when watching a movie on my MacBook Air?

    Hello everyone.
    I recently started renting movies from the iTunes store and watched them on my MacBook Air since I don't have an appleTV. (In fact on my TV connected via HDMI cable to the MacBook but I think that doesn't change the cause)
    Now every now and then a automatic password prompt kicks in overlaying the movie, so I have to stand up each time and type in the administrator password in the middle of the movie. This happens maybe about every 30-45 mins. Needless to say this is extremely unpleasant when watching a movie. Unfortunately I cannot tell you which programm causes the prompt since I always close all other programms other than iTunes.
    Is there a way to temporarily prevent all automatic password prompts?
    I hope you can help me,
    Greetings jonezdotcom

    This is taken from Mac Help.  It should guide you in solving your issue.
    Changing the way users log in
    You can require users to enter a password to log in to your computer, or you can turn on automatic login, which automatically logs in a specified user each time the computer starts up.
    Automatic login is useful if you’re the only person who uses your computer, and the computer is always in a safe and secure place. If you have more than one user account on your computer, or if you’re concerned about the security of information on your computer, you should require users to log in with a password. Automatic login is not available for accounts that are using FileVault encryption.
    If you require users to log in, you can change what they see in the login window. You can show a list of users with a picture next to each name and a place to enter the password, or require users to enter both their user name and password.
    To change the way users log in:
    Choose Apple menu > System Preferences and click Accounts.
    Open Accounts preferences
    Click the lock icon to unlock it, and then type an administrator name and password.
    Click Login Options.
    Do one of the following:
    To require users to log in whenever the computer starts up, choose Off from the “Automatic login” pop-up menu.
    To have the computer automatically log in to a particular account when the computer starts up, choose the account from the “Automatic login” pop-up menu, enter an administrator password, and click OK.
    IMPORTANT: Automatic login allows anyone to get immediate access to your computer simply by restarting it. If you turn on automatic login, make sure the computer doesn’t automatically log in to an account with administrator privileges.
    Next to the ”Display login window as,” select how you want the login window to appear:
    To have users select an account from a list in the login window, select “List of users.”
    To require users to type their user account name and password, select “Name and password.”
    To show each user’s password hint, select the “Show password hints” checkbox.
    If you turn on automatic login for yourself, the computer opens your account when it starts up. If you log out, other users see a login window to log in to their user accounts.
    The Login Options pane of Accounts preferences
    Use the Login Options pane of Accounts preferences to change the way the login window behaves to be more secure or set up the way users will log in to their accounts
    PREFERENCE EXPLANATION
    Automatic login
    To have the computer automatically log in to an account at startup, choose the account from the pop-up menu. This is less secure than requiring users to log in, since it allows anyone to use the computer just by turning it on.
    To require users to select an account and enter a password to log in, choose Off from the pop-up menu.
    Automatic login is not available for accounts that are using FileVault encryption.
    Display login window as
    Select “List of users” to have users choose their accounts from a list in the login window.
    Select “Name and password” to require users to type their name and password in the login window.

  • HT4718 How to prevent the lac going to sleep mode in system recovery ?

    While trying restore the entire HD image to a different hdd in system recovery mode the laptop goes to sleep.
    How to prevent it ? the system recovery does not seem to have any terminal app so cannot issue caffeinate command either :/

    have you tried to restart your computer

  • How to prevent the User from loading more than one seq file?

    Hi,
    I would like to prevent the tester operator from loading more than one test sequence.  Any ideas how to do it?
    Thanks
    Rafi

    Hi Marty,
    Marty_H wrote:
    Hello mhousel,
    Testexec.exe by default loads the sequence files that were last open when it runs.  It is often desired behavior to have multiple sequence files load automatically. 
    [Mark Housel] Maybe for some but certainly not for me. 
    This should be easily handled by TestStand without any problems.  What do you mean by "chaos ensues"? 
    Certainly Teststand doesn't care a bit how many sequences are open.  But, when my sequences open they initialize HW of the ATE associated with
    that sequence file during the sequenceFileLoad callback.  e.g. I allocate TELNET handles to a terminal
    server that connects to multiple console within the system and als for
    the UUT.
    If a second sequence opens it knows nothing about the other sequence and again tries to open a TELENT session to the same port of the
    terminal server and obviously fails, so my sequence reports that it
    can't properly initialize the ATE HW.  Bad juju!
    Are your sequence files set to run automatically when they are loaded?
    I guess so.  Other than the trick of logging in as the special noExecution user and having special code in my sequence and modified Process Model I have no idea how to prevent a sequence fronm "runnin" when opened.
    If you want to prevent Testexec.exe from loading multiple files, you should be able to close out one of the open files when it loads and that sequence file should not load in the future.  I hope that helps.
    The trick I read somewhere else of modifying the Testexec.uir file to never re-load a sequence file automatically seemes to have covered up solved the problem.
    Thanks,
    Mark

  • How to prevent the access of more than one person to an APEX application?

    Hello,
    I want to prevent the access to an application when it is already opened by another user.
    How to do it?
    Thank you by advance
    Jean-Louis

    Why would you want to do this? APEX applications are MEANT to be MULTI-USER WEB BASED APPLICATIONS? This makes NO SENSE..
    If you need this functionality, you can do this in Access..
    Thank you,
    Tony Miller
    Webster, TX

Maybe you are looking for

  • Possible to move boot display to different DVI port? (GTX780)

    I doubt this is possible, but just in case : is it possible to force boot screens to a different port on the video card? The MSI GTX780 has two DVI ports - one DVI-I (which includes analog display) and DVI-D (which does not). The DVI-I port displays

  • How can I transfer music from my iPad to my iPhone without using a computer/iTunes?

    Disclaimer:  I am actually asking this for a family member, but I don't have an answer for her either. My family member has an iPad with music on it currently.  This music is music bought from iTunes and music bought from other sources. Her computer

  • 1st gen iPod touch, how do i get apps?

    i have a 1st generation ipod touch, the newest software it saysi can ave(when i checkfor updates there isn't any) but yet i still can't get apps. what should i do?

  • Macbook Pro (mid 2012) Running progressively slower

    I am having issues with the upgrade.  I installed Yosemite when it first came out. I have a Macbook Pro (Mid 2012) with 8 GB of memory and 219 GB free of my 750 GB hard drive.  Since the install some processes have started to become slower and slower

  • Creating RFC request in java

    Hi. I have a small issue, creating a RFC call from java. To be specific, I'm updating a table in the backend, using an adapter module. When creating the request using DOM, I get this error: Exception: Exception: error while processing message to remo