Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 3
来源:互联网 发布:vendor.bundle.js 编辑:程序博客网 时间:2024/05/02 04:38
在阅读这一章的时候,基本没有什么障碍,但是有一个地方文章是写错了。
在Create DAO Interface 那一节中“Go to src > add package named au.com.tusc.dao > Add a class StoreAcessDAOImpl in that package”红色字体错了,应该是StoreAccessDAOImpl。
还有就是因为使用不同版本的jboss和lomboz,所以文章中说到的ejbGenerate.xml 文件对应的是xdoclet.xml文件。
Stateless Session Bean
根据Mastering EJB 2nd的描述,建立一个EJB Component所需要的几个步骤
1. Write the .java files that compose your bean: the component interfaces,
home interfaces, enterprise bean class file, and any helper classes you
might need.这一步因为有lomboz的帮忙,我只需要写enterprise bean class文件,在这一章的例子当中就是StoreAccessBean就是enterprise bean文件。然后在这个文件的开始地方加几个tag,如@ejb.dao,lomboz就会自动生成StoreAccessDAO文件。
2. Write the deployment descriptor. Lomboz会自动创建相关的部署文件
3. Compile the .java files from step 1 into .class files.Writing Your First Bean
4. Using the jar utility, create an Ejb-jar file containing the deploymentdescriptor and .class files.
5. Deploy the Ejb-jar file into your container in a vendor-specific manner,perhaps by running a vendor-specific tool or perhaps by copying yourEjb-jar file into a folder where your container looks to load Ejb-jar files.
6. Configure your EJB server so that it is properly configured to host yourEjb-jar file. You might tune things such as database connections, thread pools, and so on. This step is vendor-specific and might be done through a
Web-based console or by editing a configuration file.
7. Start your EJB container and confirm that it has loaded your Ejb-jar file.
8. Optionally, write a standalone test client .java file. Compile that test client into a .class file. Run the test client from the command line and have it exercise your bean’s APIs.
3~8步lomboz会自动帮我完成。看来有了Lomboz真的可以把精力集中在业务逻辑的开发。
不过在实现这个例子的时候,一个部署ejb的典型错误又发生了,就是tag语句写错了,这些东西都是只有在部署后才可以知道,不可以编译来校验,而且出了错也不容易找,真是麻烦。唯一的办法就是打开lomboz的文档,然后复制粘贴,希望这样会少一点错误。或者等我找到更加先进的工具进行校验,暂时就只好这样子了。
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 3
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -3
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 2 part 1
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 1
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 2 part 2
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 4
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -1
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -2
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -4
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -5
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE-6
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -7
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE -8
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE-9
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE(3)
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE(3)
- 数据库范式
- 最简单的com组件为何在一台机器上注册不上,返回0x80040154错误:(类没有注册)
- dangdang
- 个人理财常见十大误区
- 写给大学老师的一封信----我对软件人才培养的思考
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 3
- 个人理财十项必修功课
- 计算机族必喝的健康饮品
- 五禽操帮电脑族找回活力
- 提醒电脑族:眼睛酸涩会致病
- 电脑病不可不防
- 长期操作电脑 应该知道什么
- PHP后台管理类(修改中)
- 邓小平理论复习笔记(6,7章)