Migrate web applications to tongweb

Source: Internet
Author: User

From: http://blog.csdn.net/jwork/article/details/386601

Only web application migration instructions are provided. This article also introduces the usage and configuration of the kingbase data source in tongweb.
Java_home settings:
To correctly start tongweb, you must set the java_home value in the system environment variable.
Kingbase database driver loading:
Tongweb does not have a built-in JDBC database driver. You need to manually add the jar package of the database driver into tongweb_home/lib and restart tongweb.
Data source configuration in tongweb:
Start tongweb and go to the tongweb console through http: // localhost: 8001/. The default user/password is admin/tongweb.
Click Database Service on the right of the console. tongweb has a default hypersonic data source. Click Create to display the configuration data source window. Fill in the required configuration items one by one:
1. datasource. Name = dsname
The JNDI name of the data source will be referenced in the teas-web.xml, and hibernate. Properties of hibernate will also indirectly use this value
2. datasource. url = JDBC: King base: // 127.0.0.1: 54321/test
Database Connection URL
3. datasource. classname = com. kingbase. Driver
The database driver used. The Human Resource Warehouse database is currently used.
4. Set other attributes based on the environment
Add teas-web.xml:
Add a tongweb profile WEB-INF to the webconent/teas-web.xml
<? XML version = "1.0" encoding = "ISO-8859-1"?>
<Twweb>
<Connchnl>
<Channel>
<Enabled> Yes </enabled>
</Channel>
<Connection>
<Type> HTTP </type>
<Port> 8030 </port> <! -Port number. If this parameter is not set, the value is 8008 -->
<Threadtimeout> 300 </threadtimeout>
<Clienttimeout> 30 </clienttimeout>
<Numthreads> 200 </numthreads>
<Queuesize> 400 </queuesize>
</Connection>
</Connchnl>
<Resource-ref>
<Res-ref-Name> localdsname </RES-ref-Name> <! -Application Program The JNDI name used -->
<JNDI-Name> dsname </JNDI-Name> <! -Name of the data source configured in tongweb -->
</Resource-ref>
</Twweb>
Note that the teas-web.xml file is not required, but the port number is set to 8008 and is required to specify the resource since the system uses JNDI to bind the data source. The res-ref-name must be the same as the hibernate. Connection. datasource name in hibernate. properties. The JNDI-name should correspond to the name of the data source configured in tongweb. In addition, the context of the Web application should be specified in this file, but it is unclear how to set it. By default, the name of the war package is used, that is, webapp. war, then the context is localhost: 8008/webapp/index. JSP.
Deploy Web applications:
Copy the packaged war package to tongweb_home/installed/to publish the package. If the package is published as a folder, you can export the folder to tongweb_home/installed/temp.

 

Notes
1. Copy the cglib-nodep-2.1_3.jar to the Lib of the application,
2. Deploy through the directory method of the console, use the D: \ framework \ appserver \ jboss-4.2.3.GA \ Server \ Default \ deploy \ phr4.war folder under JBoss,
3. Because the phr project involves WebService access, for example, the phr is deployed on 10.1.112.190, but the WebService application is deployed on 10.1.112.172, Ping 190 on 172 to ping,
If the ping fails, an exception occurs during connection timeout.
4. You may also need the antlr-2.7.6.jar package.
5. The sun-jaxws.xml file is stored in the relevant WebService interface, useless need to delete;
6. The following configuration exists in Web. xml:
[HTML] view plaincopyprint?
<Listener>
<Listener-class>
Com. Sun. xml. ws. Transport. http. servlet. wsservletcontextlistener
</Listener-class>
</Listener>

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.