当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Chapter 7. Creating a Message D
 

 

 ·使用ejb3.o简化ejb开发(二)    »显示摘要«
    摘要: 简化开发者的观点如果你使用现有版本的ejb你会懂得开发一个如helloworld的简单的ejb程序是多么困难。你至少需要两个接口,一个bean类和一个部署描述文件。大多数的开发者希望知道为什么我需要所有这些。ides(开发环境工具)象oracle的jdeveloper, eclipse和xdoclet简化了开发者的做这些普通的工作开发周期,可是在ejb在你部署到所选择的容器中之前,编译类和打包部......
 ·tomcat中部署webservice    »显示摘要«
    摘要: 1. 安装axis 1. copy \webapps\axis\web-inf\lib 下的文件到自己的instance的lib下,比如,你的app名为: webservice,那么copy到\webapps\webservice\web-inf\lib 2. copy happyaxis.jsp及其它便于管理的jsp及class到webservice的目录下 3. deploy webserv......


Tutorial for building J2EE Applications using JBOSS and ECLIPSE (7)

chapter 7.

creating a message driven bean 【程序编程相关:hibernate基础_7

【推荐阅读:关于配置支持JFreeChart的Tom

【扩展信息:hibernate基础_6

this chapter covers how to create a message driven bean (mdb) ejb component. we will create two mdb beans, deliveritems and requestitems as shown below. the deliveritems bean will replenish the stocks of various items within mystore, and the requestitems bean will send requests to various suppliers to deliver items which are out of stock. the mystore manager will issue/send this request.

note : both message-driven beans access the storeaccess bean through its remote interface, even though the storeacessbean is in the same jvm. this is because we have implemented storeaccessbean as a remote bean, so it only exposes its remote interface. however, in accessing the manager and item beans, which are also used by these message-driven beans we can use their local interfaces as they are in the same jvm, and we have exposed their local interfaces.

tasks :

create a md bean named requestitems under package au.com.tusc.mdb.

create an immutable value object named requestitem under package au.com.tusc.mdb. add attributes and implement their accessor and mutator methods. the attributes are:

private string username

private string passwd

private string itemid

private int quantity

implement the onmessage method.

deploy the requestitems bean.

create your test client named requestmdbclient under package au.com.tusc.mdb.

add a method named testmdbbean with the following signature and implement it.

public void testmdbbean

run your client and test the bean.

create requestitems mdb bean :

go to package explorer > expand mystore (project) node > select src, right click and a menu will pop up.

on the pop up menu > new > lomboz ejb creation wizard.

enter package name au.com.tusc.mdb, bean name requestitems and select bean type as message drive bean (queue) as shown below.

press finish.


...   下一页
 ·tomcat5.5.9的安装配置    »显示摘要«
    摘要: 作为一个初学jsp和servlet的人来说,最难恐怕是服务器的配置这一关。本人刚刚开始学习jsp和servlet,现在把配置经过和大家交流.我的主要环境如下1 - windows xp sp22 - j2sdk 1.5 和 jre1.53 - tomcat 5.5.9大致的步骤如下:1. 安装和配置java.2. 下载并安装服务器。3. 测试服务器。1 - 安装和配置java。1.1 下载j2......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE