亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 5.mht

?? Enterprise Java Bean的PPT文檔,很好的東西.
?? MHT
?? 第 1 頁 / 共 5 頁
字號(hào):
CustomerBean.</P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D584=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanAttribute=
s.png"=20
width=3D368 align=3Dleft border=3D0 name=3DGraphic8><BR =
clear=3Dleft><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Generate EJB classes and examine what =
methods=20
are generated in the various classes, particularly in CustomerBMP and=20
CustomerData</B>.</P>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<H3>Add Finder Methods :</H3>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Now let's add a finder method to our =
bean=20
class</B>. </P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Add a method with this =
signature:<BR><BR><FONT=20
color=3D#000000>public CustomerPK</FONT> <FONT=20
color=3D#000000>ejbFindByPrimaryKey</FONT> <FONT =
color=3D#000000>(CustomerPK</FONT>=20
<FONT color=3D#000000>pk)</FONT> throws F<FONT =
color=3D#000000>inderException</FONT>=20
</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in">Put some debug statements in it and =
return null as=20
shown below.</P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D192=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanEjbFind.p=
ng"=20
width=3D722 align=3Dleft border=3D0 name=3DGraphic15><BR =
clear=3Dleft><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Now when we generate our EJB classes =
this=20
method will be overridden in CustomerBMP. Also this method will call a=20
corresponding method from CustomerDAO interface as shown below in this =
code=20
snippet from CustomerBMP.</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D342=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBMPjbFind.png=
"=20
width=3D766 align=3Dleft border=3D0 name=3DGraphic39><BR =
clear=3Dleft><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>This will also create methods in the =
Home=20
interface and DAO interfaces as shown below.</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D270=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerHomeFindBy.pn=
g"=20
width=3D542 align=3Dleft border=3D0 name=3DGraphic41><BR =
clear=3Dleft><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D322=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOFindBy.png=
"=20
width=3D854 align=3Dleft border=3D0 name=3DGraphic40><BR =
clear=3Dleft><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Add another finder method to =
CustomerBean, with=20
the signature</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B><FONT color=3D#000000>public =
CustomerPK</FONT>=20
<FONT color=3D#000000>ejbFindByUserID</FONT> <FONT =
color=3D#000000>(String=20
userID)</FONT> throws F<FONT color=3D#000000>inderException</FONT> =
</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in">Put some debug statements in it and =
return null as=20
shown below.</P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D212=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanFindByUse=
rID.png"=20
width=3D590 align=3Dleft border=3D0 name=3DGraphic16><BR =
clear=3Dleft><FONT=20
color=3D#800000><I>Note : As stated in the EJB spec 12.8.1 all finder =
methods=20
should return the Primary Key.</I></FONT></P>
<P style=3D"MARGIN-BOTTOM: 0in"><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Again, regenerate your EJB classes, =
and there=20
will be methods created in the CustomerHome interface, CustomerBMP and=20
CustomerDAO, similar to those that were created for =
ejbFindByPrimaryKey.</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>A code snippet from the CustomerDAO =
class,=20
after generating the EJB classes.</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D258=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOFindByUser=
ID.png"=20
width=3D874 align=3Dleft border=3D0 name=3DGraphic17><BR =
clear=3Dleft><BR></P>
<H3>Add Business Methods :</H3>
<P><B>Now, add a business method with the signature<BR><BR><FONT=20
face=3D"Nimbus Roman No9 L"><FONT color=3D#000000>public =
CustomerData</FONT> <FONT=20
color=3D#000000>getCustomerData() with Interface type as=20
local.</FONT></FONT></B></P>
<P><FONT color=3D#800000><I><FONT face=3D"Nimbus Roman No9 L">Note : The =
steps to=20
add a business method are covered in previous chapters (1 and 3), so =
please=20
refer to them. Also, we have chosen the</FONT> interface type to be =
local=20
because these methods will be invoked in the same Java Virtual Machine. =
In this=20
case they will be invoked by the stateless bean =
StoreAccess.</I></FONT></P>
<P><FONT color=3D#000000><FONT face=3D"Nimbus Roman No9 L"><FONT =
size=3D3><B>This will=20
provide the details of an individual customer. Add some debug statements =
and=20
return an instance of CustomerData as shown below in this code snippet =
from=20
CustomerBean. </B></FONT></FONT></FONT></P>
<P style=3D"MARGIN-BOTTOM: 0in"><IMG height=3D226=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanGetCustom=
erData.png"=20
width=3D590 align=3Dleft border=3D0 name=3DGraphic42><BR =
clear=3Dleft><BR></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>Make sure you generate your EJB =
classes again=20
before you start implementing Customer's DAO interface.</B></P>
<H3><BR><BR></H3>
<H3>Implement Customer's DAO Interface :</H3>
<P style=3D"MARGIN-BOTTOM: 0in">Now let's implement our methods in =
CustomerDAOImpl=20
class.</P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>CustomerDOAImp class under package=20
au.com.tusc.dao implements methods generated in CustomerDAO class under =
package=20
au.com.tusc.bmp.</B></P>
<P style=3D"MARGIN-BOTTOM: 0in">First import the following =
packages.</P><PRE><FONT color=3D#000000><FONT face=3DSnas><FONT =
style=3D"FONT-SIZE: 11pt" =
size=3D2>javax.naming.InitialContext;</FONT></FONT></FONT>
<FONT color=3D#000000><FONT face=3DSnas><FONT style=3D"FONT-SIZE: 11pt" =
size=3D2>javax.sql.DataSource;</FONT></FONT></FONT>
<FONT color=3D#000000><FONT face=3DSnas><FONT style=3D"FONT-SIZE: 11pt" =
size=3D2>java.sql.Connection;</FONT></FONT></FONT>
<FONT color=3D#000000><FONT face=3DSnas><FONT style=3D"FONT-SIZE: 11pt" =
size=3D2>java.sql.PreparedStatement;</FONT></FONT></FONT>
<FONT color=3D#000000><FONT face=3DSnas><FONT style=3D"FONT-SIZE: 11pt" =
size=3D2>java.sql.ResultSet;</FONT></FONT></FONT>
<FONT color=3D#000000><FONT face=3DSnas><FONT style=3D"FONT-SIZE: 11pt" =
size=3D2>java.sql.SQLException;</FONT></FONT></FONT></PRE>
<P><B>Change your class declaration so that CustomerDAOImpl implements=20
CustomerDAO.</B></P>
<P><B>Add a field to store the JDBC resource factory =
reference.</B></P><PRE style=3D"MARGIN-BOTTOM: 0.2in"><FONT =
face=3DSans><FONT style=3D"FONT-SIZE: 11pt" size=3D2><B><FONT =
color=3D#7f0055>private</FONT></B> DataSource =
jdbcFactory;</FONT></FONT></PRE>
<P><B>In the init() method, locate the reference jdbc/DefaultDS using =
the JNDI=20
API, and store the reference in variable jdbcFactory.</B></P>
<P style=3D"MARGIN-BOTTOM: 0in"><B>The lookup string is </B><FONT =
face=3DSans><FONT=20
color=3D#2a00ff>"java:comp/env/jdbc/DefaultDS".</FONT></FONT></P>
<P>Code snippet is shown below.</P>
<P><IMG height=3D572=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOImplInit.p=
ng"=20
width=3D518 align=3Dleft border=3D0 name=3DGraphic20><BR =
clear=3Dleft><BR><BR></P>
<P><B>In method load(), first get the connection to the database using =
field=20
jdbcFactory. Create a SQL statement which searches for a record =
corresponding to=20
customerid in table Customer, where customerid is the primary key. =
</B>Code=20
snippet is shown below.</P>
<P><IMG height=3D588=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOImplLoad.p=
ng"=20
width=3D594 align=3Dleft border=3D0 name=3DGraphic38><BR =
clear=3Dleft><BR><BR></P>
<P><B>In method store(), first get the connection to database using =
field=20
jdbcFactory. Create an SQL statement which updates a record =
corresponding to=20
customerid in table Customer, where customerid is the primary key. =
</B>Code=20
snippet is shown below.</P>
<P><IMG height=3D548=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOImplStore.=
png"=20
width=3D600 align=3Dleft border=3D0 name=3DGraphic36><BR =
clear=3Dleft><BR><BR></P>
<P><B>In method ejbFindByUserID(), first get the connection to database =
using=20
field jdbcFactory. Create an SQL statement which searches for the =
customerid=20
corresponding to a given userid in table Customer, where customerid is =
primary=20
key. </B>Code snippet is shown below<B>.</B></P>
<P><IMG height=3D582=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOImplFindBy=
UserID.png"=20
width=3D696 align=3Dleft border=3D0 name=3DGraphic18><BR =
clear=3Dleft><BR><BR></P>
<P><B>In method ejbfindByPrimaryKeystore(), first get the connection to =
database=20
using field jdbcFactory. Create an SQL statement which searches for =
customerid=20
in table Customer, where customerid is the primary key. Return the =
primary=20
key</B>. Code snippet is shown below.</P>
<P><IMG height=3D560=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerDAOImplFindBy=
.png"=20
width=3D602 align=3Dleft border=3D0 name=3DGraphic46><BR =
clear=3Dleft><B>Also, you should=20
implement methods remove and create. We're leaving those as an exercise =
for you=20
(you've probably got the idea by now!), or you can leave them as stubs =
as shown=20
below.</B></P>
<P><IMG height=3D116=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanRemove.pn=
g"=20
width=3D854 align=3Dleft border=3D0 name=3DGraphic47><BR =
clear=3Dleft><BR><BR></P>
<P><B>Now our CustomerDAOImpl class is finished. Generate your EJB =
classes=20
again.</B></P>
<P><B>After generating your EJB classes, let's look at the Home Local =
Interface=20
and the Remote Local interface. </B></P>
<P><B>In the Remote Local Interface (which is CustomerLocal in this =
case), there=20
is one business method exposed, and the rest are all the methods to =
access the=20
attributes/properties of the bean (as we also declared these methods as=20
interface methods in CustomerBean), as shown below. These methods are =
generated=20
by @ejb.interface-method tag.</B></P>
<P><IMG height=3D338=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerLocal.png" =
width=3D294=20
align=3Dleft border=3D0 name=3DGraphic49><BR clear=3Dleft><BR><BR></P>
<P><B>In the Home Local Interface, which is CustomerLocalHome in this =
case,=20
there are two finder methods as shown below. It has also generated =
JNDI_NAME and=20
COMP_NAME (logical name to lookup the component).</B></P>
<P><IMG height=3D346=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerLocalHome.png=
"=20
width=3D576 align=3Dleft border=3D0 name=3DGraphic19><BR =
clear=3Dleft><B>These names are=20
generated by the following tag declared in CustomerBean as shown =
below.</B></P>
<P><IMG height=3D170=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanNameTag.p=
ng"=20
width=3D266 align=3Dleft border=3D0 name=3DGraphic51><BR =
clear=3Dleft><BR><BR></P>
<P><FONT color=3D#800000><I>Note : We are not currently interested in =
the Customer=20
interface (which is a Remote interface) and CustomerHome (which is a =
Remote Home=20
interface), because we are accessing bean methods in the same Java =
Virtual=20
Machine, so we need only Local interfaces. </I></FONT></P>
<P><FONT color=3D#800000><I>Note : In CustomerBean we haven't =
implemented any=20
methods for the setting and unsetting of context, because it is =
generated by=20
Xdoclet in the CustomerBMP class, as shown below.</I></FONT></P>
<P><IMG height=3D186=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBmpEntityCont=
ext.png"=20
width=3D352 align=3Dleft border=3D0 name=3DGraphic48><BR =
clear=3Dleft><B>Now Customer Bean=20
and its DAO implementation is complete and we can deploy this =
bean.</B></P>
<H3>Deploy Customer Bean :</H3>
<P><B>In order to deploy this bean we have to add a few deployment =
descriptors=20
to it. We will add the two tags shown below.</B></P>
<P><IMG height=3D372=20
src=3D"http://www.tusc.com.au/tutorial/images/chap5/CustomerBeanDeploymen=
tTags.png"=20
width=3D404 align=3Dleft border=3D0 name=3DGraphic21><BR =

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩久久| 亚洲国产精品激情在线观看| 国产精品久久久久婷婷 | 91麻豆国产香蕉久久精品| 国产欧美一区二区在线观看| 色婷婷久久久亚洲一区二区三区| 亚洲色图制服丝袜| 欧美tk—视频vk| 99在线精品一区二区三区| 亚洲高清免费在线| 精品国产乱码久久久久久蜜臀| 9人人澡人人爽人人精品| 不卡在线观看av| 久久99久久久久久久久久久| 色综合久久天天| 欧美日韩国产在线观看| 成人av在线资源网站| 日本韩国视频一区二区| 欧美吻胸吃奶大尺度电影| 石原莉奈在线亚洲二区| 久久久久国产一区二区三区四区| 欧美羞羞免费网站| 欧美性色欧美a在线播放| 欧美一区午夜视频在线观看| 97久久精品人人爽人人爽蜜臀 | 欧美一区日韩一区| 久久亚区不卡日本| 欧美精品一区二区三| 中文子幕无线码一区tr| 午夜精品一区二区三区电影天堂| **欧美大码日韩| 欧美激情在线观看视频免费| 亚洲综合色丁香婷婷六月图片| 最新日韩在线视频| 视频一区二区不卡| 99精品久久99久久久久| 日韩午夜在线观看视频| 欧美嫩在线观看| 久久久精品免费免费| 亚洲一区免费在线观看| 国产精品一区二区在线看| 麻豆国产精品视频| 久久99热狠狠色一区二区| 91亚洲午夜精品久久久久久| 欧美成人免费网站| 一区二区成人在线观看| 亚洲制服丝袜在线| 国产成人自拍高清视频在线免费播放| 极品美女销魂一区二区三区免费| 色综合 综合色| 国产拍揄自揄精品视频麻豆| 毛片不卡一区二区| 欧美日韩成人高清| 亚洲天堂成人在线观看| 国产精品一卡二卡| 精品日韩99亚洲| 日本一区中文字幕| 国产一区二区三区av电影 | 成人sese在线| 久久久亚洲午夜电影| 捆绑调教一区二区三区| 精品婷婷伊人一区三区三| 欧美男人的天堂一二区| 成人免费一区二区三区视频| 国产999精品久久久久久绿帽| 99精品黄色片免费大全| 中文字幕av资源一区| 国产精品888| 国产亚洲精品bt天堂精选| 亚洲男人的天堂在线aⅴ视频| 丰满白嫩尤物一区二区| 国产视频亚洲色图| 丁香五精品蜜臀久久久久99网站 | 2021久久国产精品不只是精品| 日韩va亚洲va欧美va久久| 制服丝袜一区二区三区| 国产欧美精品一区二区色综合| 老司机午夜精品| 久久这里只精品最新地址| 国产一区二区在线免费观看| 337p日本欧洲亚洲大胆色噜噜| 精品制服美女久久| 久久久另类综合| 成人网男人的天堂| 日韩一区二区三区电影在线观看| 免费视频一区二区| 欧美综合久久久| 中国av一区二区三区| 婷婷中文字幕综合| 日韩一区二区电影| 九一九一国产精品| 国产日韩精品一区二区三区| 国产经典欧美精品| 亚洲人成精品久久久久| 欧美性猛片aaaaaaa做受| 日本美女一区二区| 国产校园另类小说区| 91尤物视频在线观看| 五月婷婷激情综合网| 日韩欧美国产系列| 亚洲国产视频一区| 欧美电影免费观看高清完整版在| 国产福利精品一区二区| 亚洲欧美激情小说另类| 欧美蜜桃一区二区三区| 国产精品中文字幕欧美| 一区二区三区成人在线视频| 日韩欧美成人一区| a亚洲天堂av| 日韩精品成人一区二区三区| 中文字幕巨乱亚洲| 欧美日韩日日夜夜| yourporn久久国产精品| 日韩高清欧美激情| 国产精品日韩精品欧美在线 | 久久99久久99| 色婷婷香蕉在线一区二区| 三级不卡在线观看| 国产在线不卡视频| aaa欧美色吧激情视频| 亚洲午夜电影网| 国产日韩三级在线| 在线精品视频免费观看| 国产精品自在在线| 午夜av电影一区| 亚洲女同ⅹxx女同tv| 2020国产精品| 日韩一区二区三区精品视频| 色婷婷av久久久久久久| 成人午夜碰碰视频| 久久91精品国产91久久小草| 亚洲成人av在线电影| 91色|porny| 国产精品中文字幕日韩精品 | 亚洲精品乱码久久久久| 色综合久久中文字幕综合网| 韩国v欧美v亚洲v日本v| 国产精品美女久久福利网站| 日韩欧美亚洲国产精品字幕久久久 | 精品国精品自拍自在线| 欧美精品一二三| 国产毛片精品一区| 久久精品国产精品亚洲综合| 午夜亚洲国产au精品一区二区| 国产精品高潮呻吟久久| 国产欧美日韩视频在线观看| 精品国产麻豆免费人成网站| 91精品国产一区二区三区香蕉| 欧美日韩国产综合一区二区| 欧美性一二三区| 欧美日本在线播放| 欧美日韩一区小说| 欧美一区二区三区爱爱| 制服丝袜成人动漫| 日韩女优毛片在线| 欧美成人女星排行榜| 久久久久久毛片| 国产精品美女久久久久久久久久久| 欧美激情一区二区| 亚洲男人电影天堂| 肉色丝袜一区二区| 国产一区二区三区四区五区美女| 国产成人综合亚洲网站| 成人av免费在线| 欧美日韩一区二区三区视频| 91精品久久久久久久91蜜桃| 欧美成人女星排行榜| 欧美极品美女视频| 亚洲欧美激情小说另类| 日本欧美一区二区三区| 精品一区二区三区av| 成人av片在线观看| 7777精品伊人久久久大香线蕉的 | 艳妇臀荡乳欲伦亚洲一区| 亚洲自拍与偷拍| 看电视剧不卡顿的网站| 国产精品一区二区在线看| 色哟哟一区二区在线观看 | 成人国产视频在线观看| 欧美视频一区二区三区| 亚洲精品在线观看网站| 亚洲日本在线天堂| 蜜臀精品久久久久久蜜臀| 成人黄色在线看| 欧美巨大另类极品videosbest | 欧美日韩久久一区| 精品国产亚洲在线| 一区二区三区四区亚洲| 国产一区二区免费在线| 日本精品一区二区三区高清| 欧美精品一区二区三区视频| 亚洲综合成人在线| 丁香天五香天堂综合| 538prom精品视频线放| 国产精品久久久久一区二区三区共| 五月婷婷久久综合| 92精品国产成人观看免费| 久久五月婷婷丁香社区| 亚洲国产精品精华液网站| 99国产精品久|