When does RMI create sockets

Hi
Is the following sentence correct: "Creating an instance of a class that extends UnicastRemoteObject does not create any sockets. Creation of sockets is not done before the instance is registered with a Registry".
Soeren Mors

From the RMI FAQ:
http://java.sun.com/products/jdk/1.2/docs/guide/rmi/faq.html#connection
F.1 At what point is there a "live" connection between the client and the server and how are connections managed?
When a client does a "lookup" operation, a connection is made to the rmiregistry on the specified host. In general, a new connection may or may not be created for a remote call. Connections are cached by the RMI-transport for future use, so if a connection is free to the right destination for a remote call, then it is used. A client cannot explicitly close a connection to a server, since connections are managed at the RMI-transport level. Connections will time out if they are unused for a period of time.
F.5 Is there only one socket connection between a client process and the server, no matter how many stubs exist in that client process?
RMI reuses the socket connections between client and server whenever possible. The current implementation creates additional sockets on demand when they are needed. For example, if the existing socket is in use by a call then a new socket is created for the new call. Typically, there are at least two sockets open since the distributed garbage collector needs to make remote calls when remote objects are returned from the server. If a cached connection remains unused for a period of time, the connection is closed.

Similar Messages

  • OOME when doing RMI with wlclient.jar

    Hi,
    I'm calling EJB-components that are hosted on a WLS 8.1 server.
    The client uses wlclient.jar from WLS 9 distribution (WebLogic Server 9.2 Fri Jun 23 20:47:26 EDT 2006 783464) and jre 1.5.0_11.
    I get OOME at the client after doing several hundred EJB calls.
    I have checked that the client code does not leak ejb-references, initial contexts etc. I have also tried to call ejb remove and close the initialcontext and start anew but it does not help, the "com.sun.corba.se.impl.orbutil.CacheTable" still becomes the top heap consumer.
    The outline of how the program proceeds is:
    1. create initial context
    2. lookup ejb home
    3. call the create-method of a stateless session bean
    4. call some ejb business methods several hundred times
    -- here is the OOME, most often not during the ejb call, but when memory is examined the RMI-implementation objects are filling the heap
    5. call ejb remove
    6. close initial context
    So that's the problem. How could I get around this?
    I included some HPROF statistics below. HPROF made the stats immidiately after the OOME . All the top rank rows are related to RMI implementation classes, not application classes.
    Regards,
    Kari
    SITES BEGIN (ordered by live bytes) Tue Oct 06 12:02:10 2009
    percent live alloc'ed stack class
    rank self accum bytes objs bytes objs trace name
    1 10.29% 10.29% 3758560 3614 39151840 37646 310238 byte[]
    2 9.31% 19.60% 3400848 45698 3400848 45698 312167 char[]
    3 5.46% 25.06% 1994432 62326 3528256 110258 312197 com.sun.corba.se.impl.orbutil.CacheTable$Entry
    4 3.21% 28.27% 1172952 8747 1172952 8747 312066 char[]
    5 3.00% 31.27% 1096752 45698 1096752 45698 312166 java.lang.String
    6 2.90% 34.17% 1059688 6869 1089912 7103 310593 byte[]
    7 2.30% 36.47% 838592 26206 2827456 88358 312171 com.sun.corba.se.impl.orbutil.CacheTable$Entry
    8 2.19% 38.65% 798200 25112 798200 25112 306612 char[]
    9 2.02% 40.67% 738552 30773 769344 32056 310605 java.util.HashMap$Entry
    10 1.99% 42.66% 727064 6991 3915184 37646 310235 com.sun.corba.se.impl.encoding.CDROutputStream_1_2
    11 1.84% 44.50% 671712 1294 1196448 3818 312195 com.sun.corba.se.impl.orbutil.CacheTable$Entry[]
    12 1.84% 46.34% 671712 1294 1196448 3818 312196 com.sun.corba.se.impl.orbutil.CacheTable$Entry[]
    13 1.65% 48.00% 604472 6869 625064 7103 310578 com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl
    14 1.65% 49.65% 603792 25158 628680 26195 300952 java.util.HashMap$Entry
    15 1.65% 51.30% 602688 25112 602688 25112 306611 java.lang.String
    16 1.50% 52.80% 549520 6869 568240 7103 310599 com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2
    17 1.50% 54.31% 549520 6869 568240 7103 310587 java.util.HashMap$Entry[]
    18 1.44% 55.74% 524352 4 524352 4 302751 java.util.HashMap$Entry[]
    19 1.26% 57.00% 460632 3387 475592 3497 310457 com.sun.corba.se.impl.interceptors.ClientRequestInfoImpl
    20 1.21% 58.21% 441072 9189 2515152 52399 304085 java.nio.HeapByteBuffer
    21 1.05% 59.27% 385000 6875 397768 7103 310405 com.sun.corba.se.impl.legacy.connection.SocketFactoryContactInfoImpl
    22 1.03% 60.29% 375120 15630 375120 15630 313808 java.lang.StackTraceElement
    23 1.00% 61.29% 364728 3507 1939496 18649 309771 com.sun.corba.se.impl.encoding.CDRInputStream_1_2
    24 0.96% 62.25% 349696 3877 5040200 58488 310969 char[]
    25 0.90% 63.15% 329712 6869 340944 7103 310231 com.sun.corba.se.impl.encoding.CDROutputObject
    26 0.77% 63.92% 279904 8747 279904 8747 312070 com.sun.corba.se.impl.orbutil.CacheTable$Entry
    27 0.75% 64.67% 275040 6876 365360 9134 304217 char[]
    28 0.75% 65.42% 274760 6869 284120 7103 310586 java.util.HashMap
    29 0.74% 66.16% 271200 3390 289920 3624 310960 java.util.HashMap$Entry[]
    30 0.74% 66.91% 271200 3390 289920 3624 310941 com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2
    31 0.74% 67.65% 271120 3389 287360 3592 311344 java.util.HashMap$Entry[]
    32 0.67% 68.32% 243984 10166 257856 10744 310884 java.util.HashMap$Entry
    33 0.67% 68.99% 243984 10166 257856 10744 310879 com.sun.corba.se.spi.servicecontext.UnknownServiceContext
    34 0.65% 69.64% 239272 2583 908696 10308 300090 char[]
    35 0.60% 70.24% 219808 6869 227296 7103 310799 com.sun.corba.se.impl.encoding.BufferManagerWriteStream
    36 0.60% 70.84% 219808 6869 227296 7103 310584 com.sun.corba.se.spi.servicecontext.ServiceContexts
    37 0.57% 71.42% 209928 8747 209928 8747 312065 java.lang.String
    38 0.56% 71.98% 205776 8574 205776 8574 313784 java.lang.StackTraceElement
    39 0.54% 72.52% 196800 5427 427112 11183 310920 byte[]
    40 0.54% 73.06% 196352 1700 444904 4043 310971 char[]
    41 0.47% 73.53% 172056 7169 172056 7169 312484 java.lang.StackTraceElement
    42 0.47% 73.99% 170000 2125 178800 2235 311358 java.util.HashMap$Entry[]

    Andy Piper wrote:
    Configuration:
    =============
    * Windows 2000 Prof SP3
    * Sun JDK 1.4.1_01 (1.4.2)Incidentally you should be using 1.4.1_03 (or later) in the client if
    you are using wlclient.jar.I tried some combinations of WL and client JDKs,
    even that:
    * WL started under Sun JDK 1.4.2
    * client started under Sun JDK 1.4.2
    * all classes (EJBs, value objects, etc)
    compiled under Sun JDK 1.4.2
    >
    >
    FAIL because of java.rmi.MarshalException
    weblogic.iiop.IIOPInputStream.checkChunk(IIOPInputStream.java:449)
    at
    weblogic.iiop.IIOPInputStream.read_longlong(IIOPInputStream.java:1002)There is known bug with reading longs inside a chunked value. This is
    fixed in SP2 and the relevant CR is CR124377 - you can get a patch for
    SP1 from support.It's realy very nice news for us.
    Thank you very match for help and quick response.
    Best regards,
    Eugene Voytitsky

  • When does Toplink create tables based on JPA/EJB3 Entities

    HI,
    When I deploy our test EJB3 application it is deployed succesfully The tables for the entity beans isn't created during the deployment-process, but when I access a session bean the table is created (tables and scripts af created fine).
    Is it possible to change this, to make the tables create during the deployment process?
    Regards
    Jacob

    OC4J 10.1.3 uses TopLink Essentials, OC4J 11R1 DP3 uses Oracle TopLink.
    Try setting the toplink.validation-only property to true. (I can't remember exactly what it does, but I seem to remember that it did something that changed or stopped the table creation :-)

  • Sold-To Party and Reported missing when doing Help - Create Support Message

    Sorry, I know this has been asked multiple times, but I'm missing something in the responses.  The responses I am finding either don't seem to apply to my situation, or aren't detailed enough to explain what I'm supposed to be doing.
    Solution Manager 7.0 EhP1 SAPKITL435.
    If we try to do a "Help - Create Support Message" from within our production Solution Manager system, the "Reported by" field is correct, but the Sold-To Party is blank.
    If we try to do a "Help - Create Support Message" from within our non-production Solution Manager system, both the "Reported by" and  Sold-To Party fields are blank.
    If we try to do a Help - Create Support Message" from another SAP system whose RFC is pointing to our non-production Solution Manager system, both the "Reported by" and  Sold-To Party fields are blank.
    I've looked at IB52, as well as the SPRO activities under "Partner Determination Procedure."  I think a big part of my problem is that they just don'e make sense to me yet, because I can't figure out what I should be changing.
    For example, IB52 looks to me like it only applies if you want to assign something to the same person all the time.  Am I missing something there, or is that an answer to a different question?
    I also can't figure out if I need to create something new in "Define Access Sequences," or modify something existing, and, if I modify, to what?
    Does anyone know where I could find specific instructions for setting this up?

    Hi Brenda,
    Regargind this issue, please check if Sold-To party is maintained for
    your system with IB52 in your solman system as the steps below:
    SOLUTION MANAGER system
    ->IB52
    ->select the system on left hand side
    ->click on 'goto' on top menu
    ->Select 'partner'
    ->Now maintain Sold-To party
    Also check below note:
    1165357    Sold-to-Party is not assigned to Service Desk messa
    As you said ou already assigned then i would request you to please check if you have assigned at the system level or not. Somtimes people define at top of the tree and also at system level. Please assign at system level and delete all other. Most of the times this is the issue Sold-to-party doesnt fill automatically.
    For reported by field:
    Please check the note: 824640: Customizing missing for Service Desk in Solution
    read this note carefull and this will help you fixing the reported by issue.
    Please, make sure you have applied the following corrections:
    1439191 Incident Create: Message Reporter or Processor is not saved
    1486132 Incident Create: Enhance search help of Reporter field
    1497700 Work center: Message details not updated after refresh
    After this if you still having issue you need to provide more details but i think this will fix the issue.
    Thanks
    Regards
    Vikram

  • When does the RMI Client socket be created?

    Hi, I have created my own RMIClientSocketFactory and RMIServerSocketFactory, it was just a normal socket with some print statements. Example:
    ============================================================
    public class MyRMIClientSocketFactory implements
    RMIClientSocketFactory, Serializable {
    private int hashCode = "MyRMIClientSocketFactory".hashCode();
    public Socket createSocket(String host, int port) throws IOException {
    System.out.println("creating socket to host : " + host + " on port " + port);
    return new Socket(host, port);
    public boolean equals(Object object) {
    if (object instanceof MyRMIClientSocketFactory)
    return true;
    return false;
    public int hashCode() {
    return hashCode;
    public class MyRMIServerSocketFactory implements RMIServerSocketFactory, Serializable {
    private int hashCode = "MyRMIServerSocketFactory".hashCode();
    public ServerSocket createServerSocket(int port) throws IOException {
    System.out.println("creating ServerSocket on port " + port);
    return new ServerSocket(port);
    public boolean equals(Object object) {
    if (object instanceof MyRMIServerSocketFactory)
    return true;
    return false;
    public int hashCode() {
    return hashCode;
    ================================================================
    I wonder when the message "creating socket on port.." and "creating ServerSocket on port.." will be printed? And I found that the equals() and hashCode() methods are called quite a lot of times when I made one rmi call. When I keep the reference of the remote object for some times, the client socket will be created again. Can somebody tell me how all these work?
    Thanks,
    Jax

    Does it
    means that when timeout happened, a new client socket
    will be created and make remote calls to renew DGC
    leases?Yes.
    Again, about exporting remote objects on the same
    port, why I got the exceptions:
    java.rmi.server.ExportException: Port already in use:
    1234;
    nested exception is: java.net.BindException: Address
    already in use: JVM_BindYou get this if you try to export two servers on the same port but their server socket factories are not equal (or not both null or unspecified), or if the two ojbects are in separate JVMs (port sharing can only work inside a single JVM), or if the port is in use by some other listening process.
    Your MyRMIServerSocketFactory.equals() method looks OK to me, but I'd delete the hashCode() method, it's not necessary for RMI and your implementation is flawed. Personally I use the following equals() method:
    public boolean equals(Object that) { return that != null && that.getClass() == this.getClass(); }

  • When does a value help in Java webdynpro 2004s get created automatically

    HI All
    when does drop down value help get created automatically (without coding) in java webdynpro NW 2004s application for a view field mapped to a abap dictionary like currency(Domain:waers) having a value table  TCURC but has to be created for a field like UOM(Domain:meins) having a value table T006
    the only differnce I can see in the 2 domains in my current set up is, meins has a conversion routine & wears doesnt
    this is a question that applies to both java webdynpro & abap so please dont ask me to post it in another forum.
    Im sure some one has asked this question before. please guide me!!
    Thanks
    Prasad

    Question:
    If I start a java thread from the �main� thread of
    execution and that thread I just created finish�s
    executing its �run� method is that threads resources
    automatically clean up? Or do we have to do this
    clean up ourselves?Depends which resources you mean. There's nothing special about threads in that respect.
    Memory is automatically reclaimed when it is no longer reachable, so unless the run method set some member variables in some object that remains reachable after it completes, no worries there.
    Files, sockets, etc. remain open unless you close them.

  • Save as does not Create PDF Compatible File even when the creare pdf compatible files is on, Illustrator CC 2014

    save as does not Create PDF Compatible File even when the creare pdf compatible files is on, Illustrator CC 2014

    When I open is adobe acrobat I get this message.
    "This is an Adobe® Illustrator® File that was
    saved without PDF Content.
    To Place or open this  le in other
    applications, it should be re-saved from
    Adobe Illustrator with the "Create PDF
    Compatible File" option turned on. This
    option is in the Illustrator Native Format
    Options dialog box, which appears when
    saving an Adobe Illustrator  le using the
    Save As command."

  • Why does iTunes create disk errors when deleting movie files?

    I use a Macbook Pro, OSX 10.7.5. When I delete movie file from my iTunes library I get disk errors. I need to option boot select the recovery disk and repair the disk.  Deleting a movie file I have placed on my desktop with finder does not create any errors.  Most of the movie files are created as .m4v movies. They all play just fine with my Apple TV. I have tried turning off the Apple TV and rebooting before I delee files but nothing seems to work.
    Any ideas?
    Lance

    If you let iTunes organise your media folders then that is the way it is. An option would be to change the Media Kind to TV Show which would gather them togther in one folder, but in a different part of the library.
    tt2

  • When i open an mp3 file from a source other than apple, does itunes create it's own file and can I then delete the original mp3?

    when I open a music file from a source other than apple, does itunes create it's own file and can I then delete the original mp3?

    If you use iTunes' default settings then when you add a file to iTunes it places a copy of the file in the iTunes media folder and it leaves the original in place.  The exception is when you drag it to the Automatically Add To iTunes folder.
    It does not convert the file.  You can delete the original if you wish.

  • I am currently using Lightroom 5.6 and operating on a Mac with OSX Ver 10.9.5. I am receiving an error problem when doing the following -  I am exporting selected photos from a particular Catalogue saved on Drive 1 to a folder created on another Drive whe

    Hi, I am having a little trouble with exporting images to another drive and Catalogue and need some help if anyone can give me some advice
    I am currently using Lightroom 5.6 and operating on a Mac with OSX Ver 10.9.5.
    I am receiving an error problem when doing the following -
    I am exporting selected photos from a particular Catalogue saved on Drive 1 to a folder created on another Drive where a Lightroom Catalogue has been created. In this Catalogue I have arranged for the images once exported to be moved to a different folder - I used the Auto Import process under the File dialogue box.
    When processing the Export I receive an error message for each of the images being exported indicating the following -
    Heading Import Results
    Some import operations were not performed
    Could not move a file to requested location. (1)
    then a description of the image with file name
    Box Save As                                  Box  OK
    If I click the OK button to each image I can then go to the other Catalogue and all images are then transferred to the file as required.
    To click the OK button each time is time consuming, possibly I have missed an action or maybe you can advise an alternative method to save the time in actioning this process.
    Thanks if you can can help out.

    Thank You, but this is a gong show. Why is something that is so important to us all so very, very difficult to do?

  • When trying to creat a desktop icon, it does not go to the URL.....instead I get 'script' and not a website......the script has http//etc but I am not directed to the website......I previously had IE 8 (on Vista).....is that the problem...

    Question
    When trying to create a desktop icon, it does not go to the URL.....instead I get 'script' and not a website......the script has http//etc but I am not directed to the website......I previously had IE 8 (on Vista).....is that the problem?I do not have any installed plugins....at least none that I know of.....remember I am a new user......Basically, the desktop icon is not going directly to the Mozilla FF to get me to the web site I need to go to.....FF works when I use the Mozilla FF icon.....just not the icons I create.....THANKS!!! I have also tried reinstalling FF and get the same results.....HELP!!!

    The address beginning with file:/// denotes a saved file (local file). The file may not be present. You can try dragging the site icon of this page on the left edge of the location (Address) bar and release it on the desktop. Please try opening it. If it still shows an error it could be a problem with the system's zone permissions. You can try setting each zone in the Windows Control Panel or IE > '''Internet Options''' > '''Security''' tab to '''Default Level'''.

  • When i first created my itunes account it selected the local country i lived in, now i have changed countries and it does allow me to buy any apps as the credit card is not valid in that country. what do i do?

    When i first created my itunes account it selected the local country i lived in, now i have changed countries and it does allow me to buy any apps as the credit card is not valid in that country. what do i do?

    You will need to sign into your account using the iTunes app on your Mac or PC and change the region/country for your account. If you do not have a bank card for the new country, you should be able to make purchases with iTunes Gift Cards if they are available in the new country.

  • Why does ID create a CSS when option is not selected in export to ePub?

    I am using InDesign 6 to create ePub books. I want to use my own CSS so in the Export to ePub options I am leaving the setting "Include Style definitions" unchecked. I then list my CSS under additional CSS. When I create the ePub and then examine the files included I see that there are 2 CSSs, mine and one created by InDesign. Why does InDesign create a CSS when the "Inlcude Sytle definitions" is left unchecked?

    Because that is the way that CS6 exported EPUB.
    EPUB is a fast moving target and has moved way beyond what CS6 can export. With each update from InDesign CS6 to InDesign CC to InDesign CC 2014, and even to the latest update to CC in October, there have been major changes to how InDesign exports EPUB. It no longer does it that way, and you have much more control over the process in InDesign CC.
    Because InDesign CS6 is never going to change, it's best to work at modifying what they do export, unless you want to upgrade to InDesign CC.

  • Why does illustrator create white boxes from shadows when imported into indesign

    When a logo created in illustrator cs4 has either shadows applied or gaussian blurs applied on letter shapes and is then put into a frame/picture box in indesign with a coloured background, it brings in white boxes. It does not happen in illustrator when a coloured box is placed on a layer down. If anyone has come across the same problem or knows why it's happening, please let me know. pic attached
    Many Thanks
    Bruce

    http://forums.adobe.com/message/1259040#1259040
    look at post 6 which says
    Your transparency blend space needs to match you output color space.
    To simplify it for now, if you are outputting to a RGB device, change your color mode to RGB before printing. Undo back to cmyk to continue working on the document.
    Does this solve your issue?
    Posted by John Kallios

  • Does SAP create missing files TRACExx when starting up?

    Hi there,
    I'm working on a documentation regarding a system copy from a productive system to a consolidation system.
    We're using Sun Solaris 10/64Bit with Oracle 10g2 and Netweaver 7.00.
    In the directory /usr/sap/<SID>/DVEBMGS_xx/log there are several files SAP uses:
    - ALALERTS
    - ALMTTREE
    - ALPERFHI
    - ENQBCK
    - SLOGxx
    - TRACE
    - TRACE00...TRACE07
    My question concerns the TRACE-files. Only the file TRACE seems to be used by the consolidation system, but there are still eight files TRACE00 up to TRACE07 that were last accessed in 2008 and before.
    These files are filled with data from former consolidation systems that got overwritten everytime by the system copy. Now, after the new copy, the SAP system is still down. May I delete these files? Does SAP create these files new when starting up?
    Greetz, Uwe.

    Hi,
    Yes you can delete those files at any time. Check SAP Note 16513, it may help you.
    Thanks,
    Sushil

Maybe you are looking for

  • Need to start a program in Oracle System (External) from sap program

    Hi guys,      I need to start a program in another oracle based system from sap program by writing native sql statements. Does anyone have idea how to do this. Rgds, Ram

  • Status "ERROR IN PROCESS" for invoice

    Hi, we have an issue regarding invoice document.After posting the invoice document in SRM the status of the document should change, however the status of the invoice is error in process. Dont know why, we have maintained all the attriburtes in organi

  • 2.0 - 0x803d0006 - The Operation Did not complete within the time allotted

    I integrated MBAM 2.0 into ConfMgr 2012 SP1 on Srv2008R2 & SQL 2008R2 box. All MBAM components lying on the same server. Network is encrypted, using https, clients and server have certificates from inside PKI. - Manual encryption attempt with MBAM cl

  • About XML/XSL:Urgent

    Hai , I am developing one module which invloves XML database ,XSL and Javascript. In this I want to transform XML data to XHTML form using XSLT ., I have done this ,(using xsl templates ,In my form two radio buttons one dropdown box and two text boxe

  • Folder question~mark at startup  :(

    when i start up my computer i get a folder with a blinking question mark. it then starts up fine, but i'd rather not get that sinking/scary feeling every time i startup... how can i get rid of it>?