Trying to create a local instance of the remote object

Hi,
I have a ClassA on which I need to be able to invoke RMI calls. Problem is the interface which ClassA implements does not throw exceptions. To get around this problem I have created a wrapper class ClassWrap which has a ClassA attribute and calls made to ClassWrap are directed to this ClassA object. A facade type design I think it's called.
ClassWrap implements Remote so it can be used as a Remote object.
When I create an instance of ClassWrap and deploy it on a server, my client has no problem communicating with the remote ClassWrap object via a remote stub ClassWrap_Stub.
Problem is I also want my client to be able to use a local instance of ClassWrap. Whan I try to create an instance of ClassWrap in my client I get a remote Exception ... but !! when I have a ClassWrap_Stub object in my classpath then there is no problem creating a ClassWrap object.
Any ideas why this happens?

What you are trying to do should work just fine. Do you have the wrapper class file in your client jar?

Similar Messages

  • Is the Remote Object always a singleton?

    Hi,
    Using .Net Remoting we can export a Remote Objects in three different ways:
    1. Singleton: Same instance of a Server-side object is used by all the clients for all the requests.
    2. SingleCall: Whenever a new call is received, a new instance of the Server-side object is created and reference is passed to the client. Therefore, for each call to the server, the client gets a new instance of the object.
    3. Client Activation: In this, the Client requests to the server for creating a new instance which can be used for multiple calls. The instance activated by a client is not used by other clients. Client-Activated objects can store state information between method calls for its specific client.
    Do we have this options in RMI or the Remote Object must always be a Singleton?
    What I'm looking for is a way to create one instance of the Remote Object (in the server side) to each client that connects to a server.
    thx

    Do we have this options in RMI1 and 3 are available. 2 is not.
    or the Remote Object must always be a Singleton?No.
    What I'm looking for is a way to create one instance of the Remote Object (in the server side) to each client that connects to a server.It's as simple as 'return new MyRemoteObject(...);'.
    For example:
    public interface Login extends Remote
      public Session login(String username, ...) throws RemoteException;
    public interface Session extends Remote
      // your client API here
    public class LoginImpl extends UnicastRemoteObject implements Login
      public Session login(String username, ...) throws RemoteException
        // validate username etc. If OK return a session.
        return new SessionImpl();
    public class SessionImpl extends UnicastRemoteObject implements Session
      // your client API implementation here, also all the server-side state belonging to that client session
    }Note that this is as secure as the login() method. By type safety, nobody can execute Session methods until they have logged in.
    I'm deleting your two other threads.

  • "Trying to create a journal entry of the local BP with foreign amounts" error

    I have an addon that needs to set the Total (LC) field on the invoice form when a Delivery is copied to an Invoice. In this case, it's $169,978.62. The original Unit Price on the row is $7,000.00, with quantity of 5 MT (selling UoM). After populating the line total field through SDK UI, it calculated discount% to be -385.653. When I press Add, it gives me red bar error "Trying to create a journal entry of the local BP, with foreign amounts [message 3530-11]". This BP uses local currency and there is no foreign currency involved on this document. If I perform the same action through normal UI without SDK, I can add the invoice without a problem. I know it probably has to do with rounding, but how can I get past this error if I have to set the line total through SDK?

    Hi Ronnie,
    Glad you have found the issue
    Regardss,d
    Eric

  • I am trying to create a checkbook register from the numbers temple, the instruction says to click on register then click choose; where is choose?

    Where is the choose button when trying to create a checkbook register using the numbers templete?

    I assume you are talking about Numbers.  If you launch you are presented with template chooser. Highlight your template and in the lower right hand corner-->Choose.
    If you are past this point or closed the window you can use the command-shift-N  to open the Template chooser.

  • I have been trying to create an apple ID for the past 2 days and cannot succeed : it states an unknown error has occurred and no ID is created. What to do?

    i have been trying to create an apple ID for the past 2 days and cannot succeed : it states an unknown error has occurred and no ID is created. What to do?

    The internet is the internet. if its not working then its something to do with your not allowing cookies from apple's site or they are having issues.

  • Can I create another RAC instance on the machines already have one.

    Hi:
    I already have an 2 nodes RAC(10.2) ,I want to Know can I create another RAC instance on the same machines. if not why?
    thanks.

    913926 wrote:
    I already have an 2 nodes RAC(10.2) ,I want to Know can I create another RAC instance on the same machines. if not why? Yes - you can run into brick walls too. At high speeds. But heck, is that a good idea? Why would you want to?
    Oracle RAC scales how? By adding more servers (RAC cluster nodes) to the single RAC database.
    What do you want to do? Add more databases to a single server.
    How does that make sense ito performance, scalability, redundancy, availability, management and so on?
    Also consider that a SQL-Server/mySQL database in the Oracle context is a schema. An Oracle schema can be a logical database. Fully self-contained. Fully separated from other logical databases in that physical database. A second or third or one hundredth logical database in Oracle means a second or third or one hundredth new database schema. Not instance. Not physical database.

  • My daughter created an itunes apple id but gave the wrong email so now I can't go to the email and verify her itunes account. I tried to create a new email with the email she put in and I can't because its already taken..,..help

    My daughter created an itunes apple id but gave the wrong email so now I can't go to the email and verify her itunes account. I tried to create a new email with the email she put in and I can't because its already taken..,..help

    Hi JkeeneSoldano,
    Thank you for visiting Apple Support Communities.
    To regain access to your Apple ID, try to reset your password using one of these methods:
    Answer your security questions. Use these steps if you know the answers to your security questions.
    Use email authentication. We'll send you an email that you can use to change your password.
    Use two-step verification. If you set up two-step verification, you can use it to change your password. You just need your recovery key and a trusted device.
    From:
    If you forgot your Apple ID password - Apple Support
    If you need to use the email verification method but don't receive the reset email, see this link for more help:
    If you didn't receive your verification or reset email - Apple Support
    Best Regards,
    Jeremy

  • Select Grant on local Table to the Remote Oracle User

    How Can we Give a SELECT Grant on a Specific Table to the Remote Oracle User.

    IIRC, the remote user accesses local objects via a schema on the local database. That suggests you need to grant SELECT on the local table to the local schema that the remote user connects by.

  • How does the remote object connect to the correct host

    i have had a small doubt on how the remote reference manages to find the correct host to call the subsequent methods after a sucessful lookup.
    given a rebind or bind to the registry, the registry only stores the alias and the remote reference, now imagine a client calling a lookup on the registry would only get the remote reference, and not in which machine the remote object is found.
    what i wanted to know is how does the client or atleast the remote reference returned by the registry correctly connects to the machine where the remote object is located. i dont think its stored in the stub bcos the stub is a complie time stuff.
    i would be pleased to have a comprehensive answer for this.

    The membership in the group communication framework is always accurate and upto date.Up to date to the moment when you check. Not up to date to the moment when you make the RMI call.
    i could basically chk if this ip is available in the membership list.Complete waste of time. It doesn't matter what you check ahead of time, you are still trying to predict the future.
    And you still have to deal with ConnectException etc from the actual remote method call. And the way you will deal with that in your situation is exactly the same as what you were going to do if your ahead-of-time check failed.
    So just catch the exception(s) and deal with the problem there.

  • How to access the remote Objects Without Db_links?

    Hi ,
    I want to know how to access the remote objects without db_link.That is i want to access a object in some other server which has different database.

    SanjayBala, just so you know that it is possible to create a database link in Oracle to non-Oracle databases in some circumstances. Look up Generic Connectivity aslo know as Heterogenous Services. With 11g Oracle has basically renamed the feature and replaced it with somethinkg named ike DG4ODBC.
    I have not spent time studying the details for DB4ODBC but with HS Oracle provided the interface and you had to obtain the necessary ODBC driver on your own. I had Oracle on AIX reading and writing to SQL Server on Windows but the developers chose to write a java program and connect to both via it. On Windows and Linux platforms the necessary ODBC drivers might be available without the requirement to go out and purchase one.
    The Oracle Open Gateway product is an advanced version of the above features with drivers for specific non-Oracle databases included like DB2 or Informix.
    HTH -- Mark D Powell --

  • Can I cache the Remote object

    I am using Stateless session bean. Can I cache the reference of the remote objects to this bean ?
    I read that some containers support the fearture of pre creating the EJB objects in the pool , during startup
    using some custom configuration ( like connection pool ). How is this performed ?`

    I am using Stateless session bean. Can I cache the
    reference of the remote objects to this bean ?No, but you can cache the HomeHandle of the Home interface references - that saves you the overhead of JNDI lookups, which are far more "expensive" time-wise than calling the create method to get the Remote implemenation.
    I read that some containers support the fearture of
    pre creating the EJB objects in the pool , during
    startup using some custom configuration ( like connection pool
    ). How is this performed ?Ask your vendor - it's vendor-specific.

  • Can we cache the remote object?

    hi,
    can we cache the remote object?
    is this right way of doing?
    please suggest me
    regards
    crr

    Yes, caching EJBHome, EJBObject, and Remote business references is fine. They can also
    be portably stored in an HttpSession. However, when caching in the web tier you must still
    be careful to prevent concurrent access to the same stateful session bean. The fact that
    remote references to stateful session beans can be cached does not guarantee they can
    be accessed by more than one client at a time.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • The Remote object used on proxy server?

    Hai,
    Iam attended for one interview they asked me one question
    could send me the answer
    The Remote object used on proxy server?

    That's not even a question. What did they really ask you?

  • IWork Numbers program. I am trying to create a 'Master Table'. The table will be used on numerous sheets, when cells altered on the 'Master' it will show on all sheets using the Master table. Is this a possibility??

    iWORK NUMBERS
    I am trying to create a 'Master Table'. This table will be used on numberous sheets, however not all. Items entered into the cells in the Master Table will then reflect in the used sheets that have the Master Table linked.
    On the individual pages however, they will be able to be altered purely for that page.
    Hope I have explained myself clearly,
    Would appreciate any help,
    Cheers,

    Hi Hilary,
    The formula in the Index column of the Main table is:
    E2: =IF(A,MAX($E$1:E1)+1,"")
    Fill down to the end of column E.
    The Breakout table contains a single formula:
    A2: =IF((ROW()-1)>MAX(Main :: $E),"",OFFSET(Main :: $A$1,MATCH(ROW()-1,Main :: $E,0)-1,COLUMN()))
    Fill down and right to fill the table.
    For multiple rooms (with different data transfered to each) you'll need a column of checkboxes and a corresponding index column for each room.
    The index columns can be hidden.
    Contents in individual cells in the breakout tabel(s) can be entered directly, replacing the formula. To retun to the calculated result, select a cell adjacent to the one where text was entered, and drag the Fill control handle (small circle, bottom right of the selection rectangle) to fill the formula back into that cell.
    Regards,
    Barry

  • Uln_register error when trying to create a local yum repository

    trying to setup a local repository on ol6 first time following this linkhttp://www.oracle.com/technetwork/topics/linux/yum-repository-setup-085606.html, and got the following message when I run uln_register to register. I know i need to make some change in /etc/sysconfig/rhn/up2date, but don't know what needs to be done. I added my company's proxy in enablehttp=xxx, but still not working. Please help me out. thanks.
    We can't contact the Unbreakable Linux
    Network Server.
    Double check the location provided - is
    'https://linux-update.oracle.com/XMLRPC'
    correct?
    If not, you can correct it and try again.
    Make sure that the network connection on
    this system is operational.

    in command line, adding proxy works. Thanks.
    # uln_register --proxy=proxy_hostname:port_number                                                                                                                                                                                                   

Maybe you are looking for