湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx
- 文档编号:17662126
- 上传时间:2022-12-08
- 格式:DOCX
- 页数:28
- 大小:764.87KB
湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx
《湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx(28页珍藏版)》请在冰豆网上搜索。
geronimo-jta_1.0.1B_spec-1.0.1.jar
修改文件:
Tomcatconf下的context.xml
<
!
--Thecontentsofthisfilewillbeloadedforeachwebapplication-->
Context>
<
--Defaultsetofmonitoredresources-->
WatchedResource>
WEB-INF/web.xml<
/WatchedResource>
--UncommentthistodisablesessionpersistenceacrossTomcatrestarts-->
--
Managerpathname="
"
/>
-->
--UncommentthistoenableCometconnectiontacking(providesevents
onsessionexpirationaswellaswebapplifecycle)-->
ValveclassName="
org.apache.catalina.valves.CometConnectionManagerValve"
Resource
name="
jms/FailoverConnectionFactory"
auth="
Container"
type="
org.apache.activemq.ActiveMQConnectionFactory"
description="
JMSConnectionFactory"
factory="
org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="
failover:
(tcp:
61616)?
initialReconnectDelay=100&
amp;
maxReconnectAttempts=5"
brokerName="
localhost"
useEmbeddedBroker="
false"
/>
jms/NormalConnectionFactory"
brokerURL="
tcp:
61616"
Resourcename="
jms/topic/MyTopic"
mand.ActiveMQTopic"
physicalName="
MY.TEST.FOO"
jms/queue/MyQueue"
mand.ActiveMQQueue"
MY.TEST.FOO.QUEUE"
/Context>
Activemqconf下的activemq.xml文件
LicensedtotheApacheSoftwareFoundation(ASF)underoneormore
contributorlicenseagreements.SeetheNOTICEfiledistributedwith
thisworkforadditionalinformationregardingcopyrightownership.
TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0
(the"
License"
);
youmaynotusethisfileexceptincompliancewith
theLicense.YoumayobtainacopyoftheLicenseat
http:
//www.apache.org/licenses/LICENSE-2.0
Unlessrequiredbyapplicablelaworagreedtoinwriting,software
distributedundertheLicenseisdistributedonan"
ASIS"
BASIS,
WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.
SeetheLicenseforthespecificlanguagegoverningpermissionsand
limitationsundertheLicense.
-->
--STARTSNIPPET:
example-->
beans
xmlns="
http:
//www.springframework.org/schema/beans"
xmlns:
amq="
//activemq.apache.org/schema/core"
xsi="
//www.w3.org/2001/XMLSchema-instance"
xsi:
schemaLocation="
//www.springframework.org/schema/beanshttp:
//www.springframework.org/schema/beans/spring-beans-2.0.xsd
//activemq.apache.org/schema/corehttp:
//activemq.apache.org/schema/core/activemq-core.xsd
//activemq.apache.org/camel/schema/springhttp:
//activemq.apache.org/camel/schema/spring/camel-spring.xsd"
>
--Allowsustousesystempropertiesasvariablesinthisconfigurationfile-->
beanclass="
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
brokerxmlns="
persistent="
true"
useShutdownHook="
--Destinationspecificpoliciesusingdestinationnamesorwildcards-->
destinationPolicy>
policyMap>
policyEntries>
policyEntryqueue="
memoryLimit="
5mb"
policyEntrytopic="
dispatchPolicy>
strictOrderDispatchPolicy/>
/dispatchPolicy>
subscriptionRecoveryPolicy>
lastImageSubscriptionRecoveryPolicy/>
/subscriptionRecoveryPolicy>
/policyEntry>
/policyEntries>
/policyMap>
/destinationPolicy>
--UsethefollowingtoconfigurehowActiveMQisexposedinJMX-->
managementContext>
managementContextcreateConnector="
/managementContext>
--ThestoreandforwardbrokernetworksActiveMQwilllistento-->
networkConnectors>
--bydefaultjustautodiscovertheotherbrokers-->
networkConnectorname="
default-nc"
uri="
multicast:
//default"
--Exampleofastaticconfiguration:
host1andhost2"
static:
//(tcp:
//host1:
61616,tcp:
//host2:
61616)"
/networkConnectors>
persistenceAdapter>
amqPersistenceAdapterdirectory="
activemq-data"
maxFileLength="
32mb"
/persistenceAdapter>
--UsethefollowingifyouwishtoconfigurethejournalwithJDBC-->
journaledJDBCdataDirectory="
${activemq.base}/data"
dataSource="
#postgres-ds"
--OrifyouwanttousepureJDBCwithoutajournal-->
jdbcPersistenceAdapterdataSource="
--Themaximumaboutofspacethebrokerwillusebeforeslowingdownproducers-->
systemUsage>
memoryUsage>
memoryUsagelimit="
20mb"
/memoryUsage>
storeUsage>
storeUsagelimit="
1gb"
foo"
/storeUsage>
tempUsage>
tempUsagelimit="
100mb"
/tempUsage>
/systemUsage>
--ThetransportconnectorsActiveMQwilllistento-->
transportConnectors>
transportConnectorname="
openwire"
discoveryUri="
ssl"
ssl:
61617"
stomp"
stomp:
61613"
xmpp"
xmpp:
61222"
/transportConnectors>
/broker>
**LetsdeploysomeEnterpriseIntegrationPatternsinsidetheActiveMQMessageBroker
**Formoredetailssee
**
**http:
//activemq.apache.org/enterprise-integration-patterns.html
camelContextid="
camel"
//activemq.apache.org/camel/schema/spring"
--Youcanusea<
package>
elementforeachrootpackagetosearchforJavaroutes-->
org.foo.bar<
/package>
--YoucanuseSpringXMLsyntaxtodefinetherouteshereusingthe<
route>
element-->
fromuri="
activemq:
example.A"
touri="
example.B"
/route>
/camelContext>
--UncommenttocreateacommandagenttorespondtomessagebasedadmincommandsontheActiveMQ.Agenttopic-->
commandAgentxmlns="
brokerUrl="
vm:
//localhost"
--AnembeddedservletengineforservinguptheAdminconsole-->
jettyxmlns="
connectors>
nioConnectorport="
8161"
/connectors>
handlers>
webAppContextcontextPath="
/admin"
resourceBase="
${activemq.base}/webapps/admin"
logUrlOnStart="
/demo"
${activemq.base}/webapps/demo"
/fileserver"
${activemq.base}/webapps/fileserver"
/handlers>
/jetty>
--Thisxbeanconfigurationfilesupportsallthestandardspringxmlconfigurationoptions-->
--PostgresDataSourceSampleSetup-->
beanid="
postgres-ds"
class="
org.postgresql.ds.PGPoolingDataSource"
propertyname="
serverName"
value="
databaseName"
activemq"
portNumber"
0"
user"
password"
dataSourceName"
postgres"
initialConnections"
1"
maxConnections"
10"
/bean>
--MySqlDataSourceSampleSetup-->
mysql-ds"
mons.dbcp.BasicDataSource"
destroy-method="
close"
driverClassName"
com.mysql.jdbc.Driver"
url"
jdbc:
mysql:
//localhost/activemq?
relaxAutoCommit=true"
username"
maxActive"
200"
poolPreparedStatements"
--OracleDataSourceSampleSetup-->
oracle-ds"
oracle.jdbc.driver.OracleDriver"
oracle:
thin:
@localhost:
1521:
AMQDB"
scott"
tiger"
--EmbeddedDerbyDataSourceSampleSetup-->
derby-ds"
org.apache.derby.jdbc.EmbeddedDataSource"
derbydb"
createDatabase"
create"
/beans>
--ENDSNIPPET:
Tomcat下webapps\aa项目的web.xml
?
xmlversion="
1.0"
encoding="
UTF-8"
web-appversion="
2.4"
servlet>
<
servlet-n
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 湘潭 大学 j2ee 实验 报告 绝对 完整