湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx

上传人:b****5 文档编号:17662126 上传时间:2022-12-08 格式:DOCX 页数:28 大小:764.87KB
下载 相关 举报
湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx_第1页
第1页 / 共28页
湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx_第2页
第2页 / 共28页
湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx_第3页
第3页 / 共28页
湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx_第4页
第4页 / 共28页
湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx_第5页
第5页 / 共28页
点击查看更多>>
下载资源
资源描述

湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx

《湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx(28页珍藏版)》请在冰豆网上搜索。

湘潭大学j2ee实验报告绝对完整Word格式文档下载.docx

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

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 考试认证 > IT认证

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1