BEA WebLogic Server 7 Manual de usuario Pagina 50

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 63
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 49
EJB
Development Using Borland
®
JBuilder
®
8 and BEA WebLogic Server
7.0
50
Right-click the MDB TestJMS and click View bean source. Change the onMessage()
method of TestJMSBean.java as follows:
public void onMessage(Message msg) {
try {
TextMessage txtMessage = (TextMessage) msg;
System.out.println("Message from EJB TestJMS = " +
txtMessage.getText());
}
catch (JMSException ex) {
}
}
Note: The on Message (message) method gets executed when the MDB receives a message. In
this case, the on Message (message) method will print the received message.
Make the project and make sure that there are no build errors.
Deploy and run the MDB
Create a runtime configuration to start the WebLogic Server within JBuilder. From JBuilder
main menubar, click Run -> Configuration -> click New. In the Runtime Configuration
Properties window enter name as Start WebLogic 7.0 and Build Target as <None>.
Start WebLogic Server within JBuilder (click Run icon from JBuilder toolbar-> click Start
WebLogic 7.0).
Deploy TestJMSMod to WebLogic Server (right-click TestJMSMod -> click Deploy options
for TestJMSMod.jar -> click Deploy).
Test the MDB
To test the MDB TestJMS, create a test client. A test client can be created by clicking File ->
New -> General tab of Object Gallery -> Class -> Click OK.
Vista de pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 62 63

Comentarios a estos manuales

Sin comentarios