Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 3

AI权益加码!Claude Code、Cursor等20+工具免费用! 购周边限时加赠Coding Plan Lite,畅享主流AI工具!学习进阶更高效! 阅读详情

在阅读这一章的时候,基本没有什么障碍,但是有一个地方文章是写错了。

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 -2 Chapter 2. Overview Of J2EE Technology and ConceptsThe Java 2 Enterprise Edition (J2EE) is a multitiered architecture for implementing enterprise-class applications and web based applications. T 阅读详情

相关推荐

Tutorial for building J2EE Applications using JBOSS and ECLIPSE -5

Chapter 5. Creating a BMP Entity BeanThis chapter describes how to create a Bean Managed Persistence (BMP) EJB component. We will create two BMP beans, Customer and Manager, as shown below. The

阿龙专栏 1729

Tutorial for building J2EE Applications using JBOSS and ECLIPSE -7

Chapter 7. Creating a Message Driven BeanThis chapter covers how to create a Message Driven Bean (MDB) EJB component. We will create two MDB beans, DeliverItems and RequestItems as shown below.

阿龙专栏 1495

Tutorial for building J2EE Applications using JBOSS and ECLIPSE

Table of ContentsTutorial.PrefaceAbout the AuthorsAcknowledgmentsDisclaimerIntroductionPrerequisites for this tutorialTools re

阿龙专栏 4626

Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 1

现在才补回chapter的阅读经历是因为觉得有一个地方的确要提一下。 在安装配置的时候,资料上说明是使用jboss-3.2.1和lomboz.21_02,我决定使用jboss 3.2.5和lomboz 213。虽然对jboss新增的版本特性不清楚,但是我想既然能升级,已经是解决了已经遗留的问题。但是我在配置的时候却给我增添了麻烦。lobmboz 213并没有对jboss 3.2.5有相应的配置文件

中国 IT 应用/ Adapting information technology in china 1263

Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 2 part 2

J2EE中的分布式应用(Distributed Architecture in J2EE ) 刚好在huihoo论坛看了一篇文章说到如何提高jboss的RMI/IIOP的效率问题,“有个应用是客户端swing+j2ee SERVER ,跑在内网没问题的。现在有个客户,很多分支机构,都是通过adsl(2m带宽)连到总部。j2ee服务器放在总部,感觉特别慢”,这个问题我现在还找不到解决的方法。刚好又看

中国 IT 应用/ Adapting information technology in china 1925

Tutorial for building J2EE Applications using JBOSS and ECLIPSE -1

Chapter 1Configuration of ECLIPSE to use JBOSS and LOMBOZInstall Eclipse. First of all we have to set up Eclipse Integrated Development Environment (IDE) with JBOSS as our application server.

阿龙专栏 1942

Tutorial for building J2EE Applications using JBOSS and ECLIPSE3

Chapter 3. Creating a Stateless Session BeanThis chapter covers how to create a stateless session EJB component. This bean will be responsible for authenticating the user by communicating with the dat

Zero'Coffee 1135

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

Chapter 1Configuration of ECLIPSE to use JBOSS and LOMBOZInstall Eclipse. First of all we have to set up Eclipse Integrated Development Environment (IDE) with JBOSS as our application server.So go to

Zero'Coffee 1362

Tutorial for building J2EE Applications using JBOSS and ECLIPSE -3

Chapter 3. Creating a Stateless Session BeanThis chapter covers how to create a stateless session EJB component. This bean will be responsible for authenticating the user by communicating with t

阿龙专栏 1615

Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 2 part 1

All J2EE components are written in the Java programming language 这句话开宗明义的说明了J2EE只能用java来开发,我听说有一些开源爱好者已经可以做到用.net来做,然后通过一些转换器来工作,我也不是很了解这个东西。不过就我而言,要开发.net的就用微软的东西,不要想太多,毕竟那个才是专业的。开发j2ee还是用java算了。 T

中国 IT 应用/ Adapting information technology in china 1397

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

Chapter 4. Creating a Stateful Session BeanThis chapter covers how to create a stateful session EJB component. Unlike stateless beans, stateful bean instances are associated with a particular client s

Zero'Coffee 1142

Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 4

一路跌跌撞撞的把statefule seesion bean 和stateless session beand 的例子都做完了,感觉还是有一点模糊,于是重新翻阅《Mastering EJB 2nd》和sun的培训教程SL - 351终于对EJB有了新的认识。 先看下图:  EJB的整个请求过程 上图完整的说明了请求EJB方法的具体流程。这个流程的home interface是采用EJBHome接

中国 IT 应用/ Adapting information technology in china 1437

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

Chapter 2. Overview Of J2EE Technology and ConceptsThe Java 2 Enterprise Edition (J2EE) is a multitiered architecture for implementing enterprise-class applications and web based applications. This te

Zero'Coffee 1113

Tutorial for building J2EE Applications using JBOSS and ECLIPSE -4

Chapter 4. Creating a Stateful Session BeanThis chapter covers how to create a stateful session EJB component. Unlike stateless beans, stateful bean instances are associated with a particular cl

阿龙专栏 1433

Tutorial for building J2EE Applications using JBOSS and ECLIPSE-6

Chapter 6. Creating a CMP Entity BeanThis chapter covers how to create a Container Managed Persistence (CMP) EJB component. We will create two CMP beans, Item and Supplier as shown below. The It

阿龙专栏 1566
上一篇: Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 2 part 2
下一篇: 在winxp上配置cvsnt,用eclipse来连接
MS_Geek
博客等级 码龄25年 3粉丝 17原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值