⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 java研究组织 - 精品文章 - 使用jboss和postgresql-----快速开发ejb和j2ee web application.htm

📁 行业分类数据库管理系统
💻 HTM
📖 第 1 页 / 共 5 页
字号:
                          class=classLink><U>String</U></FONT></A></B>&nbsp;getCountry(<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/String.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>String</U></FONT></A></B>&nbsp;id)&nbsp;<B><FONT 
                          color=#0000ff>throws</FONT></B>&nbsp;java.rmi.<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/rmi/RemoteException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>RemoteException</U></FONT></A></B>; 

                          <LI>
                          <LI>} 
                        </LI></OL></DIV><BR><BR>/*<BR>**<BR>**FirstSessionHome.java&nbsp;<BR>**<BR>*/<BR>
                        <DIV class=codeStyle>
                        <OL>
                          <LI><B><FONT 
                          color=#0000ff>package</FONT></B>&nbsp;Dev.First; 
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;java.lang.*; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;java.rmi.<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/rmi/RemoteException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>RemoteException</U></FONT></A></B>; 

                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/CreateException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>CreateException</U></FONT></A>; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/EJBException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>EJBException</U></FONT></A>; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/SessionBean.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>SessionBean</U></FONT></A>; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/SessionContext.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>SessionContext</U></FONT></A>; 
                          <LI>
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>public</FONT></B>&nbsp;<B><FONT 
                          color=#0000ff>interface</FONT></B>&nbsp;FirstSessionHome&nbsp;<B><FONT 
                          color=#0000ff>extends</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/EJBHome.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>EJBHome</U></FONT></A>{ 
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>public</FONT></B>&nbsp;FirstSession&nbsp;create()&nbsp;<B><FONT 
                          color=#0000ff>throws</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/CreateException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>CreateException</U></FONT></A>,&nbsp;java.rmi.<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/rmi/RemoteException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>RemoteException</U></FONT></A></B>; 

                          <LI>
                          <LI>} 
                        </LI></OL></DIV><BR><BR>/*<BR>**<BR>**FirstSessionBean.java&nbsp;<BR>**<BR>*/<BR>
                        <DIV class=codeStyle>
                        <OL>
                          <LI><B><FONT 
                          color=#0000ff>package</FONT></B>&nbsp;Dev.First; 
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;java.rmi.<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/rmi/RemoteException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>RemoteException</U></FONT></A></B>; 

                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/CreateException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>CreateException</U></FONT></A>; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/EJBException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>EJBException</U></FONT></A>; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/SessionBean.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>SessionBean</U></FONT></A>; 
                          <LI><B><FONT 
                          color=#0000ff>import</FONT></B>&nbsp;javax.ejb.<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/SessionContext.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>SessionContext</U></FONT></A>; 
                          <LI>
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>public</FONT></B>&nbsp;<B><FONT 
                          color=#0000ff>class</FONT></B>&nbsp;FirstSessionBean&nbsp;<B><FONT 
                          color=#0000ff>implements</FONT></B>&nbsp;<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/SessionBean.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>SessionBean</U></FONT></A>{ 
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>public</FONT></B>&nbsp;<B><FONT 
                          color=#0000ff>void</FONT></B>&nbsp;ejbCreate()&nbsp;<B><FONT 
                          color=#0000ff>throws</FONT></B>&nbsp;<A 
                          href="http://www.javaresearch.org/source/j2ee1.3.1/javax/ejb/CreateException.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>CreateException</U></FONT></A>&nbsp;{ 

                          <LI>
                          <LI>} 
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>public</FONT></B>&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/String.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>String</U></FONT></A></B>&nbsp;Welcome(){ 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/String.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>String</U></FONT></A></B>&nbsp;msg=<FONT 
                          color=#ff33ff>"Hello!&nbsp;This&nbsp;My&nbsp;Session&nbsp;Bean&nbsp;From&nbsp;Jboss."</FONT>; 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/System.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>System</U></FONT></A></B>.out.println(msg); 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><FONT 
                          color=#0000ff>return</FONT></B>&nbsp;msg; 
                          <LI>} 
                          <LI>
                          <LI><B><FONT 
                          color=#0000ff>public</FONT></B>&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/String.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>String</U></FONT></A></B>&nbsp;getName(<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/String.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>String</U></FONT></A></B>&nbsp;id){ 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/String.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>String</U></FONT></A></B>&nbsp;name&nbsp;=&nbsp;<FONT 
                          color=#ff33ff>""</FONT>; 
                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/System.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>System</U></FONT></A></B>.out.println(<FONT 
                          color=#ff33ff>"From&nbsp;bean&nbsp;before&nbsp;getName&nbsp;:"</FONT>+&nbsp;name); 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><FONT 
                          color=#0000ff>try</FONT></B>{ 
                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dev.Dao.MysqlDao&nbsp;dao&nbsp;=&nbsp;<B><FONT 
                          color=#0000ff>new</FONT></B>&nbsp;Dev.Dao.MysqlDao(); 
                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;=&nbsp;dao.getName(id); 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/System.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>System</U></FONT></A></B>.out.println(<FONT 
                          color=#ff33ff>"From&nbsp;bean&nbsp;after&nbsp;getName&nbsp;:"</FONT>+&nbsp;name); 

                          <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<B><FONT 
                          color=#0000ff>catch</FONT></B>(<B><A 
                          href="http://www.javaresearch.org/source/jdk142/java/lang/Exception.java.html" 
                          target=_blank><FONT 
                          class=classLink><U>Exception</U></FONT></A></B>&nbsp;e){&nbsp;<B><A 
                          href="http://www.javaresearch.org/source/jdk142/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -