锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲亚洲人成综合网络,亚洲av无码一区二区三区乱子伦,亚洲高清美女一区二区三区http://m.tkk7.com/Jhonney/archive/2007/07/22/131734.htmlJhonneyJhonneySun, 22 Jul 2007 08:42:00 GMThttp://m.tkk7.com/Jhonney/archive/2007/07/22/131734.htmlhttp://m.tkk7.com/Jhonney/comments/131734.htmlhttp://m.tkk7.com/Jhonney/archive/2007/07/22/131734.html#Feedback0http://m.tkk7.com/Jhonney/comments/commentRss/131734.htmlhttp://m.tkk7.com/Jhonney/services/trackbacks/131734.html闅忔椂鎵句釜浜猴紝寰堝鏄撳氨鑳芥浛鎹?/span>”錛屽洜姝わ紝鑷繁娌℃湁鏍稿績绔炰簤鍔涗簡銆?
 
銆銆榪欎綅鏈嬪弸澶у姣曚笟涓ゅ勾錛屽悓瀛︿腑鏈夐儴鍒嗕漢浠庝簨杞歡寮鍙戯紝鑰屾垜榪欎綅鏈嬪弸閫夋嫨浜嗗湪浜掕仈緗戣涓氬彂灞曪紝鐩墠鐨勮亴浣嶆槸涓涓腑鍨嬬綉绔欑殑緙栬緫閮ㄧ粡鐞嗐傛湅鍙嬬殑鍚屽涓湁涓Java鐨勶紝鍐欎簡2騫寸▼搴忥紝灝辮嚜宸卞紑濮嬫嫑鐢熸悶鍩硅鐝備簬鏄紝鏈嬪弸灝卞紑濮嬫媴蹇冭嚜宸辯殑绔炰簤鍔涢棶棰樹簡銆?/div>
銆銆閭d箞錛屼粈涔堟槸涓漢鏍稿績绔炰簤鍔涘憿錛熸墍璋撲釜浜烘牳蹇冪珵浜夊姏錛屽氨鏄寚涓嶆柇鎻愰珮鑷繁鏍稿績鑳藉姏鐨勮兘鍔涖?span style="BACKGROUND-COLOR: yellow">鎵璋撴牳蹇冭兘鍔涳紝鏄浉瀵瑰叾浠栦漢鑰岃█鐨勶紝榪欑鑳藉姏鑳藉緢濂界殑瀹炵幇鑷繁鍦ㄦ煇鏂歸潰鐨勪環(huán)鍊鹼紝涓斿埆浜轟笉瀹規(guī)槗妯′豢銆?/span>鏍稿績绔炰簤鍔?span style="COLOR: red">涓嶄粎琛ㄧ幇鍦ㄦ墍鎺屾彙鐨勬妧鏈笂錛屾洿閲嶈鐨勪綋鐜板湪鎵鍏鋒湁鐨勭嫭鍒版濇兂鎴栬瑙c佸鏌愪釜棰嗗煙涓氬姟鐨勭患鍚堟妸鎻?/span>銆?/div>
銆銆璇村埌搴曪紝鎶鏈槸涓嶅奸挶鐨勶紝鍙湁涓氬姟鍜屽競鍦烘墠鑳戒負浼佷笟璧㈠埄錛屾妧鏈彧鏄疄鐜頒笟鍔$殑涓涓伐鍏瘋屽凡銆傚洜姝わ紝涓涓漢瑕佹兂鍏鋒湁鏍稿績绔炰簤鍔涳紝灝卞繀欏誨鎵鍦ㄨ涓氥佹墍鍦ㄤ紒涓氱殑涓氬姟鏈夋繁鍒葷殑鐞嗚В錛岃繖榪滆繙涓嶆槸瀛︿竴涓ら棬紼嬪簭璁捐璇█灝辮兘鎼炲畾鐨勪簨鎯呫備緥濡傦紝鏈嬪弸鐨勫悓瀛︽悶Java鍩硅鐝紝鍏舵牳蹇冪珵浜夊姏灝辨槸瀵笽T鍩硅涓氬姟鐨勭悊瑙e拰媧炲療錛岃屼笉鏄叾Java紼嬪簭璁捐鐨勮兘鍔涖傦紙鍗充嬌鏄疛ava紼嬪簭璁捐鑳藉姏錛屽彧姣曚笟2騫寸殑瀛︾敓錛岃兘鏍稿績鍒板摢閲屽幓鍛紵濡傛灉鏈?0騫?騫寸殑緇忛獙錛岃繕璇村緱榪囧幓錛侊級濡傛灉鍏剁己涔忓鍩硅涓氬姟鐨勭悊瑙o紝緙轟箯鍩硅鍏徃榪愪綔鐨勭粡楠岋紝鍏剁敓瀛樺皢鏄崄鍒嗚壈闅劇殑錛屽掗棴灝辨槸鐪煎墠鐨勪簨鎯呫?/div>
銆銆涓漢鏍稿績绔炰簤鍔涘叾瀹炴槸涓涓浉瀵圭殑姒傚康錛屾垜浠彧鑳借鏌愪釜浜哄湪鏌愪釜鏂歸潰鍏鋒湁鏍稿績绔炰簤鍔涳紝鑰屼笉鑳界緇熻鐢插叿鏈夋牳蹇冪珵浜夊姏錛屼箼涓嶅叿鏈夋牳蹇冪珵浜夊姏銆傛瘮濡傦紝鎷垮ぇ瀛︽暀甯堜負渚嬶紝涓枃緋葷殑鑰佸笀涓細鍑哄悕鏁欐巿錛堝叿鏈夋牳蹇冪珵浜夊姏錛夛紝鏁板緋葷殑鑰佸笀涓篃浼氬嚭鍚嶆暀鎺堬紙涔熷叿鏈夋牳蹇冪珵浜夊姏錛夈備絾鏄紝濡傛灉鎶婁腑鏂囩郴鐨勫悕鏁欐巿鍒嗛厤鍒版暟瀛︾郴鍘諱笂鏁板璇撅紝浠栧氨娌℃湁绔炰簤鍔涗簡銆?/div>

銆銆鎴戣涓猴紝瀵逛簬杞歡寮鍙戜漢鍛樿岃█錛屾帉鎻′竴闂ㄧ▼搴忚璁¤璦騫墮潪鏄牳蹇冪珵浜夊姏錛岃屽彧鏄叆闂ㄧ殑涓涓伐鍏瘋屽凡錛?strong style="COLOR: #ffffff; BACKGROUND-COLOR: #ff0000">鑳藉鍒╃敤榪欎釜宸ュ叿鐔熸?zhèn)夋煇涓涓氱殑涓氬姟娴伣E嬪拰榪愪綔鏂瑰紡錛岃兘澶熷ù鐔熷湴鍒╃敤榪欎釜宸ュ叿涓烘煇涓涓氭彁渚涜В鍐蟲柟妗堬紝榪欐墠鏄牳蹇冪珵浜夊姏錛涘浜庝粠浜嬩簰鑱旂綉琛屼笟鐨勪漢鍛樿岃█錛岃兘澶熸妸緗戠粶嫻侀噺鍙樻垚鐜伴噾嫻侀噺錛岃兘澶熸妸緗戠粶騫沖彴涓庡崟浣嶄笟鍔$粨鍚堣搗鏉ワ紝鑳藉媧炲療浜掕仈緗戠殑鍙戝睍鏂瑰悜錛岃繖鎵嶆槸鏍稿績绔炰簤鍔涳紱瀵逛簬綆$悊浜哄憳錛岃兘澶熷湪鏈夐檺鐨勮祫婧愪笅錛屾彁楂樻暣涓洟闃熺殑鎴樻枟鍔涘拰鍑濊仛鍔涳紝浣垮洟闃熺揣瀵嗗洟緇撳湪鑷繁鐨勫懆鍥達紝鍚戝洟闃熺洰鏍囧姫鍔涘榪涳紝榪欐墠鏄牳蹇冪珵浜夊姏銆?/strong>

銆銆鍥犳錛屽氨涓漢鏍稿績绔炰簤鍔涜岃█錛岃涓氫笉鍒嗗ソ鍧忥紝鑱屼笟涓嶅垎濂藉潖錛屽伐浣滀笉鍒嗗ソ鍧忋傚彧瑕佷綘鏄湁蹇冧漢錛屽湪鏈亴宸ヤ綔涓綔蹇冨伐浣滐紝鍔姏鎽哥儲銆傝繖鏍鳳紝浣犳敹鑾風殑灝嗕笉浠呬粎鏄瘡涓湀鐨勫伐璧勶紝鑰屼笖闅忕潃鏃墮棿鐨勫闀匡紝浣犵殑鑳藉姏灝嗕笉鏂彁楂橈紝瀵逛笟鍔$殑鐞嗚В鍜屾妸鎻¤兘鍔涘皢涓嶆柇鍔犲己錛屾渶緇堝艦鎴愯嚜宸辯殑鏍稿績绔炰簤鍔涖?br>
---------------------------------------------------------------------------------------
鎬葷粨浜庝竴鐐癸紝灝嗚嚜宸辯殑鎶鑳芥棤璁洪噰鐢ㄤ粈涔堝姙娉曚竴瀹氳杈懼埌鍜屽競鍦虹洿鎺ョ浉緇撳悎


Jhonney 2007-07-22 16:42 鍙戣〃璇勮
]]>Message-Driven POJOs http://m.tkk7.com/Jhonney/archive/2007/06/20/125227.htmlJhonneyJhonneyTue, 19 Jun 2007 18:25:00 GMThttp://m.tkk7.com/Jhonney/archive/2007/06/20/125227.htmlhttp://m.tkk7.com/Jhonney/comments/125227.htmlhttp://m.tkk7.com/Jhonney/archive/2007/06/20/125227.html#Feedback0http://m.tkk7.com/Jhonney/comments/commentRss/125227.htmlhttp://m.tkk7.com/Jhonney/services/trackbacks/125227.htmlhttp://jroller.com/page/habuma/20050715#message_driven_pojos

Message-Driven POJOs

In my preparation for a presentation I'll be giving next month, I have been tinkering with Message-driven POJOs as proposed by James Strachan and as implemented in ActiveMQ.

Message-driven POJOs offer MDB-like functionality to simple JavaBeans. I have found message-driven POJOs to be a compelling alternative to MDBs, especially if you're already a big fan of Spring and are using it to develop your applications. Message-driven POJOs can take advantage of all of the features provided by Spring (such as dependency injection and AOP).

Although message-driven POJOs aren't exactly new news, I had a hard time finding much information about them online. ActiveMQ's own documentation isn't too bad, but left me with several unanswered questions. As a service to everyone out there who may be searching for more info on message-driven POJOs, I'm writing this article to document what I've learned. I hope you find it useful and maybe it will fill in some of the gaps for you.

What you'll need

To get started, here's a summary of the JARs that I used when developing and running the examples:

  • activemq-core-3.1-SNAPSHOT.jar
  • activemq-container-3.1-SNAPSHOT.jar
  • activemq-ra-3.1-SNAPSHOT.jar
  • commons-logging-1.0.3.jar
  • concurrent-1.3.4.jar
  • geronimo-spec-j2ee-connector-1.5-rc4.jar (or equivalent J2EE JAR)
  • geronimo-spec-j2ee-management-1.0-rc4.jar (or equivalent J2EE JAR)
  • geronimo-spec-jms-1.1-rc4.jar (or equivalent J2EE JAR)
  • geronimo-spec-jta-1.0.1B-rc4.jar (or equivalent J2EE JAR)
  • log4j-1.2.9.jar
  • spring.jar (version 1.2.2)

The biggest challenge you'll face when developing message-driven POJOs is pulling together all of these JARs. To make things easier on you, I've made everything you'll need (including the example code) available here.

Your mileage may vary if you choose to use different versions of JARs than what I've listed above. One important note, however, is that in my examples, I'm using the shorthand XML available in Spring 1.2, so if you use an older version of Spring, you'll need to tweak the XML appropriately.

Writing the message-driven POJO

Writing a message-driven POJO isn't dramatically different than writing a message-driven EJB. The major difference is that you don't have to implement javax.ejb.MessageDrivenBean, which means that you also don't have to implement the EJB lifecycle methods mandated by that interface. (If you need to hook into a POJO's lifecycle, you can use Spring's init-method and destroy-method attributes when declaring the bean.)

In the interest of keeping the focus on how to develop message-driven POJOs, my example will be as simple as possible. In the grand tradition of all simple examples, here's a "Hello World" message-driven POJO:

  package com.habuma.mdpojo;

  import javax.jms.JMSException;
  import javax.jms.Message;
  import javax.jms.MessageListener;

  public class HelloBean implements MessageListener {
    public void onMessage(Message msg) {
      try {
        String name = msg.getStringProperty("name");
        if(name == null) {
          name = "World";
        }

        System.out.println("Hello " + name + "!");
      } catch (JMSException e) {
        // handle exception?
      }
    }
  }

Notice that (as with MDBs) message-driven POJOs still must implement javax.jms.MessageListener. Even though James Strachan refers to these as POJOs, I don't consider this a pure POJO because in order to work it must implement a platform/framework-specific interface. But the MessageListener interface isn't too much of a burden to bear and it's still lighterweight than MDBs, so I guess I can't complain too much.

The onMessage() method should be self-explanatory. When a message is dispatched to this bean, this method is called. Inside of the method, we extract the "name" property from the message and use it to display the traditional greeting.

Listening for messages

The next thing to do is to declare HelloBean as a bean in a Spring context and associate it with a message queue. Declaring the bean itself is simple enough (in hello-mdpojo.xml):

  <bean id="helloBean" class="com.habuma.mdpojo.HelloBean"/>

There's really nothing special about this bean. In a real application, however, your message-driven POJO would probably be more interesting and be injected with references to DAOs, service-layer beans, or some other beans that it collaborates with to do its job. It may also be proxied by some Spring aspects for declarative transactions, security, etc.

To associate "helloBean" with a message queue, we'll need to use ActiveMQ's JCAContainer. The JCAContainer associates itself with a specific ActiveMQ server and acts as a factory to produce connectors to that server. It is declared in Spring as a <bean>:

  <bean id="activeMQContainer" class="org.activemq.jca.JCAContainer">
    <property name="workManager">
      <bean id="workManager" class="org.activemq.work.SpringWorkManager"/>
    </property>

    <property name="resourceAdapter">
      <bean id="activeMQResourceAdapter"
          class="org.activemq.ra.ActiveMQResourceAdapter">
        <property name="serverUrl" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>

For the most part, this chunk of XML is boiler-plate code to set up a JCAContainer to interact with the message queue. The good news is that you'll only need one JCAContainer, regardless of how many of your POJOs will be message-driven.

The only thing of interest is the value assigned to the "serverUrl" property of the "activeMQResourceAdapter" inner-bean. This property tells the container how to connect to your ActiveMQ server--in this case, via TCP on port 61616 of the localhost (where ActiveMQ will be listening by default.)

At this point we have a JCAContainer that is associated with the ActiveMQ server and we have a POJO that is ready and willing to accept messages. All that's left is to connect the POJO to the JCAContainer. The following <bean> does the trick:

  <bean id="HelloMDP"
      factory-method="addConnector"
      factory-bean="activeMQContainer">
    <property name="activationSpec">
      <bean class="org.activemq.ra.ActiveMQActivationSpec">
        <property name="destination" value="Hello.Queue"/>
        <property name="destinationType" value="javax.jms.Queue"/>
      </bean>
    </property>
    <property name="ref" value="helloBean" />
  </bean>

This bean is where the proverbial "rubber meets the road". Using Spring's factory-method feature, this bean declaration leans on the JCAContainer's addConnector() method to create a connector to associate the "helloBean" with the ActiveMQ server. Specifically, the "activationSpec" property tells the JCAContainer to set up a connector that listens to the queue named "Hello.Queue" and the "ref" property tells it to send messages from that queue to the bean named "helloBean".

Bringing this message-driven POJO to life requires two things. First, you'll need to fire up an ActiveMQ server. In the bin directory of the ActiveMQ distribution, you'll find either an activemq.bat (for Windows) or an activemq script (for UNIX). Running this script will start up an ActiveMQ server instance listening on port 61616.

The next thing you'll need is a simple application that loads the Spring application context. The following main() method should suffice (I'll leave the class you place this in up to you):

  public static void main(String[] args) {
    new FileSystemXmlApplicationContext("hello-mdpojo.xml");
  }

If all goes well, running this program will result in a HelloBean POJO that is patiently awaiting a message to process. So, let's send it a message.

Sending a message

There are a variety of ways to send a JMS message, but for the purposes of this example, I'm going to use Spring's JmsTemplate (as described in chapter 7 of Spring in Action). The following declaration of a JmsTemplate is what I used to test the HelloBean (in mq-client.xml):

  <bean id="jmsTemplate"
      class="org.springframework.jms.core.JmsTemplate">
    <property name="defaultDestinationName" value="Hello.Queue"/>
    <property name="connectionFactory" ref="connectionFactory"/>
  </bean>

The "defaultDestinationName" property tells the template the name of the message queue to attach to. The "connectionFactory" property tells the template how to connect. I could've used Spring's JndiObjectFactoryBean to pull a connection factory from JNDI (as I described in SiA) or any implementation of javax.jms.ConnectionFactory. But so that I don't have to mess with JNDI for this simple example, let's use ActiveMQ's ActiveMQConnectionFactory:

  <bean id="connectionFactory"
      class="org.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616" />
  </bean>

Now we just need to use the "jmsTemplate" bean to send a message. In a real application, you might inject "jmsTemplate" into a property of another bean to use. But for simplicity's sake we'll just access the bean directly from a main() method (again, I'll leave the choice of a class up to you):

  public static void main(String[] args) {
    ApplicationContext ctx = new
        FileSystemXmlApplicationContext("mq-client.xml");

    JmsTemplate template = (JmsTemplate) ctx.getBean("jmsTemplate");
    template.send(
      new MessageCreator() {
        public Message createMessage(Session session)
            throws JMSException {
          MapMessage message = session.createMapMessage();
            message.setStringProperty("name", "Craig");
          return message;
        }
      }
    );
  }

Run this program in a separate window from where the application that runs the JCAContainer. If things are going your way, you should see "Hello Craig!" in the window running the JCAContainer app. Congratulations, you've just invoked a message-driven POJO.

So what?

What's the big deal? Why are message-driven POJOs better than MDBs? Well, I never actually claimed any superiority of message-driven POJOs over MDBs. But here are some things to consider:

  • MDBs must be run within an EJB container. Depending on the architecture of your app, this may be an excessive requirement, especially if you aren't use any other EJBs and do not require the features of a full-blown EJB container. Message-driven POJOs, on the other hand, can run anywhere, even (as shown here) in a simple main() method. The only requirement is an ActiveMQ message queue.
  • MDBs require that you implement the lifecycle methods of javax.ejb.MessageDrivenBean. Often these lifecycle methods aren't needed and are left as empty implementations. This isn't a real problem, except that it's simply unnecessary.
  • Although it may not be apparent from the simple HelloBean example, message-driven POJOs can take full advantage of the dependency injection and AOP support offered by Spring (including Spring's support for declarative transactions and Acegi's support for declarative security). In short, you can do anything with the POJO that you can do with any other bean in a Spring context.
  • The XML used to declare a message-driven POJO is slightly more verbose then for an MDB. You should, however, keep in mind that you'll only need to declare one JCAContainer bean, regardless of how many message-driven POJOs your application has.

One thing that I've not yet considered is how EJB 3 MDBs compare the message-driven POJOs. Honestly, I've not taken the time to perform this comparison. Perhaps this is something I'll do soon. If you have any insight in this subject, I'd be quite interested in hearing it.

Message-driven POJOs are just a small portion of a talk that I'll be presenting at the LoneStar Software Symposium in Austin, TX next month. If you're in the Austin area, I hope to see you there.



Jhonney 2007-06-20 02:25 鍙戣〃璇勮
]]>
Limit鎸囧崡http://m.tkk7.com/Jhonney/archive/2007/06/12/123717.htmlJhonneyJhonneyTue, 12 Jun 2007 13:28:00 GMThttp://m.tkk7.com/Jhonney/archive/2007/06/12/123717.htmlhttp://m.tkk7.com/Jhonney/comments/123717.htmlhttp://m.tkk7.com/Jhonney/archive/2007/06/12/123717.html#Feedback0http://m.tkk7.com/Jhonney/comments/commentRss/123717.htmlhttp://m.tkk7.com/Jhonney/services/trackbacks/123717.htmlquto:http://m.tkk7.com/lucky/archive/2006/02/23/32059.html

1. 寮曡█

鍦ㄤ綘闇瑕佸鐞嗗ぇ閲忔暟鎹椂浣犲簲璇ヨ冭檻浣跨敤eXtremeTable鐨凩imit鐗規(guī)с侺imit榪欎釜鍚嶅瓧鏉ヨ嚜MySQL鐨刲imit 鍛戒護錛孡imit鎺ュ彛鐨勭洰鐨勫氨鏄浣曞琛ㄧ殑緇撴灉闆嗚繘琛宭imit澶勭悊銆侺imit瀹炵幇鐭ラ亾褰撴帓搴忋佽繃婊ゃ佸垎欏點佸鍑烘椂錛岀敤鎴峰浣曚笌琛ㄤ簰鐩鎬綔鐢ㄣ傛湁浜嗚繖浜涗俊鎭綘 灝嗚兘澶熶嬌鐢ㄥ彲鑳芥槸鏈鏈夋晥鐨勬柟寮忔樉紺烘紜殑榪囨護銆佹帓搴忓悗鐨勮姹傞〉闈€?/p>

涓轟簡紺鴻寖Limit鐗規(guī)э紝鎴戝皢瑕佸仛鐨勫伐浣滃皢鍒嗚В涓篔SP銆丆ontroller銆丼ervice鍜孌AO銆傝繖紺鴻寖浜嗕竴縐嶄嬌鐢ㄥ垎灞傜殑鏂瑰紡鏉ュ鐞?Limit銆備綘鍙互鏍規(guī)嵁鑷繁鐨勯渶瑕佹潵澧炲姞鎴栧噺灝戝眰銆傛湰紺轟緥涔熶嬌鐢ㄤ簡Spring妗嗘灦鏉ラ噸鏂板緱鍒頒嬌鐢⊿pring鐨凧DBC鍙栧緱鐨勬暟鎹紝鍥犳浣犵殑浠g爜鐪嬭搗鏉ュ彲鑳芥湁鐐逛笉鍚屻俥XtremeTable鐨勪竴涓壒鐐瑰氨鏄笉渚濊禆浠諱綍妗嗘灦鍜屽鍣ㄣ?

1.1. JSP

涓轟簡浣跨敤Limit鐗規(guī)э紝eXtremeTable闇瑕佷嬌鐢╨imit鐗瑰畾鐨凴etrieveRowsCallback銆?FilterRowsCallback鍜孲ortRowsCallback鎺ュ彛銆俥XtremeComponents鎻愪緵浜嗘瘡涓帴鍙g殑涓涓疄鐜幫紝鍙互綆鍗曞湴閫氳繃璁劇疆姣忎釜灞炴у間負limit鏉ョ畝鍗曟潵浣跨敤銆?

<ec:table 
items="presidents"
retrieveRowsCallback="limit"
filterRowsCallback="limit"
sortRowsCallback="limit"
view="limit"
>
...

鍙﹀瑙嗗浘灞炴у弬鐓т竴涓悕涓簂imit鐨勫畾鍒惰鍥俱傝繖鏄竴涓畝鍗曚慨鏀歸粯璁XtremeTable瑙嗗浘錛屼笉鍖呭惈鏈鍚庨〉宸ュ叿鏉$殑瀹炵幇銆傝繖浠呬粎鍏崇郴鍒頒綘鏄惁鑳藉彇寰楃‘鍒囬渶瑕佺殑琛屻?涓浜涙暟鎹簱渚嬪Oracle鍜孧ySQL閮芥彁渚涗簡涓縐嶅緱鍒扮‘瀹氳鐨勭壒鎬э紝浣嗘槸錛屽叾浠栫殑鏁版嵁搴撲緥濡傦細Sybase娌℃湁鎻愪緵鐗規(guī)с傚湪鎴戠殑紺轟緥涓垜鑰冭檻鏈鍧忕殑鎯呭喌浣犵殑鏁版嵁搴撲笉鏀寔榪欑鐗規(guī)с?/p>

鍗充嬌浣犵殑鏁版嵁搴撲笉鎻愪緵鍙栧緱鐗瑰畾琛岀殑鐗規(guī)э紝褰撲綘鑰冭檻鐢ㄦ埛濡備綍鍜岃〃鍗忓悓宸ヤ綔鏃訛紝Limit浠嶇劧闈炲父鏈夋剰涔夈傜敤鎴烽氬父浼氬涓浜涙暟鎹繘琛屾帓搴忋佽繃婊ゅ拰鍒嗛〉銆?榪欎釜渚嬪瓙涓?5鏉℃暟鎹瀯鎴愪竴欏碉紝絎竴欏甸渶瑕?5鏉℃暟鎹紝絎簩欏甸渶瑕?0鏉℃暟鎹紝絎笁欏甸渶瑕?5鏉℃暟鎹紝浠ユ綾繪帹銆傚湪緇忚繃涓孌墊椂闂村垎欏靛悗錛屼粬浠父甯鎬嬌鐢ㄨ繃婊ゆ潵鎻愮偧鏁版嵁銆?鍗充嬌浠栦滑涓嶈繖鏍峰仛錛屼粬浠篃蹇呴』鍦ㄦ涔嬪墠瀵瑰ぇ閲忕殑鏁版嵁榪涜鍒嗛〉錛岃繖灝嗗獎鍝嶆晥鐜囥傚綋鐒跺鏋滃厑璁哥敤鎴風偣鍑繪渶鍚庨〉錛岄偅涔堟墍鏈夌殑鏁版嵁閮藉皢琚彇鍑猴紝榪欏皢闈炲父褰卞搷鏁堢巼銆?/p>

1.2. Controller

鎻愮ず錛歋pring妗嗘灦鐨凜ontroller鍜孲truts妗嗘灦鐨凙ction闈炲父鐩稿儚銆?/em>

controller棣栧厛闇瑕佸垱寤轟竴涓狶imit銆備負浜嗗畬鎴愯繖涓綘闇瑕佸緱鍒頒竴浜涘叧浜嶤ontext鍜孡imitFactory鐨勫府鍔┿?/p>

Context context = new HttpServletRequestContext(request);
LimitFactory limitFactory = new TableLimitFactory(context);
Limit limit = new TableLimit(limitFactory);

Context鏄竴涓鐞嗗彇寰楀睘鎬х殑鎺ュ彛錛孡imitFactory浣跨敤Context鏉ユ壘鍑虹敤鎴峰浣曞拰eXtremeTable浜や簰銆?鐒跺悗Limit浣跨敤LimitFactory鏉ョ粍瑁呰嚜宸便?/p>

涓轟簡鍒濆鍖朙imit錛屽畠?yōu)畣鍖呭惈鎵鏈夌殑鏈夌敤鐨勪俊鎭傝繖浜涗俊鎭寘鎷暟鎹皢琚浣曟帓搴忓拰榪囨護錛屽摢涓欏靛皢琚樉紺哄拰鏄惁鍏佽琚鍑恒?/p>

鐒惰岋紝Limit浠嶇劧闇瑕佸緱鍒拌鐨勪俊鎭紝榪欐牱姝g‘鐨勪俊鎭〉闈㈡墠鑳借鏄劇ず緇欑敤鎴楓傝淇℃伅鍖呮嫭寮濮嬭銆佺粨鏉熻銆佸綋鍓嶆樉紺鴻銆?controller蹇呴』浠巗ervice寰楀埌榪欎簺淇℃伅錛岃孲ervice灝嗕粠dao涓緱鍒拌繖浜涗俊鎭傝繖閲屾垜鍙粰鍑篊ontroller绔殑浠g爜銆?/p>

int totalRows = presidentsService.getTotalPresidents(limit.getFilterSet(), limit.isExported());
limit.setRowAttributes(totalRows, defaultRowsDisplayed);

limit闇瑕佸緱鍒版墍鏈夌殑琛屾潵寰楀埌琛岀殑淇℃伅銆俿ervice闇瑕佺煡閬撻偅浜涜榪囨護錛屼笉綆¤繖浜涙暟鎹槸鍚﹁瀵煎嚭銆備負浜嗚緗淇℃伅錛岄粯璁ょ殑涓欏墊樉紺虹殑琛屾暟闇瑕佽璁劇疆銆?榪欏彲浠ラ氳繃瀵筎ableTag鐨剅owsDisplayed灞炴ц緗竴涓‘瀹氱殑鏁板兼潵瀹炵幇銆?/p>

鐜板湪鎴戜滑鍙渶瑕佷粠services寰楀埌Collection鏁版嵁銆?/p>

Collection presidents = presidentsService.getPresidents(limit.getFilterSet(), limit.getSort(), limit.getRowEnd());

鍥犱負limit宸茬粡鍖呭惈鎵鏈変俊鎭紝榪欏皢鍗佸垎瀹規(guī)槗銆傛墍鏈夐渶瑕佸仛鐨勫氨鏄紶鍏ヨ繃婊ゅ櫒錛屾帓搴忓拰鏈鍚庤鐨勪俊鎭?鏈鍚庤鍋氱殑鏄皢Collections鍜宼otalRow榪欎簺淇℃伅浼犻佸洖JSP浠ヤ究eXtremeTable鐭ラ亾濡備綍鏄劇ず榪欎簺淇℃伅銆?/p>

request.setAttribute("presidents", presidents);
request.setAttribute("totalRows", new Integer(totalRows));

1.3. Service

service闇瑕佸拰dao榪涜浜や簰鏉ュ緱鍒版昏鏁板拰Collection銆?/p>

1.3.1. 鍙栧緱鎬昏鏁?/h4>

controller闇瑕佸埌絎竴鏉′俊鎭氨鏄昏鏁般?/p>

public int getTotalPresidents(FilterSet filterSet, boolean isExported) {
String totalQuery = presidentsDao.getTotalPresidentsQuery();
String modTotalQuery = filterQuery(filterSet, totalQuery);
int totalRows = presidentsDao.getTotalPresidents(modTotalQuery);
if (isExported && totalRows > maxExportRows) {
totalRows = maxExportRows;
}
return totalRows;
}

service鍜宒ao涓璧鋒潵榪囨護緇撴灉闆嗭紝瀹冪殑宸ヤ綔鏂瑰紡鏄湪Where璇彞鍚庨潰澧炲姞鏇村鐨凙ND璇彞鏉ヤ慨鏀規(guī)煡璇㈠瓧絎︿覆銆備負姝わ紝浣犻渶瑕佸拰Limit FilterSet涓璧峰伐浣溿?/p>

FilterSet鏄竴涓繃婊ゅ櫒瀵硅薄鏁扮粍錛屼竴涓繃婊ゅ櫒鍖呮嫭涓涓猙ean property鍜岃繖涓繃婊ゅ櫒鐨勫箋傛垨鑰咃紝綆鍗曠殑璇村氨鏄敤鎴鋒兂瑕佽繃婊ょ殑琛屽拰浠栦滑杈撳叆鐨勫箋傝繖浣垮緱瀹冮潪甯稿鏄撲氦浜掋俿ervice鍙渶瑕佽凱浠f墍鏈夌殑 FilterSet騫惰皟鐢╠ao鏉ユ嫾鎺ユ煡璇㈣鍙ャ傦紙璇戣呮敞錛氳繃婊ょ殑瀹炵幇鏂瑰紡鏄細鍦╓here鍚庨潰澧炲姞And璇彞鏉ユ敼鍙樻煡璇㈣鍙ヤ互杈懼埌瀵規(guī)暟鎹繘琛岃繃婊ょ殑鏁堟灉錛?/p>

private String filterQuery(FilterSet filterSet, String query) {
if (!filterSet.isFiltered() || filterSet.isCleared()) {
return query;
}

Filter filters[] = filterSet.getFilters();
for (int i = 0; i < filters.length; i++) {
Filter filter = filters[i];
String property = filter.getProperty();
String value = filter.getValue();
query = presidentsDao.filterQuery(query, property, value);
}

return query;
}

query淇敼鍖呮嫭浜唂ilter淇℃伅錛屾昏鏁般傚湪涓浜涙儏鍐典笅榪欏氨瓚沖錛屼絾鏄綋鐢ㄦ埛瀵煎嚭鏁版嵁鏃朵粛鐒跺瓨鍦ㄤ竴涓綔鍦ㄧ殑闂銆備負浜嗕繚鎸侀珮鏁?service涓嶅厑璁稿鍑鴻秴鍑轟竴涓渶澶ц鏁扮殑鏁版嵁銆?/p>

1.3.2. 鍙栧緱Collection

controller闇瑕佸埌絎簩鏉′俊鎭氨鏄疌ollection銆?/p>

public Collection getPresidents(FilterSet filterSet, Sort sort, int rowEnd) {
String patientsQuery = presidentsDao.getPresidentsQuery();
String modPatientsQuery = filterQuery(filterSet, patientsQuery);
modPatientsQuery = sortQuery(sort, modPatientsQuery);
modPatientsQuery = presidentsDao.limitQuery(rowEnd, modPatientsQuery);
return presidentsDao.getPresidents(modPatientsQuery);
}

鍜屽墠闈竴鏍鳳紝service鍜宒ao涓璧鋒潵榪囨護緇撴灉闆嗐?/p>

鍙﹀query瀛楃涓查渶瑕佹墿灞昈RDER BY璇彞浠ヤ究鏁版嵁鎸夌収姝g‘鐨勬柟寮忚繘琛屾帓搴忋係ort鍖呭惈涓涓猙ean property鍜?sortOrder鍊鹼紙姝e簭榪樻槸閫嗗簭錛夈俿ervice浠呬粎闇瑕佷嬌鐢⊿ort鏉ヨ皟鐢╠ao銆?/p>

private String sortQuery(Sort sort, String query) {
if (!sort.isSorted()) {
String defaultSortOrder = presidentsDao.getDefaultSortOrder();
if (StringUtils.isNotBlank(defaultSortOrder)) {
return query + defaultSortOrder;
}

return query;
}

String property = sort.getProperty();
String sortOrder = sort.getSortOrder();

return presidentsDao.sortQuery(query, property, sortOrder);
}

query瀛楃涓叉渶鍚庨渶瑕佺殑淇敼灝辨槸澧炲姞鏁版嵁搴撶壒鍒殑鎸囦護鏉imit灝嗚琚繑鍥炵殑緇撴灉闆嗐傝繖灝辨槸limitQuery() 鏂規(guī)硶鐨勪綔鐢ㄣ?/p>

1.4. DAO

dao涓簊ervice璐熻矗搴曞眰鏁版嵁宸ヤ綔銆?/p>

1.4.1. 瀹氫箟Query瀛楃涓?/h4>

涓轟簡鐪熸鐞嗚Вdao錛宷uery瀛楃涓查渶瑕佽灞曠ず銆?/p>

榪欏氨鏄緱鍒版暟鎹殑presidents query瀛楃涓詫細

private final static String presidentsQuery = 
" SELECT " +
" president_id presidentId, " +
" first_name firstName, " +
" last_name lastName, " +
" nick_name nickName, " +
" concat(first_name, ' ',last_name) fullName, " +
" term, " +
" born, " +
" died, " +
" education, " +
" career, " +
" political_party politicalParty " +
" FROM presidents ";

榪欐槸寰楀埌鎬昏鏁扮殑query瀛楃涓詫細

private final static String totalPresidentsQuery = 
" SELECT count(*) FROM presidents ";

1.4.2. Filter 鍜?Sort Query 瀛楃涓?/h4>

涓や釜鏈鏈夎叮鐨勬柟娉曞氨鏄繃婊ゅ拰鎺掑簭銆?/p>

filter鐪嬭搗鏉ュ儚榪欐牱錛?/p>

public String filterQuery(String query, String property, String value) {
StringBuffer result = new StringBuffer(query);

if (query.indexOf("WHERE") == -1) {
result.append(" WHERE 1 = 1 "); //stub WHERE clause so can just append AND clause
}

if (property.equals("fullName")) {
result.append(" AND concat(first_name, ' ',last_name) like '%" + value + "%'");
} else if (property.equals("nickName")) {
result.append(" AND nick_name like '%" + value + "%'");
} else {
result.append(" AND " + property + " like '%" + value + "%'");
}

return result.toString();
}

filterQuery()鏂規(guī)硶闇瑕佸鍔犳紜殑AND璇彞鍒皅uery瀛楃涓層?/p>

sort鐪嬭搗鏉ラ潪甯哥被浼鹼細

public String sortQuery(String query, String property, String sortOrder) {
StringBuffer result = new StringBuffer(query + " ORDER BY ");

if (property.equals("fullName")) {
result.append("concat(first_name, ' ',last_name) " + sortOrder);
} else {
result.append(property + " " + sortOrder);
}

return result.toString();
}

sortQuery()鏂規(guī)硶闇瑕佸鍔犳紜殑ORDER BY璇彞鍒皅uery瀛楃涓層?/p>

1.4.3. Limit Query String

鐜板湪query瀛楃涓蹭慨鏀硅兘澶熸紜殑榪涜filter鍜宻ort錛屽畠榪橀渶瑕佷慨鏀逛互渚垮彧鍙栭〉闈㈡樉紺虹浉鍏崇殑鏁版嵁銆侻ySQL涓簊 the limit鍛戒護銆?/p>

public String limitQuery(int rowEnd, String query) {
return query + " limit " + rowEnd;
}

1.4.4. 鍙栧洖鎬昏鏁板拰Collection.

service闇瑕佺殑鍞竴涓滆タ灝辨槸錛氭昏鏁板拰Collection銆?/p>

public Collection getPresidents(final String query) {
return jdbcTemplate.query(query, new ResultReader() {
List results = new ArrayList();
public List getResults() {
return results;
}

public void processRow(ResultSet rs)
throws SQLException {
President president = new President();
president.setPresidentId(new Integer(rs.getInt("presidentId")));
president.setFirstName(rs.getString("firstName"));
president.setLastName(rs.getString("lastName"));
president.setNickName(rs.getString("nickName"));
president.setFullName(rs.getString("fullName"));
president.setTerm(rs.getString("term"));
president.setBorn(rs.getDate("born"));
president.setDied(rs.getDate("died"));
president.setEducation(rs.getString("education"));
president.setCareer(rs.getString("career"));
president.setPoliticalParty(rs.getString("politicalParty"));
results.add(president);
}
});
}

public int getTotalPresidents(final String query) {
return jdbcTemplate.queryForInt(query);
}

ResultReader鏄竴涓府鍔╁鐞咼DBC鏌ヨ鐨凷pring鐗規(guī)畩綾伙紝浣滀負涓涓猚allback鏉ュ鐞咼DBC ResultSet銆俲dbcTemplate鏄JDBC榪炴帴鐨勬娊璞°?/p>

1.4.5. 榛樿鐨凷ort欏哄簭

鏈鍚庯紝榪欐槸service闇瑕佺殑榛樿sort欏哄簭錛?/p>

public String getDefaultSortOrder() {
return " ORDER BY concat(first_name, ' ', last_name) ";
}


Jhonney 2007-06-12 21:28 鍙戣〃璇勮
]]>
rowset涓嬭澆鍦板潃http://m.tkk7.com/Jhonney/archive/2007/06/08/122830.htmlJhonneyJhonneyFri, 08 Jun 2007 05:23:00 GMThttp://m.tkk7.com/Jhonney/archive/2007/06/08/122830.htmlhttp://m.tkk7.com/Jhonney/comments/122830.htmlhttp://m.tkk7.com/Jhonney/archive/2007/06/08/122830.html#Feedback0http://m.tkk7.com/Jhonney/comments/commentRss/122830.htmlhttp://m.tkk7.com/Jhonney/services/trackbacks/122830.html
http://java.sun.com/products/jdbc/download.html#rowsetcobundle1_0
//////////////////////////////////

鍦ㄤ嬌鐢╮owset鍖呯殑鏃跺欓亣鍒頒簡榪欐牱鐨勯棶棰橈細
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
at java.util.Properties.load(Properties.java:266)
at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:96)
at com.sun.rowset.JdbcRowSetResourceBundle.<init>(JdbcRowSetResourceBundle.java:92)
at com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(JdbcRowSetResourceBundle.java:114)
at com.sun.rowset.CachedRowSetImpl.<init>(CachedRowSetImpl.java:360)Exception: null
at com.sun.rowset.WebRowSetImpl.<init>(WebRowSetImpl.java:68)
at test.Test.generateXML(Test.java:98)
at test.Test.main(Test.java:168)

鍦ㄧ綉涓婄湅浜嗕竴綃囥婁嬌鐢ㄦ渶鏂皊un鍏徃鐨剅owset.jar鍖呯殑璇鋒敞鎰忋嬬殑鏂囩珷錛岀敤浜嗘劅瑙変笉澶ソ浣匡紝鍙堢湅浜嗕竴涓媠un紺懼尯鐨勯偅綃囷紝閲岄潰鏈夌鏂規(guī)硶錛屾尯濂界敤錛屼篃涓嶇敤淇敼rowset鍖咃紝鎴戝啓浜嗕竴涓狢achedRowSet鐢熸垚綾?鎶婅嚜宸辯殑浠g爜璐村嚭鏉ワ紝鍜屽ぇ瀹跺垎浜?涓嶇煡閬撲唬鐮佸ソ浣夸笉濂?.

rowset.jar鍖呭彲浠ュ湪涓嬮潰鐨勮繛鎺ラ〉闈笅杞?/p>

http://java.sun.com/products/jdbc/download.html#rowsetcobundle1_0

import javax.sql.rowset.CachedRowSet;
import com.sun.rowset.CachedRowSetImpl;
import java.util.Locale;
import java.sql.*;

public class cachedRowsetCreater {
  protected CachedRowSet crs=createCachedRowset();
  public void close(){
    try {
      crs.release();
    }
    catch (SQLException ex) {
    }
    crs=null;
  }
  public cachedRowsetCreater(String JNDI_NAME) throws Exception {
    crs.setDataSourceName(JNDI_NAME);
}

  public CachedRowSet createCachedRowset() throws SQLException
{
Locale locale = Locale.getDefault ();
try
{//璁劇疆璧勬簮涓轟腑鍥藉ぇ闄?br>Locale.setDefault (Locale.CHINESE);//鍦╨inux涓嬪ソ鍍忚鐢–HINA
return new CachedRowSetImpl ();
}
finally
{
Locale.setDefault (locale);
}
}
public CachedRowSet executeQuery(String QueryString){
  try{
  CachedRowSet crs1=crs.createCopySchema();
  crs1.setCommand(QueryString);
  crs1.execute();
  return crs1;
}catch(SQLException e){
  return null;
}
}

}



Jhonney 2007-06-08 13:23 鍙戣〃璇勮
]]>
cvc-complex-type.2.4.a閿欒瑙e喅鏂規(guī)硶http://m.tkk7.com/Jhonney/archive/2007/05/19/118546.htmlJhonneyJhonneySat, 19 May 2007 06:56:00 GMThttp://m.tkk7.com/Jhonney/archive/2007/05/19/118546.htmlhttp://m.tkk7.com/Jhonney/comments/118546.htmlhttp://m.tkk7.com/Jhonney/archive/2007/05/19/118546.html#Feedback0http://m.tkk7.com/Jhonney/comments/commentRss/118546.htmlhttp://m.tkk7.com/Jhonney/services/trackbacks/118546.html<jsp-config>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

<taglib>
銆銆<taglib-uri>/tags/struts-bean</taglib-uri>
銆銆<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
銆銆</taglib>
銆銆
銆銆<taglib>
銆銆<taglib-uri>/tags/struts-logic</taglib-uri>
銆銆<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
銆銆</taglib>
</jsp-config>
///////鎶婃墍鏈夎窡jsp璁劇疆鏈夊叧鐨勫唴瀹歸兘鏀懼湪<jsp-config></jsp-config>閲岄潰////////


Jhonney 2007-05-19 14:56 鍙戣〃璇勮
]]>鍗曚緥鐨勫疄鐜?/title><link>http://m.tkk7.com/Jhonney/archive/2007/04/12/110281.html</link><dc:creator>Jhonney</dc:creator><author>Jhonney</author><pubDate>Thu, 12 Apr 2007 13:55:00 GMT</pubDate><guid>http://m.tkk7.com/Jhonney/archive/2007/04/12/110281.html</guid><wfw:comment>http://m.tkk7.com/Jhonney/comments/110281.html</wfw:comment><comments>http://m.tkk7.com/Jhonney/archive/2007/04/12/110281.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Jhonney/comments/commentRss/110281.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Jhonney/services/trackbacks/110281.html</trackback:ping><description><![CDATA[public class Singleton {      <br>     <br>  static class SingletonHolder {      <br>    static Singleton instance = new Singleton();      <br>  }      <br>     <br>  public static Singleton getInstance() {      <br>    return SingletonHolder.instance;      <br>  }      <br>     <br>}   <br> <p>See in : <a target=blank><u><font color=#800080>http://crazybob.org/2007/01/lazy-loading-singletons.html</font></u></a> <br>See also : <a target=blank><u><font color=#0000ff>http://www.oreillynet.com/onjava/blog/2007/01/singletons_and_lazy_loading.html</font></u></a></p> <img src ="http://m.tkk7.com/Jhonney/aggbug/110281.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Jhonney/" target="_blank">Jhonney</a> 2007-04-12 21:55 <a href="http://m.tkk7.com/Jhonney/archive/2007/04/12/110281.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://wwwjjz.com" target="_blank">四虎影视www四虎免费</a>| <a href="http://mcsser.com" target="_blank">青草草色A免费观看在线</a>| <a href="http://www-188588.com" target="_blank">a级片在线免费看</a>| <a href="http://4001120002.com" target="_blank">中国人xxxxx69免费视频</a>| <a href="http://vastraje.com" target="_blank">人人狠狠综合久久亚洲高清</a>| <a href="http://54vpn.com" target="_blank">亚洲国产综合精品中文第一区</a>| <a href="http://avdaka.com" target="_blank">亚洲欧美日韩中文字幕在线一区</a>| <a href="http://ygf123.com" target="_blank">中国在线观看免费的www</a>| <a href="http://18eeuus.com" target="_blank">成年人网站在线免费观看</a>| <a href="http://b7277.com" target="_blank">亚洲精品制服丝袜四区</a>| <a href="http://kj555888.com" target="_blank">亚洲av无码有乱码在线观看</a>| <a href="http://127ht.com" target="_blank">84pao强力永久免费高清</a>| <a href="http://www8x5188x.com" target="_blank">亚洲精品国产va在线观看蜜芽</a>| <a href="http://lookvod.com" target="_blank">亚洲香蕉久久一区二区</a>| <a href="http://440878.com" target="_blank">精品免费视在线观看</a>| <a href="http://mm9d.com" target="_blank">亚洲AV无码专区日韩</a>| <a href="http://szgreater.com" target="_blank">亚洲综合av一区二区三区不卡</a>| <a href="http://jimeng-99.com" target="_blank">99视频免费播放</a>| <a href="http://xmjcjc.com" target="_blank">亚洲高清专区日韩精品</a>| <a href="http://ningxialanh.com" target="_blank">黄色毛片免费在线观看</a>| <a href="http://mllm999.com" target="_blank">亚洲 自拍 另类小说综合图区</a>| <a href="http://500308k.com" target="_blank">一个人看的免费观看日本视频www</a>| <a href="http://zxzzzzx.com" target="_blank">最新中文字幕免费视频</a>| <a href="http://xxxxnii.com" target="_blank">日韩在线视精品在亚洲</a>| <a href="http://czhos.com" target="_blank">精品免费国产一区二区</a>| <a href="http://www-993789.com" target="_blank">亚洲国产成人精品无码区在线秒播</a>| <a href="http://dazngt.com" target="_blank">a毛片久久免费观看</a>| <a href="http://ding001.com" target="_blank">午夜毛片不卡免费观看视频</a>| <a href="http://imfever.com" target="_blank">国产在亚洲线视频观看</a>| <a href="http://ac839.com" target="_blank">日本牲交大片免费观看</a>| <a href="http://ehiver.com" target="_blank">亚洲已满18点击进入在线观看</a>| <a href="http://hnkangshi.com" target="_blank">国产在线a不卡免费视频</a>| <a href="http://sese3366.com" target="_blank">亚洲高清乱码午夜电影网</a>| <a href="http://wwwff113.com" target="_blank">成人免费一区二区无码视频</a>| <a href="http://zblinghang.com" target="_blank">亚洲精品无码久久久久久久 </a>| <a href="http://516698.com" target="_blank">24小时免费看片</a>| <a href="http://shenghe228.com" target="_blank">亚洲色精品三区二区一区</a>| <a href="http://liuxilife.com" target="_blank">国产亚洲精品免费视频播放</a>| <a href="http://yiuuu.com" target="_blank">日韩毛片免费一二三</a>| <a href="http://www999973.com" target="_blank">免费一级毛片正在播放</a>| <a href="http://zz1220.com" target="_blank">亚洲av成人无码网站…</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>