Call to a remote object in the same JVM

Hi,
I want to implement a logging mechanism in my system. I'm planning to
write an rmi object and make it a start up class.
I wud like to know whether the calls to this start up class made by the
ejb instances and from the servlet engine in the same JVM, wud be rmi calls
or wud they be simple method calls.
Does weblogic detect the calls from the objects of the same jvm and
optimise them, or wud they be rmi calls only.
btw, i'm using weblogic 5.1
thx,
Manohar

Try:
initialNamingContext.rebind("single",
weblogic.rmi.server.UnicastRemoteObjcet.exportObject(obj)
"M. Manohar" wrote:
Hi Eduardo,
thx for ur reply.
I wud like to know how to make this "binding a stub".
wat i'm using is binding an object only.
Instantiating an object which implements the remote interface and binding
it to the JNDI tree by,
initialNamingContext.rebind("single", obj);
and ofcourse defining it as a start up class in the weblogic.properties
file.
Can u pls explain how to do "binding a stub"
thx,
Manohar
Eduardo Ceballos wrote in message <[email protected]>...
Presuming that the start up class binds itself into the jndi tree, then itonly depends on what you bind: binding a stub results in the RMI runtime
overhead; binding the object itself, results in the simpler function call
overhead.
"M. Manohar" wrote:
Hi,
I want to implement a logging mechanism in my system. I'm planning to
write an rmi object and make it a start up class.
I wud like to know whether the calls to this start up class made by the
ejb instances and from the servlet engine in the same JVM, wud be rmi
calls
or wud they be simple method calls.
Does weblogic detect the calls from the objects of the same jvm and
optimise them, or wud they be rmi calls only.
btw, i'm using weblogic 5.1
thx,
Manohar

Similar Messages

  • Exporting two remote objects on the same port

    Hi,
    I would like to export two remote objects on the same host, same port and bind them with different service names.
    There is no problem when I do that from the same Java program.
    But when I export and bind an object from a Java program 1, I cannot do the same with the second (and similar) Java program 2. This is the stack trace of my Exception:
    java.rmi.server.ExportException: Port already in use: 50040; nested exception is:
         java.net.BindException: Address already in use: JVM_Bind
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:243)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
         at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:145)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:129)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:275)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:178)
         at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:75)Can some one help please

    It should work in any version of Java as long as the server socket factories are null or equal according to Object.equals() or its override in the SSF.equals() method if any. Which needs to be present and needs to take the form:
    public boolean equals(Object object)
      return object != null && object.getClass() == this.getClass();
    }with further tests if the server socket factories have additional state.

  • Does JRockit perform any optimizations on URL connections to the same JVM?

    Hi
    I am wondering if JRockit would understand a local connection request, such as a SOAP call to a service hosted on the same JVM (localhost), and perform this in a manner without the overhead of a full connection. i.e. is there a difference in calling a service as http://localhost/service vs http://remote/service if the end service is hosted on the same JVM?
    thanks
    asankha

    I wrote a simple Java program to listen on a socket and when i used a Java client program (ie. in a separate JVM) to call this, I saw that tcpdump does not see packets if this communication occurs through on the same host - but it sees the packets when invoked from a different host. The same was visible in directly TELNET'ing to the port. This was seen in both Linux and Windows.
    Hence I assume, this will hold true always, and local SOAP calls will not incur unwanted overhead (http/s)
    Would appreciate any feedback if anyone thinks this assumption is wrong..
    thanks
    asankha

  • RE: multiple named objects with the same name andinterface

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • I am facing issue in Receiving incoming calls, Name not getting displayed though the same has been saved in my phone book!! I have done sync from Windows contacts.. please help if some1 knows how to rectify the issue...

    I am facing issue in Receiving incoming calls, Name not getting displayed though the same has been saved in my phone book!! I have done sync from Windows contacts.. please help if some1 knows how to rectify the issue...

    Has your carrier been having issues with Call Display? Do the telephone numbers come up when people call, or does it just show 'Unknown Number' or 'Blocked' ?

  • I delete some emails ,there are moved to trash . I delete them from trash folder too and they still appear in a folder called 'all messages". I repeat the same actions and after a while they appear again!what should i do to delete them permanently??

    I delete some emails ,there are moved to trash . I delete them from trash folder too and they still appear in a folder called 'all messages". I repeat the same actions and after a while they appear again!what should i do to delete them permanently??

    If you are using Apple's Mail app 6.5 is the latest version irrespective of what a previous poster says. It does sound though that you are using a gmail account online via a web browser. Please confirm and fill in missing information.

  • View objects referencing the same entity

    The behaviour occurs in every version of jdeveloper ADF BC i have tried so far (10g, 11g).
    I have 2 updatable view objects referencing the same entity object. When i create a new record using the first view object and before commiting the data to the database i navigate to the second
    view object. Suprisingly the second view object is populated with the same data that is posted on the first view object. It seems like both view objects are referencing the same entity object instance.
    Is any way to overcome this strange behaviour.
    Thanks

    As Timo says think of the EO as a record cache. If you had 700 VOs all based on the same EO, it would be ideal to store the same record(s) 700 times in the midtier as it would consume vasts amount of memory. Thus the EO cache.
    If you do want to separate the VOs, you've 3 options:
    1) Use separate EOs for each VO (not ideal)
    2) Expose each VO under their own root level Application Module - a separate EO cache instance for each VO will be created at runtime - however you need to be careful between the VO/EO pairs, you don't update the same record, as you'll get record locks/contention
    3) If you're using task flows in 11g, use the Always Begin New Transaction option for each screen/fragment for each VO. This is the equivalent of 2 but from the task flow level - however again you need to be careful on record locks.
    CM.

  • Can multiple PCs access one remote panel at the same time?

    I've written a program in labview 7.1 to monitor/control a labview application running in the test cell through Remote Panel. I and my coworker can remotely monitor and/or control this labview application individually. But if my coworker has the remote panel displayed on his PC and I try to get the remote panel on my PC, I get a labview error (63) as below:
    "LabVIEW:  Serial port receive buffer overflow.
    LabVIEW:  The network connection was refused by the server."
    My question is: Can multiple PCs access one remote panel at the same time?
    Thanks in advance!
    Y

    Sorry I wasn't clear. The remote panel license is separate from the number of LabVIEW development licenses. Pricing information on remote panel licenses can be found here.

  • How to rotate and translate an object at the same time??

    Hi, I have a problem with rotation and translation of an object at the same time. I wrote a behovior class for my object (a cylinder). When some conditions are true the cylinder is added to a robot arm. Then it is translated so that the cylinder would be very close to the arm (looks like the robot is holding it). And now the behavior should also rotate the cylinder because the angle is 0 and it should be 90. I can translate the object or I can rotate the object but when I'm trying to do it at the same time (I want to combine rotation and translation) it doesn't work.
    Could anyone help me, please :)

    You can used to Matrix3f
    This object is a rotation and translate matrix
    for example:
    private void componerTransformada(){
    Quat4f rot = new Quat4f((float) this.getRotacionSobreX(),(float) this.getRotacionSobreY(),
    (float) this.getRotacionSobreZ(),1.0f);
    Vector3f tras = new Vector3f(-4.0f,-4.0f,(-1)*this.getDistanciaDeLaCamara());
    this.setTransformacion(new Transform3D(new Matrix4f(rot, tras, 1.0f)));
    Quat4f is a matrix of ratation
    vector3f is a direction vector
    Transform3d is building with Quat4f and Vector3f.
    That is work i use this to situe the view of point.
    good locky

  • Sharing objects in the same package (context)

    Hi,
    I need a small example or API invocations which shows object sharing beetween two applets in the same package.
    Thanks.

    Look at the JavaPurse sample. You'll see the record, ParameterFile, and CyclicFile are shared objects in the same context.

  • When receiving an call waiting can't push the hold and answer button.Because: it will put on hold the first caller, answer to the second, but you can't hear the second until you end the first call !!! Anyone has the same problem ? Did anyone know why ?

    When receiving an call waiting can't push the hold and answer button.Because: it will put on hold the first caller, answer to the second, but you can't hear the second until you end the first call !!! Anyone has the same problem ? Did anyone know why ?

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • How to create an object within the same class???

    hi im just a newbie
    i v been always creating an object from the main class..
    but how to create an object inside the same class??
    i got main and students class
    the main got an array
    Students[] stu = new Students[]
    and i got
    stu[i] = new Students(id,name);
    i++;
    but i wanna do these things inside the Students class..
    i tried ..but i got errors.....
    how to do this
    .

    javaexpert, :)
    I really have no idea what you are trying to do since you say you've always been creating an object from the main class, yet you always want to create an object inside the same class.
    I'll assume that you have an object in the main class that you are trying to access from the Students class.
    If you are trying to access objects that are contained within the main class FROM the Students class, then know that there are two ways of doing so, one being static, and the other dynamic (look up definitions if unclear):
    1.) make the objects in the main class both static and public and access the the objects using a convention similiar to: Main.object; It's important to note that Main is the name of your main class, and object is a static object. There are better ways of doing this by using gettter/setter methods, but I'll omit that tutorial.
    2.) Create a new instance of the main class and access the objects using a similiar fashion: Main myInstance = new Main(); myInstance.myObject;
    You should really use getter and setter methods but I'll omit the code. In terms of which approach is better, step one is by far.
    I don't mean to be condecending, but you should really brush up on your programming skills before posting to this forum. This is a fundamenetal concept that you will encounter time and time again.

  • Call and Execute Multiple Windows of the same VI

    Hi,
    I would like to call and execute multiple windows of the same VI.
    Please take a look for my attached vi, and start from the 2x2.vi, i think you have to re-enter the file path to run (sorry for inconvenience).
    If I click the start button in different sub panels, the sub vi(Temperature Analysis.vi..& etc) should be called out in multiple windows, hold it, and run simultaneously.
    But now the problem is, the sub vi is called out 1 by 1 until it is finished prior the second sub vi is called.
    May I know how to solve that?
    Thanks.
    Attachments:
    My VI.zip ‏173 KB

    Hello TanTan
    1. Open the PopUpmain.vi and select the path of PopUp.vi
    2. Enter the number of popups and run the VI.
    Hope this attached VI will work as per your expection. Please select the less number of instances 
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet
    Attachments:
    PopUpMain.vi ‏12 KB
    PopUp.vi ‏8 KB

  • I want to FaceTime with a friend in Japan.  Can I just call her through my contacts list the same way I would call my friend who live next door to me?

    I want to FaceTime with a friend in Japan.  Can I just call her through my contacts list the same way I would call my friend who live next door to me?

    Short Answer: Yes
    When they set up facetime, they either used an apple ID, or (for iphone only) their phone number.  You call using one of them.  An apple id linked email address in my opinion is simpler, as you don't need to worry about country codes and the like.  (I have never tried to facetime anyone out of the country, so I will admit I am not sure what you do about country codes.)
    These articles are a little dated, but should help you set up your or your friends facetime if you need to.
    Facetime Setup for iphone guide: http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-facetim e-set-up-use-and-troubleshooting-problems/
    Facetime setup for mac: http://simpleleapsoftware.com/blog/how-to-setup-facetime-on-your-mac/486/

  • How to select the objects sharing the same appearance in the same artboard?

    I have several artboards in the file and I want to select all the objects having the drop shadow effect in the artboards I'm working. No matter I use the "Select" in the menu or the "Select similar objects" button in the control panel, it selects all the objects having the same appearance in the entire canvas, not only the one in the artboard I'm working. Any means or there's nothing can do?
    Please help!

    J_Lai wrote:
    yes, that's work and I also tried to lock the objects in another artboard in order to select the objects in the working artboard only. However, I think that's stupid to get it done in this way and Adobe should improve this in the next version.
    This is easy enough to state but if you think this is wrong then you should perhaps suggest a way this feature could be manifested.
    For instance to you this should only effect the current artboard but there will come along another user who will say hey wait a minute I need to select all the drop shadowed objects and remove them now I have to go from atboard to artboard.
    If you see what I mean, II found out that when I find something that is seemingly stupid that in fact there is a reason for it and there has to be a way to describe how it can be improved without breaking what you already have.
    For instance you want it to just effect the current artboard but then there will be those who also want it if it even touches the artboard and those who will want it on a range of atboards and those who will actually want AI to know which artboards you want even without you specifying which artboards. That last one sounds illogical but that is the nature of the problem and the human conditions.
    So though I agree this can be improved perhaps you have an idea how this can work for everyone?

Maybe you are looking for

  • CS4 Master Collection - double trouble

    I bought the CS4 Master Collection in 2009, I then installed it on my work station. Some months later I bought a laptop and then installed the sofware on that as well. After a while I was forced to re-format my work station that had the first innstal

  • Cenvat on Capital Goods

    Hi all, Whenever credit on capital goods need to be availed, you can claim 50% of credit at the time of receipt by specifying 'Yes' in the 'Claim CENVAT. Now I want to know that where I have to setup / define the percentage of CENVAT credit the user

  • Execute external operating system command

    Hi Friends, I have a requirement to run a script file with extention '.PL' on the application server using ABAP. i have sample how to run it in XI. XI3.0 provides a very simple way of handling this using the "Operating System Command" in the File Ada

  • IPad2 failed to complete iOS6 update

    I started to update my iPad2 to iOS6. Part way the the setup it has gone to a black screen and won't progress. If I click the home button it tells me setup is incomplete. I can click Start Over, Wi-Fi Settings, or Continue. It does nothing on anythin

  • How to set character encoding to Greek in a javascript file in Dreamweaver CS4?

    I have a javascript file built with a text editor some time ago, which has Greek characters in one of the variables: 1.) --> var scrollercontent='</font><br><font face="Verdana" color="#333333" size="-1">11-04-2008: <b>ΜΑΝΩΛΗΣ ΜΗΤΣΙΑΣ </b><br><img SR