RMI interface/packaging issue

Hi
I am new to RMI and almost new to Java, so bare with me.
I am doing a project where I use RMI to access a database on a remote server from a client. As far as I understand the interface MUST be located at both the client pc and the server pc. Am I right?
My interface must implement classes corresponding to the tables in the server database which the client is to access, since the interface methods return ArrayLists containing objects of these "table-classes".
I do this, so that I can wrap each tuble/row into an object of a class corresponding to the table from which I queried the data.
Example from one of my interface methods:
public ArrayList<PatientData> getMedicineUsage(String patientID) throws RemoteException;There are eight such "table-classes", thus eight tables placed in a "database" package on the server.
Do I really have to place a package containing these "table-classes" (eg. PatientData) on BOTH the server (package hierarchy program::server::database) and the client (package hierarchy program::client::database)?
Am I doing it 'all wrong', or is the solution in fact to create a "database" package on the client as well?
If you miss any information, please tell me, and I will write back right away.
PS. I use the RMI because my clients are not allowed to access the database directly.

But how do I do this practically?Nobody cares what exactly you call the package that contains the remote interface but it has to be the same at server and the client and it has to be deployed at the server and the client. It has to be the same code. Not a copy in a different package. Two classes in different packages are different regardless of their names or anything else.
1. As I understand your answer, I should only have ONE package containing my "table"-classes located on the server, right?Yes.
2. Am I right about the interface that it should be placed on both the client and the server, but only implemented by the server?Yes.
3. How do I share the "table"-classes within my program::server::database package with the remote client as you proposed, so that the client "knows" the datatypes (eg.ArrayList<PatientData>) required by the interface?See above.

Similar Messages

  • Rmi interface not loading when invoked from class in package

    Hi, It would be a great help if you could help me out with the following problem:
    The RMIClient fails to detect the remote object interface in the current directory when i place it within a package.
    1) I tried placing the remote object interface in the same package - this didn't change the error output.
    2) I tried to import the remote object by placing the parent's parent directory in the classpath - a new error popped up saying the file did not contain any class! Since its an RMI interface extending remote, it dosen't involve a class directly.
    The following is my client code:
    package java.util.logging;  // Without this line, this client works fine.
    import java.rmi.*;
    import java.rmi.server.*;
    import java.io.*;
    import java.util.logging.*;
    import logTest.RMIChannel;
    public class RMIChannelClient
       public static void main(String[] args)
          System.setProperty("java.security.policy", "client.policy");
          System.setSecurityManager(new RMISecurityManager());
          String url = "rmi://acrux.cis.ksu.edu/";
          LogRecord record= new LogRecord(Level.ALL,"");
          try
             RMIChannel rc = (RMIChannel)Naming.lookup(url + "RMI_Channel");
          rc.sendRecord(record);
          catch(Exception e)
             e.printStackTrace();
    }The following is my interface extending remote:
    //package java.util.logging;  // I tried adding and removing this line but to no avail
    import java.rmi.*;
    import java.util.logging.LogRecord;
    public interface RMIChannel extends Remote
      String getDescription() throws RemoteException;
      void sendRecord(LogRecord record) throws RemoteException;
    }Could anyone suggest a solution to this issue?
    Thanks.

    ok. i was hoping to write my own logging class (extending upon sun's classes). while doing this, i found that LogManager.getStringProperty() is not a public method and cannot be accessed outside the java.util.logging package and the compiler complained. So i tried placing my file in java.util.logging package and it compiled fine. Is there a way i can use a method thats not declared public without importing its package?

  • How to get standard oracle API or Interface package in oracle apps

    Hi guys,
    Need ur help........plz tell me how to find the standard oracle API or other package on server. Actually I need standard Interface package of Requisition Import program API plz give me exact path to finding standard API or interface pkg.......ASAP and also give the interface pkg name of Requisition Import in purchasing.
    it's urgent plz do needful...........................................
    Thanks,
    abh...................
    Edited by: 811373 on Jun 4, 2011 12:54 AM

    I want to find all API related to PO Requisition special Requisition Import conc. program API ...plz tell how can get it.
    Actually I want to design custom interface on the basis of standard Requisition Import api so, plz give me sql script for find those api.From iREP website, navigate to the PO module and check the list of APIs.
    Or, you could enable trace/debug for the concurrent program and generate the TKPROF and this will show you the API used by this program.
    FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]
    How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
    Another option is to open the report using reports builder and check the code.
    Thanks,
    Hussein

  • In PP Interface related issues the role of functional consultant

    In PP Interface related issues what is the role of functional consultant .  what is the approach steps to analyse and resolve the issues  in XI, interface, idoc, etc.,

    For issues relating to interfaces, a functional person would need to diagnose what is causing the issue & thereby informing the technical person where to fix it, if the issue is due to system setup.
    As regards to the steps, I just wish there was a manual which read something like
    10 steps on how to analyze....
    unfortunately there is none that I have come across or even if one is ever written on those lines will be very specific, so not much of use for your need. A good approach would be to have a clear understanding of what the interface is supposed to do, which would assist you in fixing the issues.

  • Interface Package CHECK

    I expose my problem.
    I create a specifical hierarchical structure package on CRM7 for test Interface Package Check.
    This is a representation of my hierarchical structure package :
                                                                P1 (Structural Package)
                                           P1_1 (main package)                  P1_2 (main package)
              P1_1_1 (Normal package)                       P1_1_2 (Normal package)
            (I1 interface package with                         (use I1)
            Data element E1)                                       Use E1 and E2 in a Structure S1
         Define Data element E1 et E2                       Use E1 and E2 in a program Prg1
    When I activate my structure S1 I have the error of use E2. It's OK.
    When I use extended check code with program Prg1 I haven't error on use E2.
    When I use a standard element  in my program and I use extended check code I have an error on use the standard element when I don't add the package interface where standard element is declared.
    Have you any idea which explain the difference on check with my specific data element and with standard data element ?
    Thanks for your response.

    Hi,
    first of all, you have to check if th ystem-wide package check is switched on. Check in transaction SM30, maintenance view PAKPARAM_V. GLOBAL_SWITCH must be equal to 'R3ENTERPRISE'.
    I don't understand the behaviour you describe. The package error must be reported either for both development objects in the consumer package or not at all.
    Regards,
    Stefan

  • Interface scripring issue

    Hi all.
    Just playing with extendscript toolkit and ps cs5, i Have an issue with javascript based panels.
    Both my attempts and toolscript samples ebete a New window object is created as panel or window disappear as Sion as shown.
    Otherwise modals persist (the script us dispenser and my window not garbaged).
    How to solve the problem?
    ThNk's, Andrea

    Oh yeah the mouseover->layer creation is not a problem but only a practical
    situation. The answer is "JS cannot be used to create panels"... thank's
    it's as i doubt :/
    A solution could be using Adobe Configurator 2.0 to draw the panel and JS
    for code automation... i just discovered it on Labs: i'll try for a while.
    2012/1/18 c.pfaffenbichler <[email protected]>
       Re: interface scripring issue  created by c.pfaffenbichler<http://forums.adobe.com/people/c.pfaffenbichler>in
    Photoshop Scripting - View the full discussion<http://forums.adobe.com/message/4148576#4148576>

  • Urgent- returnable packaging issue

    Hi guys,
    am working on returnable packaging issue
    Scenario:If the customer does not returns the preslings then sales order is created for presling and issued to customers with proper invoicing
    am creating a sales order with order type CLN(customised for returnable packaging) and i have give material with qty 1, immediately the system is taking me to availability overview screen where it shows the following.
    Confirmed quantity: 0
    Dely proposal: Not possible.
    i have checked for material in MMBE and see the stock is much sufficient. y am i getting this? please answer immediately.
    thanks in advance.
    kumar.

    Hi pathik,
    the system is already configured and i have to give UAT to the users. i have done according to what UAT says. now plz suggest me what i should i do in this scenario? moreover, shld i use two line items i mean the main item and also the sub item? this is the first time am working on returnable packating so plz help me in as detail as possible.
    u can also plz send me the doc with screen shots(if possible) to this id
    [email protected]
    thanks in advance.
    kumar

  • Interface freeze issue with Flash Projector

    I am facing an interface freeze issue with Flash Projector running a flex state based application. A Flash Projector exe was generated from a standalone flash player ver 10.2. The target machine on which the problem occuresd has 10.3.
    Basically "screen freeze" means that the user interface is running as usual on Flash Player, but it's not responding to any user input (like button presses). But if we alt-tab to another application, the state changes in the Flash player. There is display with buttons on the screen, but touching the buttons or doing anything else - it did not respond.  Rebooting the computer fixes the problem.
    Can you suggest why this is happening? Is there any known bug in Flash Player.
    The problem is this is being hard to reproduce on the developer workstation as it doesn't happen always. But it happens quite often on the target machine running an Intel Atom N270. What debugging steps can you suggest?
    Problem Description : http://www.youtube.com/watch?v=z25oV9QWRyk

    First, thanks for the video.  Having this always makes it much easier to understand the problem.  A couple of recommendations.  First, if you feel like this might be a player bug, please add a new bug report over at bugbase.adobe.com and if possible please include any sample code or swf's that can help us reproduce the problem internally.  Linking the video would also be great.  In addition, would you mind reposting this question over on the Flash Professional forums?  This forum is primarily for end users, the Pro forums will get you in touch with a wider developer audience who might have additional feedback.
    Thanks,
    Chris

  • Interface Scenarios - Issues / Messages tab

    Hi,
    How can I activate the Issues / Messages tab of the Interface scenarios? The tab is available but I cannot enter any issues or messages as  I can do under Configurations.
    Any inputs are appreciated.
    Many thanks,
    Dharmi

    Hi Dharmi,
    I see what you mean but this is not possible for this node. Even if you create subnodes under Interface Scenarios, Issues/Messages cannot be entered here as per other nodes.
    Possibly you could try linking a node or document to the Interface Scenarios node and assigning an Issue/Message to the original node above.
    Regards,
    -Rohan

  • Link to download the RMI optional package reference implementation

    Hi,
    I could not find any links for downloading the reference implementation of the RMI optional package. Is this package available for download? Pls give me the link if you find the same. Thanks in advance..
    regards,
    Anand
    Edited by: Anand.Raman on Apr 22, 2009 2:48 AM

    This is a deprecated URL that will be retired soon.
    You can download this RI here:
    https://java-partner.sun.com/support/login.action
    Assuming that you have a Java Partner login.

  • Interface freezing issues and hard drive replacement

    Hi, I have an Imac. It was getting slow and kept getting a long time lag on typing etc. So I bought snow leopard, backed up and wiped and reinstalled the lot. Then it started freezing - from moment one (literally). I could move my mouse and stuff was still running but I couldn't click on anything or select anything or get any response at all. Sometimes it would "white out". Only solution was forced reboot.
    So I called apple, rand disk utility, kept showing disk errors - file 334576 should be file 334575 etc. Fixed them - they came back after each freeze. So they said its a hardware error.
    Took it to shop. They reinstalled and no errors showed in the tests - but then it kept freezing when they tried to use it. Eventually they settled on a hard drive error - fitted a new one (money paid), it didn't freeze in 48 hours of tests and use. They said that if it keeps freezing it must be an intermittent motherboard problem. TBH I'm not convinced because, though it was slow before SNOW, it wasn't freezing!
    Anyway, I took it home, put my stuff back on, was fine -
    next day, froze twice in 2 mins - once, rebooted, then again, froze instantly before dock had fully popped up! (It seems to freeze in movement a lot - like task switching or dock popping etc).
    It was then that I stumbled upon this term online "interface freezing issues" which seems to have been an initial issue with the imac, and there were some early posts about snow too. The problem is exact, if you minus this hard drive error issue, which MAY have been separate problem (cause by shorts caused by excessive cat hair inside computer).
    I have read that external drives etc can be a cause, but not heard usb mentioned, only flywire - I have a dual USB port external drive for time machine. But really, this freezing is entirely since snow.
    Can I solve this problem?
    Do apple acknowledge this problem?
    SHould I uninstall it and ask for my money back?
    I would like solid, conclusive answers if possible - from people with direct experience. I work online and am also a writer - i am BEYOND dependant on this mac (especially as my partner is seriously ill and I am the sole income just now).
    thankyou for reading
    Anna
    Anyway - ran disk utility - but no errors this time. Which is good.

    As for the taking apart part. I'm not too worried. I've read quite a bit on the subject and watched a couple youtube videos. Also, i've taken a iBook G4 apart to it's core to replace that hard drive and did it without a hitch.
    I'm a little unsure about the interface for the Optical Drive. From what i've read the HD is a SATA connection. While, the Optical Drive connection is IDE. Is that normal for one computer to have both?
    I found two drives both around $100 for each. One is SATA the other is IDE.
    SATA
    http://www.pioneerelectronics.com/PUSA/Products/BusinessProducts/Blu-rayDisc+DVD Writers/DVDComputerWriters/DVR-TS08
    IDE
    http://www.newegg.com/Product/Product.aspx?Item=N82E16827118021
    Also, the HD from Newegg that I posted above, runs at 3GB/s. I've remember reading somewhere that my iMac will only run the drive at 1.5GB/s. Is that true?

  • Jeode and CDC RMI optional package?

    Does anybody know if Jeode implements the RMI optional package specification for J2ME Personal Profile 1.0? If they don't, is there any alternative to Jeode that does? Also, have they implemented the JDBC optional package?

    WSDD contains a beta version of the RMI optional package with the certified one awaiting submission to the web updates (Eclipse way for getting new features).
    The JDBC optional package (JSR-169) has not submitted a final spec, RI or TCK and therefore IBM cannot provide an implementation. Once a TCK is available there will likely be and implementation and a driver from the DB2 group.

  • I can't install 10.5.2 because of an installer package issue. Can anyone help me out?

    I recently bought the Iphone 4S and wanted to sync my phone to my PC. I was prompted to download the latest version of Itunes 10.5.2 but the installation was interrupted due to a "installer package issue".  Has anyone encountered this issue and resolved it accordingly? Any help would be greatly appreciated.

    If you have more than one account now (e.g., one created during the install, and one/more restored from a back up), have you tried installing the combo (110 MB) update from the account you created during the erase & install (the very first admin account created)? If not, try logging into that account and try installing the combo update and see if the problem goes away. Then do a permissions repair (it might take a while).

  • What relationship between RMI interface and stub?

    Hi:
    I think the stub is enough to remote call, why to use RMI interface? what relationship
    between RMI interface and stub?
    Regards!
    Stive

    Hi,
    Stub is merely a proxy for server , it doesn't contain any declarations of
    remote methods. to which it is being responsible for .
    where RMI interface is one which contains signature of the Remote methods which
    throws Remote Exception.
    Regards
    Karthikeyan Gangadharan
    SIP Technologies, Chennai
    E-mail-ID: [email protected]
    "Stive" <[email protected]> wrote:
    >
    Hi:
    I think the stub is enough to remote call, why to use RMI interface?
    what relationship
    between RMI interface and stub?
    Regards!
    Stive

  • RMI Optional Package

    Hi,
    I'm trying to write up a small application on a Pocket PC that uses RMI to connect to a server. I have installed J9 with full CDC support on the pda. I was under the impression that the personal profile it supported also bundled the optional RMI package but after looking at the classes i had available to me i soon relised that i had next to nothing in my java.rmi and java.rmi.registry packages. Mainly I had no java.rmi.Naming class for lookups on the client.
    Is anyone able to clarify whether the optional RMI package is cut down so that you need to develop your client app different to usual (I.e. not use Naming.lookup(url) to locate remote objects) OR if the regular java.rmi.Naming classes should come in the RMI OP and therefore i most likely do not have the RMI Optional Package included with my J9 runtime? If the later is so, where can i get a RMI OP from, sun's one seems to be for linux kernel 2.2 +.
    My WebSphere version is 5.7.1
    Cheers.
    Walt.
    ps. If the RMI OP is cut down so much that it doesn't use the Naming class to look up the registry for remote objects, how is it supposed to be done?

    Thanks, I managed to include the RMIOP jar. I have a problem, though: when I build and run using the ive-2.2 JRE it works fine with the RMI connection, however when I build for the PDA (an HP iPAQ hx4700) it says "Exception in thread main java.lang.SecurityException: java.rmi.Naming - protected system package 'java.rmi'
    In other words in only works with the local JRE, but not with the PDA JRE. I did embed the RMIOP classes in the build, so the problem is not here. Any ideas of why it would give that error? Thanks in advance.

Maybe you are looking for