Newbie java - rpc question

we have the following situation: old server written in C++ running on a defined set of platforms, using rpc to expose its services. modifications of the server should be avoided. what would be the best way to access rpc from java? as I see it (and considering a defined and small set of platforms) implementing rpc calls in C-functions and calling them from java would be a good solution. are there any better ways?
thanks in advance
milan

thanks.
I have one more question regarding this configuration:
lets say, i have already developed rpc-enabled-classes. now, if i would like to use these classes in a servlet/jsp-based layer running on a different machine (with a possible firewall between them) then I would implement an RMI server executing rpc-classes and access those classes from servlet/jsp over RMI, right?
my first idea was to use EJB with rpc-classes, but EJB do not support native methods.
are there any alternatives to this?

Similar Messages

  • Flash/java remoting question

    Hi,
    i'm new to flash remoting and am finding using it with java
    quite troublesome. I've also found using the FileReference class
    troublesome if you use java. my question is can you somehow tie the
    remoting functionality to the FileReference.upload method
    fucntionality??
    thanks in advance

    I will use the program with photo detector to test
    the response time of the LCD screenWhy Java?I second that. With a test like that, you want to reduce the experiment down to a single variable, in this case the lcd response time. Using a java program to feed the monitor input introduces a second variable, the response time of the program. The java program's timer may not be exact, the components may not be repainted completely quickly enough, etc. If this is just for your own amusement, maybe that doesn't matter, but if you want your results to have any reliability, you'll need a more accurate and controllable input source.

  • Newbie Java Help

    Hello board! Have a Java Servlet question for you.
    I am creating a search page where the user can search for a music artist, and will get results. When the results are shown, the user can click on a link and it will bring him to a page where there is more info on that artist.
    Also, is there a way where if the user clicks on a link, i can retrive date from that link he selected. For example, there are three links on the page (they all go to a page "view.java"), and when the user clicks on link #1, it goes to view.java and the data in the HttpSession is brought with it.
    Thank you for your help, and let me know if you need more info.

    out.println ("<a href='http://localhost:8080/Artists/servlet/ArtistView?artistname='" + myNO.artist_name + ">" + myNO.artist_name + "</a><p>");
    yes that looks right, to make sure, place your mouse over the link and check the address bar on the bottom on the screen, suppose your artist name was soni29, then you should see on the bottom:
    http://localhost:8080/Artists/servlet/ArtistView?artistname=soni29
    something like that, this means go to ArtistView and allow it to get the variable artistname which has soni29 as it's value.
    You can place the code
    HttpSession thisSession = request.getSession("true");
    String chosenArtistName = request.getParameter("artistname");in the page you want to go to, where is your link taking you. if ArtistView is a servlet or jsp? place it there. if ArtistView is a servlet then above is ok, else if it's a jsp you don't need
    HttpSession thisSession = request.getSession("true");
    i believe HttpSession is an implicit object in a jsp page so it's already there, unless you set the page directive to false of the session on the page, but by default session object is already there in a jsp page. if it's a jsp page make sure your link has .jsp on it, like
    out.println ("<a href='http://localhost:8080/Artists/servlet/ArtistView.jsp?artistname='" + myNO.artist_name + ">" + myNO.artist_name + "</a><p>");

  • Can I post here(Acrobat Windows) Java Script questions here?

    Hello
    Can I post here(Acrobat Windows) Java Script questions here? If not, wht is the correct forum?
    THank you

    Back up and down to Acrobat Scripting. Bot Windows and MacIntosh Acrobat versions use the same JavaScript.
    If you are using LIVECYCLE DESIGNER use their forums. The JavaScript syntax and objects are different in LIVECYCLE DESIGNER!

  • Newbie's java function question

    Function to convert Ascii code to character,
    example in VB is "Chr(13)",
    then how about in Java or Javascript?
    Thank you

    You can convert the ascii value to a character by simple casting.
    example:
    char a = 'a';
    int b = (int) a;
    //b will equal 97
    int c = 97;
    char d = (char) c;
    //d will equal 'a'
    I hope this helps.

  • Newbie Java Question

    Hi
    I am running jasper reports through an oracle DB connection and am having some problems with a piece of Java code in the report. The code is used in one of the variables of the report and within the code I am manipulating a user input parameter for display purposes. The user would put in a 14 digit code to restrict the report results to this code but one of the requirements for the report is to display the code restricted by the user in a spaced format on the report heading like A012 123 123 123 3 as per requirements. The variable is used as part of the overall report header message and the expression for this variable is as below:
    ($P{Inputparam}.replaceAll( " ", "" ).substring( 0, 4 )
    + " " + $P{Inputparam}.replaceAll( " ", "" ).substring(4, 7)
    + " " + $P{Inputparam}.replaceAll( " ", "" ).substring(7, 10)
    + " " + $P{Inputparam}.replaceAll( " ", "" ).substring(10, 13)
    + "  " + $P{Inputparam}.replaceAll( " ", "" ).substring(13, 14))The user could put in the code with no spaces or multiple spaces and so it is required to remove all spacing from the parameter number then reapply the correct spacing for each part of the code. The problem I am having is handling when the user clears the parameter input value, which leaves an empty string, then the report falls over because the code above is currently not handling an empty string.
    I would appreciate any suggestions to be able to handle an empty string within the code above.
    Thanks
    User605593
    Edited by: user605593 on May 26, 2011 3:03 AM

    I would appreciate any suggestions to be able to handle an empty string within the code above.Not sure if I understand you correctly.
    Do a null check (var != null) and use the String.isEmpty() method to do validation of empty strings.
    But I think you also need to validate the length of the user input after removing the white spaces. Your code will not work if the user gives a 13 char input.

  • Some more newbie java questions

    Ok, so I have to write a method that takes a positive integer parameter and returns the number that results from adding up the digits of the parameter. Now, I have NO idea how to approach this, can anyone help me please?
    As well, how can I find out how long an array is without actually being told? Because for another assignment, I need to write a method that compare's one array to another; however, it must be dynamic in that the method must be able to compare any array that is greater then one. So, I know that you must use a loop to compare the individual element's of the array's; however, how will I know when to stop the loop? In other words, what should be the condition to stop the method?

    Ok, so I have to write a method that takes a positive
    integer parameter and returns the number that results
    from adding up the digits of the parameter. Now, I
    have NO idea how to approach this, can anyone help me
    please?Without looking at the api, so treat this as pseudo-code...
    int number = 84267; // whatever
    String numberAsStringOfDigits = String.valueOf(number); //"84267"
    int sum = 0;
    for (int i = 0; i < numberAsStringOfDigits.length(); ++i)
    sum += Integer.parseInt(numberAsStringOfDigits.substring(i, 1));
    As well, how can I find out how long an array is
    without actually being told? Because for another
    assignment, I need to write a method that compare's
    one array to another; however, it must be dynamic in
    that the method must be able to compare any array that
    is greater then one. So, I know that you must use a
    loop to compare the individual element's of the
    array's; however, how will I know when to stop the
    loop? In other words, what should be the condition to
    stop the method?Let's say you have an array: int[] array = new int[123];
    int lengthOfArray = array.length; // it's 123 in this case

  • Importing Java Class Question

    Hello,
    Sorry for such a newbie question and such a long post, I did remember how to do this before but now I can't for the life of me remember. Anyhow, I have a simple question about importing custom-made java classes, from another directory in the windows operating system. I have the classpath set, and also I realize that because the two files below are in the same directory theres no need for an import statement as Java will look for the class in the same directory.
    But I would like to know how the import statement is suppose to look to import a custom made java class from another directory, (assuming of course that I set the correct classpath)
    here's the java class location:
    c:\school\csc365\narcus.java
    //narcus.java
    import java.io.*;
    class narcus implements Comparable
    String firstName = "firstName";
    String lastName = "lastName";
         public narcus()
         firstName = firstName;
         lastName = lastName;
         public narcus(String f)
         firstName = f;
         lastName = lastName;
         public narcus(String f, String l)
         firstName = f;
         lastName = l;
    public String getFirst()
    return "first..";
         public int compareTo(Object e)
         return 1;
    Here's the location of the driver program thats suppose to use the narcus.java class
    c:\school\csc365\test.java
    //test.java
    //import statement? maybe import "c:\\school\\csc365\\*"; ?
    import java.io.*;
    class test
    public static void main(String[] args)
         narcus jim = new narcus();
         System.out.println("omg\n");
         System.out.println(jim.getFirst());
    And also, here is my classpath:
    PATH=c:\school\csc365\;c:\school\
    The classpath also points to the jdk libraries and few other directories but I didn't write that above, as it probably isn't relevant.
    I've tried the following import statements.
    import "c:\\school\csc365\\narcus.java";
    import "narcus.java";
    import "c:\\school\\csc365\\*";
    But I keep getting an error that says:
    test.java:1 <identifier> expected
    Any help is appreciated!

    Hi Folks,
    I am new to this forum, heard that interesting discussions always happens on this forum so immediately registered,don't want to miss any oppurtunity to participate in discussions.
    I have pretty much basic question regarding compiling and exceuting files in different packages.I have the following directory structure
    C:\Projects\WDPROEast\Development\CommonService\Code\Java from where java files stored in different packages as follows:
    com\wdpro\commerce\common\crm\dae\nautilus\adapter directory has java files in com.wdpro.commerce.coomon.crm.dae.nautilus.adapter package.
    com\wdpro\commerce\common\dae\exception has java files with package named com.wdpro.commerce.common.dae.exception.
    com\wdpro\commerce\common\dls\exception has java files with corresponding package name.
    com\wdpro\commerce\common\dto has java files under proper package name.
    com\wdpro\commerce\common\exception has java files with appropriate package name.
    com\wdpro\commerce\common\util has java files with package name. I am starting at Java Directory,want to compile and run file named a.java in com.wdpro.commerce.coomon.crm.dae.nautilus.adapter package with having all other java files on classpath as follows
    so I issued command for compilation as follows C:\Projects\WDPROEast\Development\CommonService\Code\Java>javac com/wdpro/commerce/common/crm/dae/nautilus/ada
    pter/a.java com/wdpro/commerce/common/crm/dae/nautilus/adapter/NautilusServiceUtility.java com/wdp
    ro/commerce/common/crm/dae/nautilus/adapter/URLReader.java com/wdpro/commerce/common/crm/dae/nautilus/adapter/
    b.java com/wdpro/commerce/common/dae/exception/*.java com/wdpro/commerce/common/dto/*.java
    com/wdpro/commerce/common/exception/*.java com/wdpro/commerce/common/util/*.java com/wdpro/commerce/common/dl
    s/exception/*.java It compiled greatly but when I issue command to run a.class file as
    C:\Projects\WDPROEast\Development\CommonService\Code\Java>java com/wdpro/commerce/common/crm/dae/nautilus/adap
    ter/UtilityAccesssit's giving following exception
    Exception in thread "main" java.lang.NoClassDefFoundError: com/wdpro/commerce/common/crm/dae/nautilus/adapter/
    UtilityAccesssbut when I run a.java with the following command
    C:\Projects\WDPROEast\Development\CommonService\Code\Java>java com/wdpro/commerce/common/crm/dae/nautilus/adap
    ter/UtilityAccess com/wdpro/commerce/common/crm/dae/nautilus/adapter/NautilusServiceUtility.java com/wdpro/com
    merce/common/crm/dae/nautilus/adapter/URLReader.java com/wdpro/commerce/common/crm/dae/nautilus/adapter/Nautil
    usAccessUtility.java com/wdpro/commerce/common/dae/exception/*.java com/wdpro/commerce/common/dto/*.java com/w
    dpro/commerce/common/exception/*.java com/wdpro/commerce/common/util/*.java com/wdpro/commerce/common/dls/exce
    ption/*.javaSo my question do I need to add all required java files to path when required class files are under different packages?is it manadatory.
    I hope you understand my question,pass me any comments you may have.
    Thanks alot,
    Anu

  • XP Newbie Java P. & JRE Confusion Updates & Error

    Hi!
    I posted this in TechArena, and received a post in reply that suggested I should post here instead...
    I'm an eternal newbie with computers though I never stop trying to learn. I've looked through many posts & don't see an answer to my questions, so I hope this is the right place to ask them.
    I have a Dell Inspiron 1300 laptop with XP Home v. 5.1.266. I use Firefox and AVG. My computer was getting slow and in the last few days some programs started crashing. Today Corel Photo Album crashed. In trying to google the error report I found something mentioned about Java needing old versions deleted, so I checked mine. And this is where I got confused.
    Firest of all, I don't understand what the difference is between "Java Platform" and Java Runtime Environment" and I don't understand which version I should have of each. What I do have is:
    Java 2 Runtime Environment, SE v1.4.2_03
    Java ™ 6 Update 14
    Version 6.0.140
    Java ™ 6 Update 7
    Version 1.6.0.70
    Could someone one tell me what I should have on my computer?
    Also, I read in a post that one shouldn't install an update until the old versions are deleted, yet in another post (somewhere) it said to update and then delete the old versions. I don't know which to believe. Could I get some advice on which is correct?
    Thank you very much!
    dorij

    Thanks for the advice. I did what you said. Then Spybot did a whole scan which took a while. When it returned the computer to me, all the versions of Java were gone from Add/Delete programs. I decided to do a search on "java" just to see what came up. A huge list came up; things like Java Plug.doc, java_install_reg.log, a folder labeled javaws thats located in Sun\Java\Deployment. I'd copy the list, but I don't know how. There are about 89 items on the list.
    Should these files be there? I haven't yet reinstalled the correct update.
    Thanks again.
    dorij

  • Plzzz write prog to this simple java threads question

    Write a program in C to create four processes. The original processes creates
    two children before it prints out "PARENT". The children processes print
    "CHILD1" and "CHILD2" respectively. The first child process creates a child
    process that prints out "GRANDCHILD".
    Note: The output must be guaranteed to print out in the following order each
    time it is executed:
    GRANDCHILD
    CHILD2
    CHILD1
    PARENT
    a. Write the program using C or C++ and forks to create the children processes.
    b. Write a second program using Java and Threads for the children processes.
    The output statements for CHILD1, CHILD2 and GRANDCHILD must come from print
    statements in the run method of the thread.

    Most people here will not do your homework for you. If you post a reasonable question that shows you've made some effort, and what the results of that effort were, and provides details about what parts you're having trouble with, then somebody will probably provide guidance so that [you can complete the work.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Simple Java Coding Question

    I know this is a simple question, but I can't search for the answer to this because it involves syntax that Google and the like don't seem to search for..
    I am trying to figure out some Java code that I have found. I would like to know what:
    a[--i] and a[++j] mean.
    My first thought was that they meant to look at the position in the array one less (or more) than i (j). But that doesn't seem to be the case. A is an array of Strings, if that matters...
    Thanks for you help.

    muiajc wrote:
    I know this is a simple question, but I can't search for the answer to this because it involves syntax that Google and the like don't seem to search for..
    I am trying to figure out some Java code that I have found. I would like to know what:
    a[--i] and a[++j] mean.
    It mean increase/decrease the int i/j by 1. This is done before it gets you the value of a[]. for example if i=5 and you said a[--i] it is really a[4] and i is now equal to 4;

  • Simple Java EJB question.

    When it comes to EJB v3 Remote and Local interfaces,
    (With JBoss EJB Container Software in mind, for this question,)
    -Does the Remote interface for the EJB include method signatures from the Bean class
    -that are to be seen
    -that are to be hidden?
    -Does the Local interface for the EJB include method signatures from the Bean class
    -that are to be seen
    -that are to be hidden?
    Which is which for
    -EJB 2.1 ?
    -EJB 3.x ?
    - is EJB 3.x reverse compatible in that it allows use of the javax.ejb.* interfaces,
    and would accept a EJB 2.1 approach, or does it force one to use Annotations
    exclusively?
    Edited by: Zac1234 on Jul 21, 2010 5:21 PM

    muiajc wrote:
    I know this is a simple question, but I can't search for the answer to this because it involves syntax that Google and the like don't seem to search for..
    I am trying to figure out some Java code that I have found. I would like to know what:
    a[--i] and a[++j] mean.
    It mean increase/decrease the int i/j by 1. This is done before it gets you the value of a[]. for example if i=5 and you said a[--i] it is really a[4] and i is now equal to 4;

  • Simple Java Sound Question...

    Can I draw waveforms while capturing data? If yes, how. If no, why.
    Thanks. I need the answer ASAP, please help.

    Hi nfactorial,
    Can I draw waveforms while capturing data?If you would like to do that in Java you would need to know about how to use the Java language in general and especially about the Java Sound and Java2D APIs.
    If yes, how.It would be too much to explain to answer such a general question. A general answer is, you need to use the Java Sound API to capture the data for which a waveform should be drawn. The Sound API delivers data as a stream of bytes typically encoded in pulse coded modulation (PCM) format. The data stream has digital samples each representing a level of sound pressure for a certain point in time. The stream of samples in the amplitude/time domain need to be transformed to a spectrum of samples in the amplitude/frequency domain, i.e. a number of PCM samples need to be mapped to the frequencies that should be displayed. This is done with the fast fourier transformation algorithm. Each set of amplitude/frequency values can then be displayed as a waveform by using some line drawing logic. The entire process would need to run constantly, i.e. as bytes are received from the sound data stream transformation and drawing is triggered.
    Related readings:
    Java Tutorial
    http://java.sun.com/docs/books/tutorial/
    Java Sound Documentation
    http://java.sun.com/j2se/1.5.0/docs/guide/sound/index.html
    Java Sound API Programmer's Guide
    http://java.sun.com/j2se/1.5.0/docs/guide/sound/programmer_guide/contents.html
    Java Sound Resources
    http.//www.jsresources.org
    Java 2D Graphics Tutorial
    http://java.sun.com/docs/books/tutorial/2d/index.html
    Wikipedia on fast fourier transformation
    http://en.wikipedia.org/wiki/Fast_fourier_transform
    HTH
    Ulrich

  • Simple java pgm - question

    Hallo,
    to the following pgm I had question:
    static void printPrimes (int max) (= wavy bracket;
    boolean(should be angular brackets) sieve = new booolean (angular br max+1
    angular br)
    int i,j;
    for (i=2; i = max;i++)sieve(angluarbr i angular br)= true
    i= 2
    while (i= <= max;) (=wavy bracket Out.println (i+ " "); // is prime
    for (j=i; j <= j+i) sieve(angular br j angularb.) = false;
    while (i <= maxAmpersandAmpersand !sieve (angular br angular br)I++;
    ) wavy br ) wavy br.
    I hope this is still kind of readable.
    Q's are:
    after the first "for" there is a new i=2, which seems to staty at 2 all the time; the following while does not change this value ( the beginning for i++ does not change this) and so seems to print 2 at all times (??)
    then the inner loop seems to count up all the doubbles of the new prime number and thrwoes it out as false at the end of it;
    the i values (increased with i++ seemsto refere at all times to the unit numbers and only indirect to the un it values, which are written/ assigned to it (??)
    I seem to wonder how the pgm can print out anythings else the 2's.
    I would appreciate any help to that.
    ml
    griz

    I hope this is still kind of readable.No, it's not. http://forum.java.sun.com/help.jspa?sec=formatting
    Why are you omitting the braces and brackets? And why don't you type "program"? Aren't we worth the additional time it takes?
    Q's are:
    after the first "for" there is a new i=2, which
    seems to staty at 2 all the time; the following
    while does not change this value Why should it? You don't tell it to.
    ( the beginning for
    i++ does not change this)It does. It just gets re-set to 2 after the for loop-
    and so seems to print 2 at
    all times (??)Yeah. What else?
    then the inner loop seems to count up all the
    doubbles of the new prime number and thrwoes it out
    as false at the end of it; That part is definitely unreadable.

  • Getting Started with Flex and Java RPC for Free?

    Good Morning,
    Please forgive me if this is the wrong place to post- I'm
    just having trouble wrapping my head around what is and what isn't
    available for free in the Adobe Flex world.
    I've been working on an application for the last few months
    using Open Laszlo (
    http://www.openlaszlo.org/),
    but I've been running into frustrations with their lack of
    up-to-date documentation, and I've found it difficult to bring new
    people into the project, since the set of users who know it is so
    small.
    While I do like that I can compile to DHTML, that's not
    enough to hold me there.
    I've been looking into Adobe Flex, and it seems like a good
    alternative- I'm comfortable paying $500 for the IDE-
    I use Eclipse currently, so having a plugin for it sounds
    ideal. That said, when I look into ways to talk to a Java backend,
    everything points to Flex Data services, which is now part of some
    larger package costing tens of thousands of dollars.
    I don't need advanced messages, or data synchronization, as
    nice as it would be.. All I really need is the ability to call a
    Java method, and get an object back, which I can then work with in
    Flex.
    I see the forum message that asks
    "How
    do I 'do' Flash for free?, but this only talks about RPC very
    broadly. Given that the message is from over a year ago, I thought
    it would be better form to start a new topic, than replying to it.
    Can someone explain to me what components I'd need, both on
    the client side and the server side?
    Is there a set of manuals that explain how to do Flex RPC
    from Java?
    Can Flex compile to any versions of flash earlier than 9?
    (Flash 6/7 is still in wide deployment)
    Do I want to start using Flex 2, or Flex 3? Are the
    components compatible? Will the F3 docs be ready?
    Finally, where can I purchase the Charting components? The
    ability to create charts such as
    this
    overcome a decent price barrier.
    Thank you for any insight you can offer, and direction you
    can provide.

    quote:
    Originally posted by:
    cunparis2day
    On our project they made a proxy in java where they passed in
    the name of the method as a string, and an array of objects for the
    parameters. The proxy then sent the request via RMI and returned
    the result. Kind of a hack but they say it worked (I wasn't here
    when they did it).
    What did the RMI talk to? Are there docs on this?
    quote:
    Another approach, generate the proxy from the java
    interfaces. Or better yet, generate it dynamically with CGLIB.
    quote:
    Finally, I'm investigating using Mule for the integration.
    Let me know what you think about those suggestions.
    We have our own messages, but how would MULE translate them
    to Flex?
    You know quite a bit more about this, can you take a step
    back, and explain?

Maybe you are looking for

  • How can i find all the songs that deleted from my nano 6th gen after updating?  It deleted them out of my itunes library as well

    When I updated my Mom's Ipod Nano 6th generation it deleted all the songs in one playlist and then deleted them off my main computer.  How can I restore these songs without having to repurchase them?

  • Clean start Nokia N8

    Hello, I want to start clean with my Nokia N8 from Roger's (Canada).  I would still like to keep my contacts.  I do have a 32 GB microSD card. it is unlocked. What is the best way to start over? Thanks, VeePee Nokia 3395 Nokia 6600 Nokia N95 8GB Noki

  • Printing over wireless & wired network.  3 Macs.

    I think you can do this not sure. I've got the AirPort Express connected to a wired router for internet. The printer is plugged into the AE. How do I get the other two Macs (connected to router; wired) to add the printer? Is this possible? Thanks.

  • CS6 - add non-editable region inside editable template region?

    I have the following in a template:     <div class="main-content"> <!-- TemplateBeginEditable name="main-content" -->       <div class="content p7ehc-1"> <!-- from projectseven.com; don't change -->         <h1 class="page-topper">Enter topic here</h

  • Rating in Edit Mode

    I am trying to finally make use of iPhoto's rating features. I would like to go into full-screen edit mode, and progressively go through and rate and edit any images that need it. If I only wanted to rate, I know I could do the same thing in a slides