<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    ゞ沉默是金ゞ

    魚離不開水,但是沒有說不離開哪滴水.
    posts - 98,comments - 104,trackbacks - 0

    This topic describes a simple unsecured sample. Additional security features are added incrementally in the steps of the tutorial to increase the amount of integrated security that is available.

    Before you begin

    Note: All of the files required for this step of the tutorial are provided in the following section.

    Procedure

    Running the sample

    Start the catalog service by using the following scripts. For more information about starting the catalog service, see Starting the catalog service in a stand-alone environment.

    1. Navigate to the bin directory: cd objectgridRoot/bin
    2. Start a catalog server named catalogServer:
      • [Unix][Linux] startOgServer.sh catalogServer
      • [Windows] startOgServer.bat catalogServer
    3. Navigate to the bin directory cd objectgridRoot/bin
    4. Then launch a container server named c0 with the following script:
      • [Unix][Linux]
        startOgServer.sh c0 -objectGridFile ../xml/SimpleApp.xml -deploymentPolicyFile ../xml/SimpleDP.xml  -catalogServiceEndPoints localhost:2809 
      • [Windows]
        startOgServer.bat c0 -objectGridFile ../xml/SimpleApp.xml - deploymentPolicyFile ../xml/SimpleDP.xml  -catalogServiceEndPoints localhost:2809

    Example

    For more information about starting container servers, see Starting container processes.

    After the catalog server and container server have been started, launch the client as follows.
    1. Navigate to the bin directory one more time.
    2. java -classpath ../lib/objectgrid.jar;../applib/secsample.jar com.ibm.websphere.objectgrid.security.sample.guide.SimpleApp
    The secsample.jar file contains the SimpleApp class.

    The output of this program is:

    The customer name for ID 0001 is fName lName

    You may also use xsadmin to show the mapsizes of the "accounting" grid.
    • Navigate to the directory objectgridRoot/bin.
    • Use the xsadmin command with option -mapSizes as follows.
      • [Unix][Linux] xsadmin.sh -g accounting -m mapSet1 -mapSizes
      • [Windows] xsadmin.bat -g accounting -m mapSet1 -mapSizes

      You will see the following output.

      This administrative utility is provided as a sample only and is not to be considered a fully supported component of the WebSphere eXtreme Scale product.

      Connecting to Catalog service at localhost:1099

      *********** Displaying Results for Grid - accounting, MapSet - mapSet1 ***********

      *** Listing Maps for c0 ***

      Map Name: customer Partition #: 0 Map Size: 1 Shard Type: Primary

      Server Total: 1

      Total Domain Count: 1

    Stopping servers

    Container server

    Use the following command to stop the container server c0.

    [Unix][Linux] stopOgServer.sh c0 -catalogServiceEndPoints localhost:2809

    [Windows] stopOgServer.bat c0 -catalogServiceEndPoints localhost:2809

    You will see the following message.

    CWOBJ2512I: ObjectGrid server c0 stopped.

    Catalog server

    You can stop a catalog server using the following command.

    [Unix][Linux] stopOgServer.sh catalogServer -catalogServiceEndPoints localhost:2809

    [Windows] stopOgServer.bat catalogServer -catalogServiceEndPoints localhost:2809

    If you shut down the catalog server, you will see the following message.

    CWOBJ2512I: ObjectGrid server catalogServer stopped.

    Required files

    The file below is the Java class for SimpleApp.

    SimpleApp.java // This sample program is provided AS IS and may be used, executed, copied and modified  // without royalty payment by customer  // (a) for its own instruction and study,  // (b) in order to develop applications designed to run with an IBM WebSphere product,  // either for customer's own internal use or for redistribution by customer, as part of such an  // application, in customer's own products. // Licensed Materials - Property of IBM // 5724-J34 (C) COPYRIGHT International Business Machines Corp. 2007-2009 package com.ibm.websphere.objectgrid.security.sample.guide;  import com.ibm.websphere.objectgrid.ClientClusterContext; import com.ibm.websphere.objectgrid.ObjectGrid; import com.ibm.websphere.objectgrid.ObjectGridManager; import com.ibm.websphere.objectgrid.ObjectGridManagerFactory; import com.ibm.websphere.objectgrid.ObjectMap; import com.ibm.websphere.objectgrid.Session;  public class SimpleApp {      public static void main(String[] args) throws Exception {          SimpleApp app = new SimpleApp();         app.run(args);     }      /**      * read and write the map       * @throws Exception      */     protected void run(String[] args) throws Exception {         ObjectGrid og = getObjectGrid(args);          Session session = og.getSession();          ObjectMap customerMap = session.getMap("customer");          String customer = (String) customerMap.get("0001");          if (customer == null) {             customerMap.insert("0001", "fName lName");         } else {             customerMap.update("0001", "fName lName");         }         customer = (String) customerMap.get("0001");          System.out.println("The customer name for ID 0001 is " + customer);     }      /**      * Get the ObjectGrid      * @return an ObjectGrid instance      * @throws Exception      */     protected ObjectGrid getObjectGrid(String[] args) throws Exception {         ObjectGridManager ogManager = ObjectGridManagerFactory.getObjectGridManager();          // Create an ObjectGrid          ClientClusterContext ccContext = ogManager.connect("localhost:2809", null, null);         ObjectGrid og = ogManager.getObjectGrid(ccContext, "accounting");          return og;      }  }

    The getObjectGrid method in this class obtains an ObjectGrid, and the run method reads a record from the customer map and updates the value.

    To run this sample in a distributed environment, an ObjectGrid descriptor XML file SimpleApp.xml, and a deployment XML file, SimpleDP.xml, are created. The files are featured in the following example:

    SimpleApp.xml  <?xml version="1.0" encoding="UTF-8"?> <objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  	xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd"  	xmlns="http://ibm.com/ws/objectgrid/config">     <objectGrids>         <objectGrid name="accounting">             <backingMap name="customer" readOnly="false" copyKey="true"/>         </objectGrid>     </objectGrids> </objectGridConfig> 

    The following XML file configures the deployment environment.

    SimpleDP.xml  <?xml version="1.0" encoding="UTF-8"?> <deploymentPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 	xsi:schemaLocation="http://ibm.com/ws/objectgrid/deploymentPolicy ../deploymentPolicy.xsd" 	xmlns="http://ibm.com/ws/objectgrid/deploymentPolicy">  	<objectgridDeployment objectgridName="accounting"> 		<mapSet name="mapSet1" numberOfPartitions="1" minSyncReplicas="0" maxSyncReplicas="2"  			maxAsyncReplicas="1"> 			<map ref="customer"/> 		</mapSet> 	</objectgridDeployment> </deploymentPolicy>

    This is a simple ObjectGrid configuration with one ObjectGrid instance named "accounting" and one map named "customer" (within the mapSet "mapSet1"). The SimpleDP.xml file features one map set that is configured with 1 partition and 0 minimum required replicas.

    posted on 2012-06-26 19:31 ゞ沉默是金ゞ 閱讀(830) 評論(1)  編輯  收藏 所屬分類: eXtreme

    FeedBack:
    # re: Java SE security tutorial - Step 1
    2012-06-26 19:55 | 復制的
    復制的  回復  更多評論
      
    主站蜘蛛池模板: 亚洲一区二区三区四区视频| 亚洲精品国产自在久久| 亚洲国产精品13p| 亚洲av综合av一区二区三区| 成人黄软件网18免费下载成人黄18免费视频 | 国产裸体美女永久免费无遮挡| 四虎永久免费地址在线观看| 欧美亚洲国产SUV| 四虎永久成人免费| 免费的黄网站男人的天堂| 一本色道久久88亚洲综合| 粉色视频成年免费人15次| 亚洲婷婷国产精品电影人久久| 成人免费观看男女羞羞视频| 亚洲乱码中文字幕手机在线 | 91亚洲国产成人精品下载| 30岁的女人韩剧免费观看| 亚洲精品偷拍无码不卡av| 99re热免费精品视频观看| 亚洲成a人无码亚洲成av无码| 日本免费无遮挡吸乳视频电影| 精品一区二区三区免费毛片| 亚洲毛片αv无线播放一区| 久久免费视频99| 亚洲国产系列一区二区三区 | 免费精品99久久国产综合精品| 亚洲无删减国产精品一区| 好男人视频社区精品免费| 男男黄GAY片免费网站WWW| 亚洲国产精品无码久久久蜜芽| 在线a免费观看最新网站| 亚洲中文字幕精品久久| 亚洲一区精品伊人久久伊人 | 久久aa毛片免费播放嗯啊| 亚洲人成色4444在线观看| 亚洲高清无码专区视频| 99精品视频免费观看| 亚洲av无码成人精品区一本二本| 国产亚洲情侣一区二区无码AV| 91制片厂制作传媒免费版樱花| 黄页网址在线免费观看|