姿姿霸霸~~!
          貴在堅(jiān)持!
          posts - 106,  comments - 50,  trackbacks - 0

           

          改動(dòng)之前:

          SID_LIST_LISTENER =

            (SID_LIST =

              (SID_DESC =

                (SID_NAME = PLSExtProc)

                (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)

                (PROGRAM = extproc)

              )

            )

           

          LISTENER =

            (DESCRIPTION_LIST =

              (DESCRIPTION =

                (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

                (ADDRESS = (PROTOCOL = TCP)(HOST = sure1212)(PORT = 1521))

              )

            )


          在netmanager中添加數(shù)據(jù)庫(kù)的監(jiān)聽(tīng) 


          改動(dòng)之后
          :

          SID_LIST_LISTENER =

            (SID_LIST =

              (SID_DESC =

                (SID_NAME = PLSExtProc)

                (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)

                (PROGRAM = extproc)

              )

              (SID_DESC =

                (GLOBAL_DBNAME = TEST.SURE)

                (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)

                (SID_NAME = test)

              )

            )

           

          LISTENER =

            (DESCRIPTION_LIST =

              (DESCRIPTION =

                (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

              )

              (DESCRIPTION =

                (ADDRESS = (PROTOCOL = TCP)(HOST = sure1212)(PORT = 1521))

              )

            )

          posted @ 2010-05-16 17:09 xrzp 閱讀(193) | 評(píng)論 (0)編輯 收藏
          1.

          SQL> drop user sysman cascade;

          用戶已刪除。

          SQL> drop role MGMT_USER;

          角色已刪除。

          SQL> drop user MGMT_VIEW cascade;

          用戶已刪除。

          SQL> drop public synonym MGMT_TARGET_BLACKOUTS;

          同義詞已刪除。

          SQL> drop public synonym SETEMVIEWUSERCONTEXT;

          同義詞已刪除。

          2.emca -deconfig dbcontrol db -repos drop

          3.emca -config dbcontrol db -repos create

          posted @ 2010-01-27 23:36 xrzp 閱讀(193) | 評(píng)論 (0)編輯 收藏
          /**
               * 按照指定長(zhǎng)度將字符串進(jìn)行分割,中文字符算2個(gè)長(zhǎng)度
               * 
          @param str 字符串
               * 
          @param length 指定長(zhǎng)度
               * 
          @return 如果字符串長(zhǎng)度超出指定長(zhǎng)度
               * ,則將字符串分成2個(gè)部分,分別裝在map中
               
          */

              
          public static Map getStr(String str, int length) {
                  HashMap hashMap 
          = new HashMap();
                  String addr1 
          = "";
                  String addr2 
          = "";

                  
          byte tmpBytes[] = str.getBytes();
                  
          int iByteLen = tmpBytes.length;
                  
          if (iByteLen > length) {
                      
          int iLen = 0;
                      
          for (int i = 0; i < length; i++{
                          
          if ((tmpBytes[i] & 0xFF> 0x80{
                              iLen 
          += 2;
                              i
          ++;
                              
          continue;
                          }
           else {
                              iLen 
          += 1;
                              
          continue;
                          }

                      }


                      addr1 
          = new String(tmpBytes, 0, iLen);
                      addr2 
          = new String(tmpBytes, iLen, iByteLen - iLen);
                  }
           else {
                      addr1 
          = str;
                  }

                  hashMap.put(
          new Integer(1), addr1);
                  hashMap.put(
          new Integer(2), addr2);
                  
          return hashMap;
              }


          0x80等于十進(jìn)制的128,Turbo C中規(guī)定對(duì)ASCII碼值大于0x80的字符將被認(rèn)為是負(fù)數(shù)。
          posted @ 2009-09-22 22:32 xrzp 閱讀(2145) | 評(píng)論 (1)編輯 收藏
          在web.xml,要對(duì)2個(gè)框架的分發(fā),分別配置不同的url-pattern!!!
          posted @ 2009-04-20 16:58 xrzp 閱讀(566) | 評(píng)論 (0)編輯 收藏
          public String getOriginalFilename(String filePath) {
                  String filename 
          = filePath;
                  
          if (filename == null{
                      
          return "";
                  }

                  
          int pos = filename.lastIndexOf("/");
                  
          if (pos == -1{
                      pos 
          = filename.lastIndexOf("\\");
                  }

                  
          if (pos != -1{
                      
          return filename.substring(pos + 1);
                  }
           else {
                      
          return filename;
                  }

              }
          posted @ 2009-04-18 20:14 xrzp 閱讀(245) | 評(píng)論 (0)編輯 收藏
          new java.text.DecimalFormat("0.00").format(xxx);
          posted @ 2009-04-08 12:41 xrzp 閱讀(303) | 評(píng)論 (0)編輯 收藏

          在web.xml中加入

          <mime-mapping>   
              <extension>xls</extension>   
              <mime-type>application/excel</mime-type>  
          </mime-mapping>

          服務(wù)器端同時(shí)安裝上Excel

          posted @ 2009-03-26 10:29 xrzp 閱讀(539) | 評(píng)論 (1)編輯 收藏
               摘要: 1.用spring的mail發(fā)郵件需要將j2ee包里的mail.jar和activation.jar引入 2.遇見(jiàn)的異常可能會(huì)有    (1)java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream    (2)java.lang.NoClassDefFoundErro...  閱讀全文
          posted @ 2008-10-18 16:18 xrzp 閱讀(2722) | 評(píng)論 (4)編輯 收藏
              <!-- 配置事務(wù)開(kāi)始 -->
              
          <bean id="txManager"
                  class
          ="org.springframework.jdbc.datasource.DataSourceTransactionManager">
                  
          <property name="dataSource">
                      
          <ref bean="dataSource" />
                  
          </property>
              
          </bean>
              
              
          <tx:advice id="txAdvice" transaction-manager="txManager">
                  
          <tx:attributes>
                      
          <tx:method name="get*" read-only="true" />
                      
          <tx:method name="save*" propagation="REQUIRED"/>
                      
          <tx:method name="add*" propagation="REQUIRED"/>
                      
          <tx:method name="del*" propagation="REQUIRED"/>
                      
          <tx:method name="update*"/>
                  
          </tx:attributes>
              
          </tx:advice>

              
          <aop:config>
                  
          <aop:pointcut id="testTxAop"
                      expression
          ="execution(* com.sure.demo.dao.*.*(..))" />
                  
          <aop:advisor advice-ref="txAdvice" pointcut-ref="testTxAop" />
              
          </aop:config>
              
              
          <!-- 配置事務(wù)結(jié)束 -->

          使用事務(wù)的時(shí)候,在DAO就不要用try{}catch{}了,因?yàn)樵赾atch里面捕獲的異常,spring的事務(wù)貌似不能去回滾
          posted @ 2008-10-15 22:47 xrzp 閱讀(289) | 評(píng)論 (0)編輯 收藏
          今天做了個(gè)aop的試驗(yàn),對(duì)于springmvc的action不能攔截成功,研究了很久,沒(méi)有找到問(wèn)題,所以請(qǐng)教下大家.
          下面是代碼:

          1.springmvc的action:
          package com.sure.demo.web;

          import java.util.Date;

          import javax.servlet.http.HttpServletRequest;
          import javax.servlet.http.HttpServletResponse;

          import org.springframework.web.servlet.ModelAndView;
          import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

          public class DemoTestAction extends MultiActionController {

              
          //返回的test頁(yè)面
              private String testPage;
            
              
          public String getTestPage() {
              
          return testPage;
              }


              
          public void setTestPage(String testPage) {
              
          this.testPage = testPage;
              }




              
          /**
               * test入口
               * 
          @param request
               * 
          @param response
               * 
          @return
               * 
          @throws Exception
               
          */

              
          public ModelAndView test(HttpServletRequest request,
                  HttpServletResponse response) 
          throws Exception {
              ModelAndView mav 
          = null;
              mav 
          = new ModelAndView(this.getTestPage());
              request.setAttribute(
          "test"new Date().toString());
              
          return mav;
              }

              
          }

          2.jsp代碼:
          <%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
          <%
          String test = (String)request.getAttribute("test");
          %>

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <html>
            
          <head>
           
            
          </head>
            
            
          <body>
              當(dāng)前時(shí)間是:
          <%=test %> <br>
            
          </body>
          </html>

          3.aop代碼:
          package com.sure.aopdemo;

          import org.aspectj.lang.JoinPoint;

          public class AopDemoTestImpl {

              
          public void afterTest(JoinPoint joinPoint) {
              System.out.println(
          "aop--執(zhí)行類:"+joinPoint.getThis()+""+joinPoint.getSignature().getName()+"方法之后");
              }


              
          public void beforeTest(JoinPoint joinPoint) {
              System.out.println(
          "aop--執(zhí)行類:"+joinPoint.getThis()+""+joinPoint.getSignature().getName()+"方法之前");
              }


              
          public void exceptionTest() {
              System.out.println(
          "aop方法異常");
              }


          }

          4.xml關(guān)于aop的配置:
          <?xml version="1.0" encoding="UTF-8"?>
          <beans xmlns="http://www.springframework.org/schema/beans"
                   xmlns:xsi
          ="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:aop
          ="http://www.springframework.org/schema/aop"
                   xmlns:tx
          ="http://www.springframework.org/schema/tx"
                   xsi:schemaLocation
          ="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                     http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
                     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
          >
              
              
          <bean id="aopDemoTestImpl" class="com.sure.aopdemo.AopDemoTestImpl"></bean>
              
              
          <aop:config>
                  
          <aop:aspect id="test" ref="aopDemoTestImpl">
                      
          <aop:pointcut id="a" expression="execution(* com.sure.demo..*.*(..))"/>
                      
          <aop:before method="beforeTest" pointcut-ref="a"/>
                      
          <aop:after method="afterTest" pointcut-ref="a"/>
                      
          <aop:after-throwing method="exceptionTest" pointcut-ref="a"/>
                  
          </aop:aspect>
              
          </aop:config>
              
          </beans>
          posted @ 2008-09-22 23:19 xrzp 閱讀(7670) | 評(píng)論 (11)編輯 收藏
          僅列出標(biāo)題
          共11頁(yè): First 上一頁(yè) 3 4 5 6 7 8 9 10 11 下一頁(yè) 

          <2025年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          常用鏈接

          留言簿(4)

          隨筆分類

          隨筆檔案

          好友的blog

          搜索

          •  

          積分與排名

          • 積分 - 117468
          • 排名 - 500

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 武陟县| 壶关县| 武定县| 老河口市| 四平市| 天全县| 杨浦区| 德州市| 左云县| 新乡县| 东明县| 甘德县| 阿鲁科尔沁旗| 佳木斯市| 馆陶县| 泸定县| 宁武县| 临西县| 勃利县| 甘南县| 鹤山市| 新河县| 海安县| 韶山市| 轮台县| 高邑县| 梨树县| 绥宁县| 衡阳市| 大足县| 永寿县| 舟曲县| 精河县| 乌恰县| 汕尾市| 武宁县| 如皋市| 庆城县| 河源市| 扎赉特旗| 汉中市|