锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产亚洲综合久久,亚洲人成亚洲精品,久久精品亚洲一区二区三区浴池http://m.tkk7.com/luckyrobbie/category/8782.html<font size=-1>JAVA鏄摑鑹茬殑-</font> <!-- Start FastOnlineUsers.com --> <a ><script type="text/javascript" src="http://fastonlineusers.com/on2.php?d=m.tkk7.com/luckyrobbie"></script> online</a><!-- End FastOnlineUsers.com -->zh-cnWed, 28 Feb 2007 08:18:57 GMTWed, 28 Feb 2007 08:18:57 GMT60Weblogic JMS 鐨勯厤緗拰MDB鐨勫簲鐢?鍚絎旇)http://m.tkk7.com/luckyrobbie/archive/2006/03/23/37048.htmlluckyrobbieluckyrobbieThu, 23 Mar 2006 06:51:00 GMThttp://m.tkk7.com/luckyrobbie/archive/2006/03/23/37048.htmlhttp://m.tkk7.com/luckyrobbie/comments/37048.htmlhttp://m.tkk7.com/luckyrobbie/archive/2006/03/23/37048.html#Feedback0http://m.tkk7.com/luckyrobbie/comments/commentRss/37048.htmlhttp://m.tkk7.com/luckyrobbie/services/trackbacks/37048.html
  • 鍦↗MS鐨凜onnection Factories 涓柊寤轟竴涓繛鎺ュ伐鍘?
  • 鍦⊿tores涓柊寤轟竴涓瓨鍌ㄧ┖闂達(dá)紝鍙互涓簀dbc鎴栬協(xié)ile綾誨瀷
  • 鍦⊿ervers涓柊寤轟竴涓猄erver
  • 灞曞紑鍒氭墠鍒涘緩鐨凞emoJMSServer錛屾柊寤轟竴涓狣estinations錛屽叾涓湁2縐嶇被鍨嬶紝queue錛氱偣瀵圭偣鏂瑰紡錛宼opic錛氬箍鎾柟寮忕粰鎵鏈夌殑MDB
  • 鍦╦b涓柊寤轟竴涓狹DB錛宼ransaction type:bean 錛孌estination type:javax.jms.Queue錛屽湪Destination name涓緭鍏ュ垰鎵嶅湪weblogic鐨刯ms閲岄潰寤虹珛鐨勭洰鏍囧悕縐幫紝Pool properties鐨凪aximum pool size:10
  • 鍦╫nMessage鏂規(guī)硶涓姞鍏ヤ唬鐮?
    publicvoid聽onMessage(Message聽msg){聽
    try{

    聽聽聽聽聽聽TextMessage聽TMS聽
    =聽(TextMessage)聽msg;

    聽聽聽聽聽聽String聽a1聽
    =聽TMS.getText();

    聽聽聽聽聽聽String聽b1聽
    =聽a1;

    聽聽聽聽聽聽System.out.println(
    "Message聽getted聽I(yíng)s聽:"+聽a1聽+">>>>>>>>>>>OK");

    聽聽聽聽聽聽Context聽context聽
    =new聽I(yíng)nitialContext();

    聽聽聽聽聽聽Object聽ref聽
    =聽context.lookup("Sess");聽 //session bean鐨勬湰鍦版帴鍙?br />
    聽聽聽聽聽聽SessHome聽sessHome聽
    =聽(SessHome)聽PortableRemoteObject.narrow(ref,聽SessHome.class);

    聽聽聽聽聽聽sessHome.create().insTableAa11(a1,聽b1);

    聽聽聽聽聽聽
    //榪欐槸閫氳繃Session聽Bean鐨刬nsTableAa11璋冪敤EntityBean鐨別jbHomeEjbInsertAa11

    聽聽聽聽聽聽
    //鍔熻兘鍏舵槸寰堢畝鍗曪紝鎻掑叆Aa11琛ㄤ竴鏉¤褰?a1,a1)

    聽聽聽聽}


    聽聽聽聽
    catch聽(Exception聽ex)聽{

    聽聽聽聽聽聽ex.printStackTrace();

    聽聽聽聽}

    }
  • deploy榪欎釜娑堟伅椹卞姩Bean
  • new涓涓狹DBTestClient class
    package聽bmpsessmdb;
    import聽java.util.*;

    import聽javax.jms.*;

    import聽javax.naming.*;


    publicclass聽MDBTestClient聽{
    聽聽聽聽
    publicfinalstatic聽String

    聽聽聽聽聽聽JNDI_FACTORY聽
    ="weblogic.jndi.WLInitialContextFactory";

    聽聽
    publicfinalstatic聽String聽URL聽="t3://127.0.0.1:7001";

    聽聽
    privatestaticfinal聽String聽QUEUE_CONNECTION_FACTORY聽=

    聽聽聽聽聽聽
    "DemoJMSConnectionFactory";

    聽聽
    privatestaticfinal聽String聽QUEUE聽="DemoJMSQueue";

    聽聽
    privatestatic聽I(yíng)nitialContext聽getInitialContext(String聽url)聽throws

    聽聽聽聽聽聽NamingException聽
    {

    聽聽聽聽Hashtable聽env聽
    =new聽Hashtable();

    聽聽聽聽env.put(Context.INITIAL_CONTEXT_FACTORY,聽JNDI_FACTORY);

    聽聽聽聽env.put(Context.PROVIDER_URL,聽url);

    聽聽聽聽
    returnnew聽I(yíng)nitialContext(env);

    聽聽}




    聽聽
    publicstaticvoid聽main(String[]聽args)聽throws聽Exception聽{

    聽聽聽聽Context聽ctx聽
    =聽getInitialContext(URL);

    聽聽聽聽QueueConnectionFactory聽qConnFact聽
    =

    聽聽聽聽(QueueConnectionFactory)聽ctx.lookup(QUEUE_CONNECTION_FACTORY);

    聽聽聽聽QueueConnection聽qConn聽
    =聽qConnFact.createQueueConnection();

    聽聽聽聽QueueSession聽qSess聽
    =聽qConn.createQueueSession(false,

    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Session.AUTO_ACKNOWLEDGE);

    聽聽聽聽Queue聽q聽
    =聽(Queue)聽ctx.lookup(QUEUE);

    聽聽聽聽QueueSender聽qSend聽
    =聽qSess.createSender(q);



    聽聽聽聽TextMessage聽txtMsg聽
    =聽qSess.createTextMessage("songtx3");

    聽聽聽聽System.out.println(
    "Sending聽a聽message聽to聽queue");

    聽聽聽聽qSend.send(txtMsg);

    聽聽聽聽
    //---------------------------------------------------------//

    聽聽聽聽txtMsg聽
    =聽qSess.createTextMessage("songtx4");

    聽聽聽聽System.out.println(
    "Sending聽a聽message聽to聽queue");

    聽聽聽聽qSend.send(txtMsg);

    聽聽聽聽
    //---------------------------------------------------------//

    聽聽聽聽qConn.close();

    聽聽聽聽System.exit(
    0);

    聽聽}


    }
  • 榪愯嫻嬭瘯錛宱ver


  • luckyrobbie 2006-03-23 14:51 鍙戣〃璇勮
    ]]>
    Tomcat 鍜?Weblogic 涓厤緗產(chǎn)pplication鐨勫畨鍏ㄧ瓥鐣?鍚絎旇)http://m.tkk7.com/luckyrobbie/archive/2006/03/22/36854.htmlluckyrobbieluckyrobbieWed, 22 Mar 2006 06:24:00 GMThttp://m.tkk7.com/luckyrobbie/archive/2006/03/22/36854.htmlhttp://m.tkk7.com/luckyrobbie/comments/36854.htmlhttp://m.tkk7.com/luckyrobbie/archive/2006/03/22/36854.html#Feedback0http://m.tkk7.com/luckyrobbie/comments/commentRss/36854.htmlhttp://m.tkk7.com/luckyrobbie/services/trackbacks/36854.html棣栧厛瀹氫箟浜?jiǎn)tomcat-users.xml 涓殑鍐呭錛屼富瑕佽緗簡(jiǎn)鐢ㄦ埛鍜岃鑹?br />
    <?xml聽version='1.0'聽encoding='utf-8'?>
    <tomcat-users>
    聽聽
    <role聽rolename="tomcat"/>
    聽聽
    <role聽rolename="role1"/>
    聽聽
    <role聽rolename="manager"/>
    聽聽
    <role聽rolename="wxds"聽description=""/>
    聽聽
    <role聽rolename="admin"/>
    聽聽
    <user聽username="tomcat"聽password="tomcat"聽roles="tomcat"/>
    聽聽
    <user聽username="both"聽password="tomcat"聽roles="tomcat,role1"/>
    聽聽
    <user聽username="role1"聽password="tomcat"聽roles="role1"/>
    聽聽
    <user聽username="abc"聽password="abc"聽fullName="abcabc"聽roles="wxds"/>
    聽聽
    <user聽username="admin"聽password=""聽roles="admin,manager"/>
    </tomcat-users>

    鐒跺悗鍦╝pplication涓殑web.xml涓搴旂殑<web-app>涓鍔犲涓嬭緗?br />
    聽聽聽<security-constraint>
    聽聽聽聽聽聽聽
    <web-resource-collection>
    聽聽聽聽聽聽聽聽聽聽聽
    <web-resource-name>Protected聽Area</web-resource-name>
    聽聽聽聽聽聽聽聽
    <!--聽Define聽the聽context-relative聽URL(s)聽to聽be聽protected-->
    聽聽聽聽聽聽聽聽聽聽聽
    <url-pattern>錛?/span>*</url-pattern>
    聽聽聽聽聽聽聽聽
    <!--聽I(yíng)f聽you聽list聽http聽methods,聽only聽those聽methods聽are聽protected-->
    聽聽聽聽聽聽聽聽
    <http-method>DELETE</http-method>
    聽聽聽聽聽聽聽聽聽聽聽
    <http-method>GET</http-method>
    聽聽聽聽聽聽聽聽聽聽聽
    <http-method>POST</http-method>
    聽聽聽聽聽聽聽聽
    <http-method>PUT</http-method>
    聽聽聽聽聽聽聽
    </web-resource-collection>
    聽聽聽聽聽聽聽
    <auth-constraint>
    聽聽聽聽聽聽聽聽聽聽聽
    <!--聽Anyone聽with聽one聽of聽the聽listed聽roles聽may聽access聽this聽area聽-->
    聽聽聽聽聽聽聽聽聽聽聽
    <role-name>wxds</role-name>
    聽聽聽聽聽聽聽
    </auth-constraint>
    聽聽聽
    </security-constraint>
    聽聽聽
    <login-config>
    聽聽聽聽聽聽聽
    <auth-method>BASIC</auth-method>
    聽聽聽聽聽聽聽
    <realm-name>EShop</realm-name>
    聽聽聽
    </login-config>

    榪欐牱灝卞ソ浜?jiǎn)锛岀櫿d綍榪欎釜web搴旂敤浼?xì)鏈変釜楠岃瘉绐楀彛寮瑰嚭锛岃緭鍏ョ敤鎴峰悕abc鍜屽瘑鐮乤bc鍚庡氨鑳芥甯歌闂簡(jiǎn)銆?br />
    鍦╳eblogic8.1涓殑閰嶇疆姣旇緝楹葷儲(chǔ)錛岄鍏堝湪web.xml鐨?lt;web-app>涓鍔犱笂闈竴孌典唬鐮佸悗錛岃繕瑕佸姞涓婅繖涓孌?br />
    <security-role>
    聽聽聽聽聽聽
    <role-name>wxds</role-name>
    </security-role>

    鐒跺悗鏂板緩涓涓獁eblogic.xml 鍐呭濡備笅
    <?xml聽version="1.0"聽encoding="UTF-8"?>
    <!DOCTYPE聽weblogic-web-app聽PUBLIC聽"-//BEA聽Systems,聽I(yíng)nc.//DTD聽Web聽Application聽8.1//EN""http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

    <weblogic-web-app>

    聽聽
    <security-role-assignment>
    聽聽聽聽
    <role-name>wxds</role-name>
    聽聽聽聽
    <principal-name>wxds_group</principal-name>
    聽聽
    </security-role-assignment>

    </weblogic-web-app>

    榪涘叆weblogic鐨刢onsole錛屽湪mydomain-security-realms涓柊寤轟竴涓猺ealm
    name: wxdsRealm
    check roles and policies for: web applications and ejbs protected in dd
    灞曞紑wxdsRealm錛?br />鍦╬roviders涓璫onfigure a new default adjudicator... 榛樿鍒涘緩
    鍦╝uditors涓垱寤轟竴涓己鐪乤uditor
    鐒跺悗鍒涘緩涓涓己鐪佺殑authentication,authorizers, cred mappers 鍜宺ole mapper 絳夌瓑
    鏈鍚庡彲浠ュ湪testing涓祴璇曚竴涓?validate this security realm... 鐪嬫槸鍚uccessful

    鍦╣roups涓畾涔変竴涓猤roup name: wxds_group
    鍦╱sers涓璫onfigure a new user
    name: jyds password:11111111
    鎶婂垰鎵嶅緩绔嬬殑wxds_group 澧炲姞榪涙潵

    鎶奡ecurity涓殑Default Realm璁劇疆涓簑xdsRealm, 鏈鍚嶢pply灝眔k鍟︺?br />



    luckyrobbie 2006-03-22 14:24 鍙戣〃璇勮
    ]]>
    主站蜘蛛池模板: 亚洲综合伊人久久综合| 亚洲伊人久久大香线焦| 全部免费国产潢色一级| 国产精品免费久久| 亚洲精品电影在线| 免费看国产曰批40分钟| 久久爰www免费人成| 亚洲精品天堂成人片AV在线播放| 亚洲国产成人VA在线观看| 免费无遮挡无码永久视频| 日韩国产精品亚洲а∨天堂免| 亚洲日本va中文字幕久久| 最近的中文字幕大全免费版| 久久免费国产精品| 亚洲中文字幕AV在天堂| 国产亚洲成av片在线观看| 国产福利免费观看| 亚洲视频免费在线播放| 午夜在线免费视频| 国产精品亚洲专区在线观看 | 巨胸喷奶水视频www免费视频| 亚洲日韩中文字幕天堂不卡| 亚洲色偷偷综合亚洲AVYP| 午夜神器成在线人成在线人免费| 可以免费观看的国产视频| 爱情岛论坛亚洲品质自拍视频网站 | 日本在线免费播放| 午夜在线亚洲男人午在线| 亚洲成A∨人片在线观看无码| 中文字幕中韩乱码亚洲大片| 男人的好免费观看在线视频| 久久免费精彩视频| 一区二区三区免费电影| 亚洲av无码专区首页| 亚洲美女在线观看播放| 久久亚洲精品无码观看不卡| 国产高清免费在线| 女人18毛片水真多免费播放| 亚洲免费电影网站| 99蜜桃在线观看免费视频网站| 久久久久久久久久久免费精品|