??xml version="1.0" encoding="utf-8" standalone="yes"?>一本色道久久综合亚洲aⅴ蜜桃,国产精品乱战久久久,亚洲成人av高清http://www.aygfsteel.com/cctvx1/zh-cnWed, 18 Jun 2025 14:40:02 GMTWed, 18 Jun 2025 14:40:02 GMT60ActiveMQ 实践之\(一) 启动你的ActiveMQhttp://www.aygfsteel.com/cctvx1/archive/2007/02/08/98835.htmlDr.WaterDr.WaterThu, 08 Feb 2007 09:54:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2007/02/08/98835.htmlhttp://www.aygfsteel.com/cctvx1/comments/98835.htmlhttp://www.aygfsteel.com/cctvx1/archive/2007/02/08/98835.html#Feedback2http://www.aygfsteel.com/cctvx1/comments/commentRss/98835.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/98835.html作?cctvx1
 关键?ActiveMQ,实践 

    一.安装ActiveMQ

       首先?a >http://activemq.apache.org/download.html 下蝲最新版?.1.0release (http://activemq.apache.org/activemq-410-release.html),
    解压apache-activemq-4.1-incubator.zip(或者apache-activemq-4.1-incubator.tar.gz)目录如下:
      
       +bin       (windows下面的bat和unix/linux下面的sh)
       +conf      (activeMQ配置目录,包含最基本的activeMQ配置文g)
       +data      (默认是空?
       +docs      (index,replease版本里面没有文档,-.-b不知道ؓ啥不?
       +example   (几个例子
       +lib       (activemMQ使用到的lib)
       -apache-activemq-4.1-incubator.jar  (ActiveMQ的binary)
       -LICENSE.txt      
       -NOTICE.txt       
       -README.txt
       -user-guide.html


       你可以用bin\activemq.bat(activemq) 启动,如果一切顺?你就会看见类g面的信息
      (l节可能不一?比如路径,或者jmx,jdbc信息)

  ACTIVEMQ_HOME: D:\java\framework_and_lib\activemq\apache-activemq-4.1-incubator\
bin\..
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - ActiveMQ null JMS Message Broker (localho
st) is starting
INFO  BrokerService                  - For help or more information please see:
http://incubator.apache.org/activemq/
INFO  ManagementContext              - JMX consoles can connect to service:jmx:r
mi:///jndi/rmi://localhost:1099/jmxrmi
INFO  JDBCPersistenceAdapter         - Database driver recognized: [apache_derby
_embedded_jdbc_driver]
INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive lock
to become the Master broker
INFO  DefaultDatabaseLocker          - Becoming the master on dataSource: org.ap
ache.derby.jdbc.EmbeddedDataSource@1d840cd
INFO  JournalPersistenceAdapter      - Journal Recovery Started from: Active Jou
rnal: using 5 x 20.0 Megs at: D:\java\framework_and_lib\activemq\apache-activemq
-4.1-incubator\activemq-data\journal
INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in transa
ctions recovered.
INFO  TransportServerThreadSupport   - Listening for connections at: tcp://P-SUW
EI:61616
WARN  MulticastDiscoveryAgent        - brokerName not set
INFO  TransportConnector             - Connector default Started
INFO  TransportServerThreadSupport   - Listening for connections at: stomp://P-S
UWEI:61613
INFO  TransportConnector             - Connector stomp Started
INFO  NetworkConnector               - Network Connector default Started
INFO  BrokerService                  - ActiveMQ JMS Message Broker (localhost, I
D:P-SUWEI-1207-1170916242296-1:0) started     

         *。几个小提示
  1. q个仅仅是最基础的ActiveMQ的配|?很多地方都没有配|因此不要直接用这个配|用于生产系l?br />  2. 有的时候由于端口被占用,DActiveMQ错误,ActiveMQ可能需要以下端?099(JMX),61616(默认的TransportConnector)
  3. 如果没有物理|卡,或者MS的LoopBackAdpater Multicast会报一个错?/p>

     ? 试你的ActiveMQ
       
          ׃ActiveMQ是一个独立的jms provider,所以我们不需要其他Q何第三方服务器就可以马上做我们的试?~译
     example目录下面的程?br />         
   ProducerTool/ConsumerTool 是JMS参考里面提到的典型应用,Producer产生消息,Consumer消费消息
   而且q个例子q可以加入参数帮助你试刚才启动的本地ActiveMQ或者是q程的ActiveMQ

   ProducerTool [url] broker的地址,默认的是tcp://localhost:61616
                [true|flase] 是否使用topic,默认是false
         [subject] subject的名?默认是TOOL.DEFAULT
         [durabl] 是否持久化消?默认是false
         [messagecount] 发送消息数?默认?0
         [messagesize] 消息长度,默认?55
         [clientID] durable为true的时?需要配|clientID
         [timeToLive] 消息存活旉
         [sleepTime] 发送消息中间的休眠旉
         [transacte]  是否采用事务

         
          ConsumerTool [url] broker的地址,默认的是tcp://localhost:61616
                [true|flase] 是否使用topic,默认是false
         [subject] subject的名?默认是TOOL.DEFAULT
         [durabl] 是否持久化消?默认是false
         [maxiumMessages] 接受最大消息数?0表示不限?br />       
         [clientID] durable为true的时?需要配|clientID
        
         [transacte]  是否采用事务
         [sleepTime]  接受消息中间的休眠时?默认?,onMeesageҎ不休?br />         [receiveTimeOut] 接受时

          我们q样可以使用:
   java -classpath .\apache-activemq-4.1-incubator.jar;example\bin ProducerTool  tcp://192.168.3.142:61616 test.mysubject
   java -classpath .\apache-activemq-4.1-incubator.jar;example\bin ConsumerTool  tcp://192.168.3.142:61616 test.mysubject

   当然你可以用上面的参数q行更复杂的试,持久,事务

   如果出现下面的信?恭喜?你的ActiveMQ已经能够工作?br />        
  Connecting to URL: tcp://192.168.3.142:61616
  Publishing a Message with size 255 to queue: TOOL.DEFAULT
  Using non-durable publishing
  Sleeping between publish 0 ms
  Sending message: Message: 0 sent at: Thu Feb 08 15:05:34 CST 2007  ...
  Sending message: Message: 1 sent at: Thu Feb 08 15:05:34 CST 2007  ...
         。。。。。。。?/p>


  Connecting to URL: tcp://192.168.3.142:61616
  Consuming queue: test.mysubject
         Using non-durable subscription
         Received: Message: 0 sent at: Thu Feb 08 14:51:34 CST 2007  ...
         Received: Message: 1 sent at: Thu Feb 08 14:51:34 CST 2007  ...
  。。。?/p>


         ?结
     
      我们已经下蝲,启动,q且用程序测试了我们的ActiveMQ,而后面将在这个能跑得ActiveMQq一步的C?一步一步展CActiveMQ的高U特性?/p>

Dr.Water 2007-02-08 17:54 发表评论
]]>
ActiveMQ 实践之\(前言)http://www.aygfsteel.com/cctvx1/archive/2007/02/07/98457.htmlDr.WaterDr.WaterTue, 06 Feb 2007 16:36:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2007/02/07/98457.htmlhttp://www.aygfsteel.com/cctvx1/comments/98457.htmlhttp://www.aygfsteel.com/cctvx1/archive/2007/02/07/98457.html#Feedback0http://www.aygfsteel.com/cctvx1/comments/commentRss/98457.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/98457.html   作者cctvx1
   关键?ActiveMQ,实践
   
   一.ActiveMQ是什? 
      ActiveMQ is the most popular and powerful open source Message Bus.
                                                 引用ActiveMQ官方|站

     ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范?JMS Provider实现,管JMS规范出台
已经是很久的事情?但是JMS在当今的J2EE应用中间仍然扮演着Ҏ的地位?br />    下面是它的特性列?(详细的特性清单请参?a >http://activemq.apache.org/features.html)
    1.多种语言和协议编写客L
     语言: Java, C, C++, C#, Ruby, Perl, Python, PHP
        应用协议: OpenWire,Stomp REST,WS Notification,XMPP,AMQP
    2.完全支持JMS1.1和J2EE 1.4规范  (持久?XA消息,事务)
    3.对Spring的支?ActiveMQ可以很容得内嵌到使用Spring的系l里面去,而且也支持Spring2.0的特?br />       4.通过了常见J2EE服务??Geronimo,JBoss 4, GlassFish,WebLogic)的测?其中通过JCA 1.5 resource adaptors的配|?
      可以让ActiveMQ可以自动的部|到M兼容J2EE 1.4 商业服务器上
       5.支持多种传送协?in-VM,TCP,SSL,NIO,UDP,JGroups,JXTA
       6.支持通过JDBC和journal提供高速的消息持久?br />       7.从设计上保证了高性能的集?客户?服务?点对?br />       8.支持Ajax
       9.支持与Axis的整?br />       10.可以很容易得调用内嵌JMS provider,q行试
      
     ?ActiveMQ的竞争者  ?
       
        1.其他开?JMS provider(资料来自 java-source.net) :
        jbossmq(jboss 4)
        jboss messaging (jboss 5)
        joram-4.3.21  2006-09-22
        openjms-0.7.7-alpha-3.zip December 26, 2005
        mantamq 官网暂时无法讉K
        ubermq  官网暂时无法讉K
        SomnifugiJMS  2005-7-27
           开源的JMS Provider大部分都已经停止发展?剩下的几个都是找C东家,和某UJ2EE 服务器挂?
        比如jboss mq 与jboss,joram与jonas(objectwebl织),ActiveMQ 与Geronimo(ASF APACHE基金l织),
        而在q?个之_从网l底层来?只有ActiveMQ使用了NIO,单从q个角度来看ActiveMQ在性能上会?br />        一定的优势      

        2.商业JMS provider
        IBM WebSphere MQ
        BEA WebLogic JMS
        Oracle AQ
        NonStop Server for Java Message Service(JMS)
        Sun Java System Message Queue
        Sonic jms
        TIBCO Enterprise For JMS
        iLinkMQ (国内)
           现在的商业J2EE 应用服务器大部分都会有JMS Provider的实?毕竟应用服务器都已经p不薄,也不在乎
        在里面送一个JMS Provider?当然q是有独立的比如IBM WebSphere MQ,Sonic JMS ,前者肯定是商用MQ
       Q这个概念不仅仅是JMS Provier了,只能说JMS 只是它提供的一个应用)中间的巨无霸了?br />       
         从这Ҏ?ActiveMQ明显的竞争者ƈ不多,因ؓ它是作ؓ独立的开源JMS Provider出现?很容易被用于多种l构设计中,
        使用ActiveMQ作ؓ默认JMS Provider的开源项目有ServiceMix,Geronimo.
 
                                                                                               (待箋)
        P.S
            Monday, February 5, 2007
      Apache ActiveMQ graduates from the incubator 
      Apache ActiveMQ has now graduated to become a top level project (TLP) at Apache! Its new site is now hosted at http://activemq.apache.org/. Many thanks to all those in the Incubator and ActiveMQ communities for making this happen!



Dr.Water 2007-02-07 00:36 发表评论
]]>
Apache mod_rewritehttp://www.aygfsteel.com/cctvx1/archive/2007/01/30/96805.htmlDr.WaterDr.WaterTue, 30 Jan 2007 15:06:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2007/01/30/96805.htmlhttp://www.aygfsteel.com/cctvx1/comments/96805.htmlhttp://www.aygfsteel.com/cctvx1/archive/2007/01/30/96805.html#Feedback0http://www.aygfsteel.com/cctvx1/comments/commentRss/96805.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/96805.html主要是正则表达式的q用,除了mod_rewrite之外q有一个urlrewritefilter
下面是一个测试二U域名映规?br />
RewriteEngine On
RewriteCond %{HTTP_HOST} ^[^www.]+.test.ecom$
Rewriterule ^(.+) %{HTTP_HOST}$1 [C] 
Rewriterule ^([^www.]+)\.test\.ecom(.*) /shop_$1$2
Rewriterule ^www.test.ecom(.*) /$1 [nc,PT]
RewriteRule /shop_(.+)/pic/(.*)$ /pic/$2 [nc,PT]
RewriteRule /shop_(.+)/js/(.*)$ /js/$2 [nc,PT]
RewriteRule /shop_(.+)/css/(.*)$ /css/$2 [nc,PT]
RewriteRule /shop_(.+)/(.+).do?(\.*)$  /$2.do?domainName=$1&%{QUERY_STRING} [L,nc]


RewriteLog "logs/rewrite.log"
RewriteLogLevel 3


关键字段:
                RewriteCond 表示如果条g满则用下面的Rewriterule
                Rewriterule 是采用具体的正则表辑ּ来匹配?br />                                    Rewriterule 后面q可以带有参?br />
             见apache参?br />           http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
         

  • 'chain|C' (chained with next rule)
    This flag chains the current rule with the next rule (which itself can be chained with the following rule, and so on). This has the following effect: if a rule matches, then processing continues as usual - the flag has no effect. If the rule does not match, then all following chained rules are skipped. For instance, it can be used to remove the ``.www'' part, inside a per-directory rule set, when you let an external redirect happen (where the ``.www'' part should not occur!).
  • 'cookie|CO=NAME:VAL:domain[:lifetime[:path]]' (set cookie)
    This sets a cookie in the client's browser. The cookie's name is specified by NAME and the value is VAL. The domain field is the domain of the cookie, such as '.apache.org', the optional lifetime is the lifetime of the cookie in minutes, and the optional path is the path of the cookie
  • 'env|E=VAR:VAL' (set environment variable)
    This forces an environment variable named VAR to be set to the value VAL, where VAL can contain regexp backreferences ($N and %N) which will be expanded. You can use this flag more than once, to set more than one variable. The variables can later be dereferenced in many situations, most commonly from within XSSI (via <!--#echo var="VAR"-->) or CGI ($ENV{'VAR'}). You can also dereference the variable in a later RewriteCond pattern, using %{ENV:VAR}. Use this to strip information from URLs, while maintaining a record of that information.
  • 'forbidden|F' (force URL to be forbidden)
    This forces the current URL to be forbidden - it immediately sends back a HTTP response of 403 (FORBIDDEN). Use this flag in conjunction with appropriate RewriteConds to conditionally block some URLs.
  • 'gone|G' (force URL to be gone)
    This forces the current URL to be gone - it immediately sends back a HTTP response of 410 (GONE). Use this flag to mark pages which no longer exist as gone.
  • 'handler|H=Content-handler' (force Content handler)
    Force the Content-handler of the target file to be Content-handler. For instance, this can be used to simulate the mod_alias directive ScriptAlias, which internally forces all files inside the mapped directory to have a handler of ``cgi-script''.
  • 'last|L' (last rule)
    Stop the rewriting process here and don't apply any more rewrite rules. This corresponds to the Perl last command or the break command in C. Use this flag to prevent the currently rewritten URL from being rewritten further by following rules. For example, use it to rewrite the root-path URL ('/') to a real one, e.g., '/e/www/'.
  • 'next|N' (next round)
    Re-run the rewriting process (starting again with the first rewriting rule). This time, the URL to match is no longer the original URL, but rather the URL returned by the last rewriting rule. This corresponds to the Perl next command or the continue command in C. Use this flag to restart the rewriting process - to immediately go to the top of the loop.
    Be careful not to create an infinite loop!
  • 'nocase|NC' (no case)
    This makes the Pattern case-insensitive, ignoring difference between 'A-Z' and 'a-z' when Pattern is matched against the current URL.
  • 'noescape|NE' (no URI escaping of output)
    This flag prevents mod_rewrite from applying the usual URI escaping rules to the result of a rewrite. Ordinarily, special characters (such as '%', '$', ';', and so on) will be escaped into their hexcode equivalents ('%25', '%24', and '%3B', respectively); this flag prevents this from happening. This allows percent symbols to appear in the output, as in

    RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]

    which would turn '/foo/zed' into a safe request for '/bar?arg=P1=zed'.
  • 'nosubreq|NS' (not for internal sub-requests)
    This flag forces the rewriting engine to skip a rewriting rule if the current request is an internal sub-request. For instance, sub-requests occur internally in Apache when mod_include tries to find out information about possible directory default files (index.xxx files). On sub-requests it is not always useful, and can even cause errors, if the complete set of rules are applied. Use this flag to exclude some rules.
    To decide whether or not to use this rule: if you prefix URLs with CGI-scripts, to force them to be processed by the CGI-script, it's likely that you will run into problems (or significant overhead) on sub-requests. In these cases, use this flag.
  • 'proxy|P' (force proxy)
    This flag forces the substitution part to be internally sent as a proxy request and immediately (rewrite processing stops here) put through the proxy module. You must make sure that the substitution string is a valid URI (typically starting with http://hostname) which can be handled by the Apache proxy module. If not, you will get an error from the proxy module. Use this flag to achieve a more powerful implementation of the ProxyPass directive, to map remote content into the namespace of the local server.

    Note: mod_proxy must be enabled in order to use this flag.

  • 'passthrough|PT' (pass through to next handler)
    This flag forces the rewrite engine to set the uri field of the internal request_rec structure to the value of the filename field. This flag is just a hack to enable post-processing of the output of RewriteRule directives, using Alias, ScriptAlias, Redirect, and other directives from various URI-to-filename translators. For example, to rewrite /abc to /def using mod_rewrite, and then /def to /ghi using mod_alias:

    RewriteRule ^/abc(.*) /def$1 [PT]
    Alias /def /ghi

    If you omit the PT flag, mod_rewrite will rewrite uri=/abc/... to filename=/def/... as a full API-compliant URI-to-filename translator should do. Then mod_alias will try to do a URI-to-filename transition, which will fail.

    Note: You must use this flag if you want to mix directives from different modules which allow URL-to-filename translators. The typical example is the use of mod_alias and mod_rewrite.

  • 'qsappend|QSA' (query string append)
    This flag forces the rewrite engine to append a query string part of the substitution string to the existing string, instead of replacing it. Use this when you want to add more data to the query string via a rewrite rule.
  • 'redirect|R [=code]' (force redirect)
    Prefix Substitution with http://thishost[:thisport]/ (which makes the new URL a URI) to force a external redirection. If no code is given, a HTTP response of 302 (MOVED TEMPORARILY) will be returned. If you want to use other response codes in the range 300-400, simply specify the appropriate number or use one of the following symbolic names: temp (default), permanent, seeother. Use this for rules to canonicalize the URL and return it to the client - to translate ``/~'' into ``/u/'', or to always append a slash to /u/user, etc.
    Note: When you use this flag, make sure that the substitution field is a valid URL! Otherwise, you will be redirecting to an invalid location. Remember that this flag on its own will only prepend http://thishost[:thisport]/ to the URL, and rewriting will continue. Usually, you will want to stop rewriting at this point, and redirect immediately. To stop rewriting, you should add the 'L' flag.
  • 'skip|S=num' (skip next rule(s))
    This flag forces the rewriting engine to skip the next num rules in sequence, if the current rule matches. Use this to make pseudo if-then-else constructs: The last rule of the then-clause becomes skip=N, where N is the number of rules in the else-clause. (This is not the same as the 'chain|C' flag!)
  • 'type|T=MIME-type' (force MIME type)
    Force the MIME-type of the target file to be MIME-type. This can be used to set up the content-type based on some conditions. For example, the following snippet allows .php files to be displayed by mod_php if they are called with the .phps extension:

    RewriteRule ^(.+\.php)s$ $1 [T=application/x-httpd-php-source]


                



Dr.Water 2007-01-30 23:06 发表评论
]]>
ConcurrentModificationExceptionhttp://www.aygfsteel.com/cctvx1/archive/2007/01/23/95497.htmlDr.WaterDr.WaterTue, 23 Jan 2007 03:31:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2007/01/23/95497.htmlhttp://www.aygfsteel.com/cctvx1/comments/95497.htmlhttp://www.aygfsteel.com/cctvx1/archive/2007/01/23/95497.html#Feedback1http://www.aygfsteel.com/cctvx1/comments/commentRss/95497.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/95497.htmlConcurrentModificationException
一个不该犯的低U错?今天的代码突然抛了一个concurrentModificationException错误,
Iterator的一个基本概忉|有掌握导致的q个错误,是在Iterator的实现类
比如Hashtable里面的内部类
 private class Enumerator<T> implements Enumeration<T>, Iterator<T>

会在next,或者remove的时候检查当前集合是否会在修改状?如果是的?br />׃抛出 ConcurrentModificationException,而他自己remove则是使用了同步的Ҏ
而且同步了modCount;expectedModCount;


 public T next() {
     if (modCount != expectedModCount)
  throw new ConcurrentModificationException();
     return nextElement();
 }


public void remove() {
     if (!iterator)
  throw new UnsupportedOperationException();
     if (lastReturned == null)
  throw new IllegalStateException("Hashtable Enumerator");
     if (modCount != expectedModCount)
  throw new ConcurrentModificationException();

     synchronized(Hashtable.this) {
  Entry[] tab = Hashtable.this.table;
  int index = (lastReturned.hash & 0x7FFFFFFF) % tab.length;

  for (Entry<K,V> e = tab[index], prev = null; e != null;
       prev = e, e = e.next) {
      if (e == lastReturned) {
   modCount++;
   expectedModCount++;
   if (prev == null)
       tab[index] = e.next;
   else
       prev.next = e.next;
   count--;
   lastReturned = null;
   return;
      }
  }
  throw new ConcurrentModificationException();
     }
 }
    }
而自己在next的同?修改了这个集?D了这个错误的出现



Dr.Water 2007-01-23 11:31 发表评论
]]>
Resin 3.0.x和Spring 2.0 xsd 配置问题解决http://www.aygfsteel.com/cctvx1/archive/2007/01/03/91599.htmlDr.WaterDr.WaterWed, 03 Jan 2007 09:53:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2007/01/03/91599.htmlhttp://www.aygfsteel.com/cctvx1/comments/91599.htmlhttp://www.aygfsteel.com/cctvx1/archive/2007/01/03/91599.html#Feedback1http://www.aygfsteel.com/cctvx1/comments/commentRss/91599.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/91599.htmlSpring 官方已经提到q个错误?br />
http://www.springframework.org/docs/reference/xsd-config.html#xsd-config-integration-resin

A.3.3.1. XML parsing errors in the Resin v.3 application server


If you are using the XSD-style for Spring 2.0 XML configuration and deploying to v.3 of Caucho's Resin application server, you will need to set some configuration options prior to startup so that an XSD-aware parser is available to Spring.
Please do read this resource


而resinl出来的参考就是他默认不是使用xerces和xalan作ؓxml和xslt的默认解析器

正是׃他默认不是采用以上作为xml,xstl的解析器,D了在resin下面 使用spring 2.0 新xsd配置方式会报错误

(主要是xml中的attribute和propertie 他取不到)

解决的方法就是让resin使用xerces和xalan作ؓxml和xslt的默认解析器

配置Q?/p>

在resin.conf?lt;web-app>或?lt;server>节点下添?/p>

<!-- xml -->
<system-property javax.xml.parsers.DocumentBuilderFactory=
             "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory=
             "org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
  
    <!--  xslt -->
<system-property javax.xml.transform.TransformerFactory=
             "org.apache.xalan.processor.TransformerFactoryImpl"/>


然后把相应的jar加入%RESIN_HOME%/lib 目录,q里需要说明的是我在测试activemq的时?/p>

加入xerces和xalan?他包其他class无法扑ֈ,感觉好像是默认的web-app目录下的jar无效?我暂时直接加入系lclasspath解决?/p>

q点不知道是不是我自qq_问题?/p>


l过试 resin 3.0.22+spring 2.0+activemq xsd配置方式ok?


ps. ^.^ 以前的resin下面目没有?.0配置,自己也学习到了新东西



Dr.Water 2007-01-03 17:53 发表评论
]]>
Struts ValidatorResources 的警告问?/title><link>http://www.aygfsteel.com/cctvx1/archive/2006/12/10/86617.html</link><dc:creator>Dr.Water</dc:creator><author>Dr.Water</author><pubDate>Sat, 09 Dec 2006 16:13:00 GMT</pubDate><guid>http://www.aygfsteel.com/cctvx1/archive/2006/12/10/86617.html</guid><wfw:comment>http://www.aygfsteel.com/cctvx1/comments/86617.html</wfw:comment><comments>http://www.aygfsteel.com/cctvx1/archive/2006/12/10/86617.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.aygfsteel.com/cctvx1/comments/commentRss/86617.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/cctvx1/services/trackbacks/86617.html</trackback:ping><description><![CDATA[ <p>Struts  ValidatorResources 的警告问?/p> <p>google到的其他人同L问题描述<br /><a >http://www.mail-archive.com/user@struts.apache.org/msg51847.html</a></p> <p> <br />我自q配置<br />struts-config-action.xml中配|?br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">form-beans</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />    </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">form-bean </span> <span style="COLOR: #ff0000">name</span> <span style="COLOR: #0000ff">="dynamicForm"</span> <span style="COLOR: #ff0000"> type</span> <span style="COLOR: #0000ff">="org.apache.struts.validator.LazyValidatorForm"</span> <span style="COLOR: #0000ff">/></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">form-beans</span> <span style="COLOR: #0000ff">></span> </div> <p>q行所有跟q个form有关的页面都会出?<br /><font color="#ff0033">[ValidatorResources]2006-12-10 00:07:23 WARN : Form 'dynamicForm' not found for locale 'zh_CN'</font><br /><br />我即使在messageResource_zh_CN.propertiesd了对应的key/name也不?</p> <p>解决Ҏ,参考其他帖?我首先升Ustrut ?.3.x,commons-validator也升U到1.3.0<br />然后<br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #000000"> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">plug-in </span> <span style="COLOR: #ff0000">className</span> <span style="COLOR: #0000ff">="org.apache.struts.validator.ValidatorPlugIn"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />  </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">set-property </span> <span style="COLOR: #ff0000">property</span> <span style="COLOR: #0000ff">="pathnames"</span> <span style="COLOR: #ff0000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />       value</span> <span style="COLOR: #0000ff">="/WEB-INF/validator-rules.xml,/WEB-INF/validation-user.xml"</span> <span style="COLOR: #0000ff">/></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">plug-in</span> <span style="COLOR: #0000ff">></span> </div> <p> <br />在validation-user.xml d一个formp?br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">form-validation</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">formset</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />  </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">form </span> <span style="COLOR: #ff0000">name</span> <span style="COLOR: #0000ff">="dynamicForm"</span> <span style="COLOR: #0000ff">/></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">formset</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">form-validation</span> <span style="COLOR: #0000ff">></span> </div> <p>不再有这?font color="#ff0033">WARN <font color="#000000">了?/font></font> </p> <img src ="http://www.aygfsteel.com/cctvx1/aggbug/86617.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/cctvx1/" target="_blank">Dr.Water</a> 2006-12-10 00:13 <a href="http://www.aygfsteel.com/cctvx1/archive/2006/12/10/86617.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Apache 2.2 ?Subversion整合http://www.aygfsteel.com/cctvx1/archive/2006/11/27/83682.htmlDr.WaterDr.WaterSun, 26 Nov 2006 16:14:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2006/11/27/83682.htmlhttp://www.aygfsteel.com/cctvx1/comments/83682.htmlhttp://www.aygfsteel.com/cctvx1/archive/2006/11/27/83682.html#Feedback1http://www.aygfsteel.com/cctvx1/comments/commentRss/83682.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/83682.html Apache 2.2.3 Subversion 1.4.0(r21228) integrate
reference :
         
http://xrinehart.cnblogs.com/archive/2005/10/27/262759.html
          http://xrinehart.cnblogs.com/archive/2005/10/29/264659.html
          http://www.apachelounge.com/forum/viewtopic.php?t=121
                      (maniac provide svn 1.4.0 module win32  binary for apache 2.2.x)
Warning:
        subversion.tigris.org
        Windows binaries - ATTENTION!: The mod_dav_svn binaries available here are NOT compatible with Apache 2.2

FAQ:
     Error:  Expected fromat '3' of repository;found format '5'
             use "--pre-1.4-compatible", default format is "5" !!
           
Integrate Guide:
            I  use other complie svn module for apache 2.2.3 ,
     Step1:
             copy *.dll to  %APACHE_HOME%\bin
             copy *.so  to  %APACHE_HOME%\modules
     Step2:
             edit %APACHE_HOME%\conf\httpd.conf
             find:
                 #LoadModule dav_module  modules\mod_dav.so
                 #LoadModule dav_fs_module modules\mod_dav_fs.so
             change: "#" to ""
                 LoadModule dav_module  modules\mod_dav.so
                 LoadModule dav_fs_module modules\mod_dav_fs.so
             and add SVN Module:
                 #SVN
                 LoadModule dav_svn_module   modules\mod_dav_svn.so
                 LoadModule authz_svn_module  modules\mod_authz_svn.so
      Step3: 
              config  SVN auth,add httpd.conf
              use apache basic auth,gen password file
                %APACHE_HOME%\bin\htpasswd -cm D:/server/webservice/clear/Apache2.2/svn-auth/svn-auth-file harry

                <IfModule dav_svn_module>
                 <Location /svn>
                   DAV svn
                   SVNParentPath D:/SubversionRoot
                   AuthTypeBasic
                   AuthName "Subversion Repository"
                   AuthUserFile D:/server/webservice/clear/Apache2.2/svn-auth/svn-auth-file
       Require valid-user
                 </Location>
                </IfModule>
       
主要是svn官方的win binary不支持apache 2.2的新module调用?br />      

                

 



Dr.Water 2006-11-27 00:14 发表评论
]]>
blog不一U态度?http://www.aygfsteel.com/cctvx1/archive/2006/11/17/81848.htmlDr.WaterDr.WaterFri, 17 Nov 2006 13:31:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2006/11/17/81848.htmlhttp://www.aygfsteel.com/cctvx1/comments/81848.htmlhttp://www.aygfsteel.com/cctvx1/archive/2006/11/17/81848.html#Feedback0http://www.aygfsteel.com/cctvx1/comments/commentRss/81848.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/81848.html    我记得以前在Matrix上面,老是看见"农民"的blog <<一亩三分地>>,  不过我一直都没有l营好自qq块田地,matrix上的blog已经荒废很久了?br />
   是该拿v锄头reload?如果blog是一U态度的话,我要重新扑֛q种态度,一晃眼,2006q就q去?在春天之?我又感受C严寒,也许x太多,与其q样不如 just do it!





Dr.Water 2006-11-17 21:31 发表评论
]]>
iBatis的AutoResultMap 默认配置使用时候出现的问题http://www.aygfsteel.com/cctvx1/archive/2006/11/17/81845.htmlDr.WaterDr.WaterFri, 17 Nov 2006 13:19:00 GMThttp://www.aygfsteel.com/cctvx1/archive/2006/11/17/81845.htmlhttp://www.aygfsteel.com/cctvx1/comments/81845.htmlhttp://www.aygfsteel.com/cctvx1/archive/2006/11/17/81845.html#Feedback0http://www.aygfsteel.com/cctvx1/comments/commentRss/81845.htmlhttp://www.aygfsteel.com/cctvx1/services/trackbacks/81845.html 演示的sqlMap 配置文gQ通过'$'?*'的?辑ֈ动态映TableC个map的作?/font>

<? xml version="1.0" encoding="UTF-8"  ?>
<! DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"  >

< select  id ="useAutoResultMapExample"  parameterClass ="map" >
USE $dbName$
SELECT*  FROM   $tableName$
</ select >
</ sqlMap >

也就是在IBatis里面配置一个statment,L行多个查?充分利用了map映射的特?

L行多个查询?/p>

比如
select * from myexample
select * from mywork

使用"*" 而且没有用resultClass 指定q回

但是在默认配|下,在用的时候的时?br />
2ơ以上传入不同的$dbName$,$tabeName$ 调用q个useAutoResultMapExample,

p报java.sql.SQLException: Invalid column name错误

因ؓiBatis自己?AutoResultMap的cache,管你传入的$tableName$不同Q但是他L

用第一个徏立的AutoResultMap的cached配以后的$tableName$当然有错误了

解决Ҏ: 使用多个statment或者?remapResults="true" (Z效率他默认的是false)

以上׃效率问题,q是采用多个statement 映射C同的model上面?不徏议生产系l也q么使用?/font>



Dr.Water 2006-11-17 21:19 发表评论
]]>
վ֩ģ壺 | | | | | | üɽ| | | | ǰ| Ϫ| ̳| ¬| Ϊ| | пѷ| ɽ| | ʩ| | | | | Ȩ| | | ۶| | Ƹ| | ʯ| | Ͱ| | | ϲ| | | Ǧɽ| ɽ|