Help:How can I run the J2EE Client Application? Thanks

Help:How can I run the J2EE Client Application that will access the remote J2EE1.4 application server which runs on another host computer?
I have developped a stateles senterprise java bean name converter and deloyed it in the j2ee1.4 application server on the host machine A. The converterbean provides the remote home interface and remote interface. At the same time I have developped the j2ee application client named convertappclient. When I access the conveter bean at host computer A through the script 'appclient.bat' as 'appclient -client convertappclient.jar', the client can access the bean sucessfully. Now I want to access the bean through the script 'appclient.bat' at host computer B,what files should I copy from host computer A to host computer B;and what the command line should be like? Thanks!
The following are the code of the enterprise java bean and it's home interface .
The client code is also provided.
The enterprise java bean:
package converter;
import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.math.*;
public class ConverterBean implements SessionBean {
BigDecimal yenRate = new BigDecimal("121.6000");
BigDecimal euroRate = new BigDecimal("0.0077");
public ConverterBean() {
public BigDecimal dollarToYen(BigDecimal dollars) {
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2, BigDecimal.ROUND_UP);
public BigDecimal yenToEuro(BigDecimal yen) {
BigDecimal result = yen.multiply(euroRate);
return result.setScale(2, BigDecimal.ROUND_UP);
public void ejbCreate() {
public void ejbRemove() {
public void ejbActivate() {
public void ejbPassivate() {
public void setSessionContext(SessionContext sc) {
The bean's remote home interface :
package converter;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface ConverterHome extends EJBHome {
Converter create() throws RemoteException, CreateException;
The bean's remote interface:
package converter;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.math.*;
public interface Converter extends EJBObject {
public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
The j2ee application client:
import converter.Converter;
import converter.ConverterHome;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.math.BigDecimal;
public class ConverterClient {
public static void main(String[] args) {
try {
Context initial = new InitialContext();
System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
               System.setProperty("java.naming.provider.url","jnp://10.144.97.250:3700");
Context myEnv = (Context) initial.lookup("java:comp/env");
Object objref = myEnv.lookup("ejb/SimpleConverter");
ConverterHome home =
(ConverterHome) PortableRemoteObject.narrow(objref,
ConverterHome.class);
Converter currencyConverter = home.create();
BigDecimal param = new BigDecimal("100.00");
BigDecimal amount = currencyConverter.dollarToYen(param);
System.out.println(amount);
amount = currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}

Surprisingly I find an upsurge in the number of posts with this same problem. I recently found a post which gave a nice link for this. Follow the steps and it should help:
http://docs.sun.com/source/819-0079/dgacc.html#wp1022105

Similar Messages

  • Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    The Mac OS X and iOS versions are separate products

  • How can i run the example programme without hardware

    Hi,
         We are using NI-9233 for our Project. We would like to run the example programme, the NI-9233 getting started(host).vi ... I would like to ask that how can i run the Programme without Hardware.& How shall i get the input signal (simulating signal)?because we would like to test it while we are waiting for the hardware to be delivered . 
    thanks
    Best regards

    As Mike indicated , " you can use MAX to simulate some (not all) DAQmx devices. There's a NI-USB-9233 device that you can probably use. Open MAX, then expand "My System", the expand "Devices and Interfaces", then right-click on "NI-DAQmx Devices" and select "Create New NI-DAQmx Device -> NI-DAQmx Simulated Device". Select the device from the list. See the online help for MAX for further help.
    If you don't see "NI-DAQmx Devices" in MAX you need to install NI-DAQmx. You can download it from NI here. "
    hi,
         the link you gave me to download is "NI-DAQmx Devices" ... There is no software to download for Labview 8.2.1. So should i use 8.1 or 8.3 instead of 8.2.1 ? If not, can you tell me the CD no. that includes the "NI-DAQmx Devices" folder of Labview 8.2.1 version? Because we can get the cd from our school's component store. Thank you so much.
    Best Regards,
    Su

  • How can i run the java bean sample program download from OTN

    hello to all
    i have a p[roblem. i have downloaded the sample progam from oracle web site which is a java code that connect with the oracle and shows a form. how can i run the from.
    can any body help me pleaSEEE
    thanks
    kamran ahmed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Darryl.Burke
    So your telling, we cannot run our Java Program when system shutdowns...In my application, when user has schedule for next days and he shutdown his PC. On the next day when System Started i should able to get back my schedule on the Specified time(I'm TimerTask class in Java)... How can i achieve this using Java? can u tell me clearly..

  • How can I run the report for different input values at the same time?

    Reports version: Report Builder 6.0.8.13.1
    Oracle version: Oracle8i Enterprise Edition Release 8.1.7.0.0
    I want to run the same report for different input parameter values and spool each o/p to different file and ftp to a server. For this, as a first step, I am spooling different input values in to a file, reading those values through a loop and calling the report for that input values. Each report run/execution is taking 15 minutes. Total report execution is taking approximately 4 hours (assuming 16 different input values) to complete. So I have to wait 4 hours to see ALL outputs.
    I would like to run the report parallel for ALL the input values and I should be able to see the ALL outputs with in 15 or 16 minutes.
    In my shell script, I added & symbol at the end of the report call to start/run the job in the background. Due to this the control passed to the next step after the report call. At this place I have an ftp command to send the output file to a different server and it is giving error some thing like “o/p file is not available/created yet". This is due to the fact that report writer is NOT yet completely started/initiated or it is NOT completed the spooling.
    How can I run the report at the same time for all the input values and save the time?
    Thanks in advance.
    Kishore.

    Increase the number of server engines running right now it seems there is only one engine running ,increase it to 4 or 6
    and then atleast 4 or 6 reports will run simultaneously.
    For FTPing the output add to your sript to check whether it is locked and if not then only try to ftp .
    Also for more better functionality read the document (chapter 15 ) for 10g reports for its new fuinctionality.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/toc.htm
    Thanks
    Subodh

  • HT3552 I am billed 3 times for a same item. How can I get the problem fixed? Thanks a lot for your help.

    I am billed 3 times for a same item. How can I get the problem fixed? Thanks a lot for yur help. nhuttan448

    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • How can I run the "Find my Iphone" app in my Itunes?

    How can I run the "Find my Iphone" app in my Itunes?

    Find my iPhone App can only run in iPhone and not iTunes.  If you have activated iCloud and set Find my iPhone to ON, you can sign in to https://www.icloud.com to run Find My iPhone there.

  • How can I know the version of Application Server Java Virtual Machine

    How can I know the version of Application Server Java Virtual Machine?
    Thanks a lot.

    Thats easy. Your jdk/jre are located in the App Server home directory. Just run the java command under the jdk directory with the "-version" switch and it will provide you with detailed information about your VM.
    For example if you're doing it at command prompt it will be something like
    java -versionI hope this will be useful to you.
    Regards,
    Wasif

  • How can we add the years, in Application Profile.

    Hi Experts,
    I have a doubt regarding the Application Profile in HFM, Here My question is, How can we add the years to application profile, After once created and attached with one application and the application is going on for past 2 years, now the requirement is add the years to application profile HFM.
    1. Is there any rule required for this?, If there is a rule, please explain the rule.
    Thanks & Regards.
    RajaKK

    Hi RajaKK
    The below mentioned article might be helpful to you.
    How to Add Additional Years to the Year Dimension in an HFM Application (Doc ID 1287575.1)
    If you are in 11.1.2.1. version the utility would be available in the below location by default.
    C:\Oracle\Middleware\EPMSystem11R1\products\FinancialManagement\Utilities\FMChangeNumberOfYearsForApp_x64.exe
    Hope this helps,
    Thank you,
    Charles Babu J

  • How can one develop "view only" client applications in Lookout?This is to develop remote monitoring without control functionality.

    How can one develop "view only" client applications in Lookout?This is to develop remote monitoring without control functionality.
    We have 10 Client Nodes in the field and we need two "View Only" functionality in Client machines located on Supervisory Desks.

    I have done this. There are many ways to approach this but I will offer what I think is the easiest. This will work ONLY if you have been assigning security levels to your objects (objects that actually control devices in the field) greater than zero AND allowing a security level of zero to view all panels. When I develop interfaces I do this just for creating a non control client.
    Basically, you remove all users from the Lookout client in the user manager. You will not be able to remove the built-ins, "Guest" and "Administrator". Now when the end users tries to login using his normal login he will be denied. Consequently, he will not be able to control. But, he will still be able to view all the information since a no login can view a panel with a viewing se
    curity level of zero. You must ensure any pushbuttons that are used to open panels have a security level of zero.
    Now you can copy this security profile by finding the lookout.sec file and copying it to another non-control client computer. In Windows NT this file is located in the system32 directory.
    There are many other ways but I find this the easiest.
    Regards,
    Tommy Scharmann

  • Just upgrade to 33.1.1, terrible! new tab position not configurable, no response for clicking a link, how can I have the old version? Thanks!

    Just upgrade to 33.1.1, terrible! new tab position not configurable, no response for clicking a link, not going to the website by click "enter", "space" keyboard can not be the page down anymore, always die....
    how can I have the old version?
    Thanks!

    Just to clarify, let's say you have tab 1 Google results and tab 2 something else. When you Ctrl+click a link in tab 1, it opens between tab 1 and tab 2 instead of at the end? Here's how you switch that:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''tabs''' and pause while the list is filtered
    (3) Double-click the '''browser.tabs.insertRelatedAfterCurrent''' preference to switch it from true to false.
    You can switch back to an earlier tab and test. Success?

  • URGENT HELP How Can I clone the database only?

    Hi all
    I have two database, oracle9.2.0.6 running on RHEL4
    one is testing server and the other for the production server
    how can i clone the testing DATABSE on the productioin DATABASE?
    please help me urgent
    Thank You
    Regards

    Hello Tawfik,
    You can use RMAN duplicate with the following link for 9i.
    http://www.oracle-base.com/articles/9i/DuplicateDatabaseUsingRMAN9i.php
    If you want to clone manually then follow this thread
    Cloning 9i database manually

  • Plz Help, How can I get the Information from the net conneted machine?

    Suppose Person x has login on the network by using
    dial-up network connection? I want to know that wheather he is on the network and get the data from his machine ?
    Suppose I know his username/Password and phone no
    for dial up...
    Plz, suggest me how can I do this?
    How can get information from that machine?
    Thanks
    Pramod

    Hi,
    I dont know whether I understood your question completely.Anyway,let the users be X and Y and be on diff machines,
    Since X is logging in using a dialup network the ip is allotted dynamically and so, Y cannot know X's ip till he logs in and tell Y about it explicitly. Workaround is that either X's or Y's ip must be constant/static or there should be another way that X know about the ip of Y each time he logs in.
    If X's ip is static, Y can poll certain port at X where u's alpplication is running and if conn. is succ, after some authentication, get the information u want. For writing u'r own services there should be u'r own components at both ends, one requesting connection and other accepting. Please get back to me if more doubts or if I have'nt understood u'r problem fully..
    regards Stallon

  • Help-how can i see the sequence in the table?

    Hi, i created sequence for the table. but how can i view the sequence as a column in the table? like the sequence started with 1 and increment by 1. how can i make it available as a column in the table? thanks a lot for anyone's prompt reply. much appreciated.

    eg.
    Create table:
    create table t1 (
    id number(10),
    col1 varchar(2)
    Create sequence:
    CREATE SEQUENCE "PEMARTEN"."T1_ID" NOCYCLE NOORDER CACHE 20 NOMAXVALUE MINVALUE 1 INCREMENT BY 1 START WITH 1
    You can do 2 things:
    Use the sequence in your insert query:
    eg.
    insert into t1 (id, col1) values (t1_id.nextval, 'example');
    OR
    Create a before insert trigger (prefered):
    CREATE OR REPLACE TRIGGER "PEMARTEN"."BI_T1" BEFORE INSERT ON "PEMARTEN"."T1"
    REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    DECLARE
    new_id number;
    BEGIN
    SELECT t1_id.nextval
    INTO new_id
    FROM dual;
    :new.id := new_id;
    END;
    Now you can just insert data:
    insert into t1 (col1) values ('example');
    sequence.nextval increments the sequence and returns the next value
    sequence.currval returns the current value of a sequence
    I hope that helps.
    Kind regards,
    Pieter

  • Can somebody help how can I extend the carpet sample to fill out the hallway?

    I would need to extend the piece of capret sample to replace the old plane carpet. I'm pretty new to PS and have trouble with the crazy carpet patter plus the room is getting narrower.
    Can somebody give me some tips or any kind of help? I really appreciate it. Thank you!

    Ok, the question is how can i extend the range with
    my airport extreme base,
    With an Airport Express or another Airport Extreme
    I have A netgear WNP802, it
    has a repeating feature.
    Which won't work with your Airport Extreme
    < But i am wanting to have the
    netgear and the apple airport extreme talk to each
    other so that i can put the net gear in a seperate
    room to extend the range of signal. </div>
    This is not possible.
    How can i do this?
    You can't.
    Netgear and Apple use different chips which means they won't and can't talk to each other when it comes to extending networks.

Maybe you are looking for

  • Hp officejet pro 8500a plus bluescreen startup issue

    When I am connecting my printer with power supply it is automatically getting on everytime showing a blue screen having some numbers and letters.plz help

  • Firefox is frozen and will not close but I want to un-install it. HELP!

    Firefox was open and an error message. Unresponsive script running, continue or stop script? All options were frozen I was not able and still not able to close firefox or any tabs from it, it has been frozen for two days. Is there an easy command lin

  • Dropping calls

    Please help me I'm not able to make or receive calls or text either what should I do

  • After updating, all fonts on all websites are bold, help?

    I just updated to Firefox v7.0, using Windows 7. I go into Gmail and all of my email looks unread. I realize this is not a gmail setting as CNN is the same, as is all other sites. Please help me get my fonts back to normal! I checked my default and I

  • Can't get hold of the user.waveset.roles in my workflow

    Hey, I am developing a workflow process that adds a role to each user during reconsiliation if they don't already have it. 1. It gets the user view. 2.. It checks to see if the user has a particular role. (This is where my problem lies, as the user.w