The poor builds a J2EE development platform

xiaoxiao2021-03-06  98

The last article we built J2EE development platform with Eclipse and JBoss, and now tests through "Hello, World" and is familiar with this platform. Start: 1, create a new J2EE project, I named TestJ2ee: Next, add the EJB module named "OnlineBank" web module, "MyBank", select JBoss325 to add and set to the default server. 2, select the J2EE project, start LOMBOZ, see the web and ejb modules to display JBoss325; 3, create an EJB component, use the wizard all the way: Name Package and EJB, click Finish 4, add a method to the new bean : Method name: public string learnj2ee (String Message) Set the return value "ME TOO, But I can Deploy EJB BY Eclipse and jboss now!", Then add MySessionBean to the MyBank module: Select the EJB module, determine: 5 Generate the corresponding interface for MyBank: Right-click MyBank Select Lomboz J2EE - Generate EJB CLASSEJBSRC to generate six interfaces as shown below: (dizzy, actually used 1 minute 15 seconds)

6, start deploy module: 7, click the gear below in the bottom right below, start JBoss3258, create a client program test, start the wizard: Name the picture below: Add three lines of code: string request = STRING REQUEST = "I'm Tired of 'Hello, World' Examples .."; System.out.Println ("Request from Client: Request); System.out.Println (" Message from Server: " MyBean.learnj2ee (Request )))); 8, compile, running client.java: see test results:

OK!

Datual! You are familiar with the whole process now, try it yourself.

转载请注明原文地址:https://www.9cbs.com/read-104207.html

New Post(0)