Iis+resin integrates multiple sites and database connection pools

Source: Internet
Author: User
Tags header iis

Web development has always been done using resin as a container, very convenient to configure, fast to start and execute. Resin's official site says resin's Web server is also very fast, so it's not possible to integrate with Apache or IIS. Of course, it is normal to integrate with the project if necessary. Note that the Isapi_srun.dll version needs to be aware that a resin version of this file, if integrated with IIS, is very slow. I use the 3.0.23, the speed is also acceptable. As for how resin and IIS are integrated, here's what you can find on the web.
If you want to integrate multiple database connection pools, you will need to configure several <database></database> options so that you can use them in Java programs, such as Hibernate. For example,
<database>
<jndi-name>jdbc/aaa</jndi-name>
<driver type= Net.sourceforge.jtds.jdbc.Driver "
<url>jdbc:jtds:sqlserver://localhost/bupt</url>
< User>ddd</user>
<password>ddd</password>
</driver>
< Prepared-statement-cache-size>32</prepared-statement-cache-size>
<max-connections>20</ Max-connections>
<max-idle-time>120s</max-idle-time>
</database>

<database>
<jndi-name>jdbc/ddd</jndi-name>
<driver type= "Net.sourceforge.jtds.jdbc.Driver" >
<url>jdbc:jtds:sqlserver://localhost/mobi</url>
<user>ddd</user>
<password>ddd</password>
</driver>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>120s</max-idle-time>
</database>


If you need to configure more than one virtual host, you need to configure multiple sites in IIS first, and each site is differentiated by the host header. And each site to create a virtual directory, the IIS directory to join the scripts, of course, here you have integrated resin. You will then need to change the resin profile resin.conf. Adding several host projects is available. Like what
<!--
-Configures an explicit root web-app matching the
-WebApp ' s ROOT
-->
<web-app id= "/" document-directory= "E:\eclipse\workspace\bupt\web"/>

<!--
-Configures an explicit root web-app matching the
-WebApp ' s ROOT
-->
<web-app id= "/" document-directory= "E:\eclipse\workspace\mobi\web"/>
The ID of the host here needs to correspond to the host header of the site in IIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.