??xml version="1.0" encoding="utf-8" standalone="yes"?>
补充Q?
############
jar基本操作Q?
############
1. 创徏jar文g
jar cf jar-file input-file(s)
c---want to Create a JAR file.
f---want the output to go to a file rather than to stdout.
eg: 1)jar cf myjar.jar query_maintain_insert.htm
2)jar cvf myjar.jar query_maintain_insert.htm
v---Produces verbose(详细? output.
3)jar cvf myjar.jar query_maintain_insert.htm mydirectory
4)jar cv0f myjar.jar query_maintain_insert.htm mydirectory
0---don't want the JAR file to be compressed.
5)jar cmf MANIFEST.MF myjar.jar yahh.txt
m---Used to include manifest information from an existing manifest file.
6)jar cMf MANIFEST.MF myjar.jar yahh.txt
M---the default manifest file should not be produced.
7)jar cvf myjar.jar *
*---create all contents in current directory.
2. 察看jar文g
jar tf jar-file
t---want to view the Table of contents of the JAR file.
eg: 1)jar vft yahh.jar
v---Produces verbose(详细? output.
3. 提取jar文g
jar xf jar-file [archived-file(s)]
x---want to extract files from the JAR archive.
eg: 1)jar xf yahh.jar yahh.txt(仅提取文件yahh.txt)
2)jar xf yahh.jar alex/yahhalex.txt(仅提取目录alex下的文gyahhalex.txt)
3)jar xf yahh.jar(提取该jar包中的所有文件或目录)
4. 修改Manifest文g
jar cmf manifest-addition jar-file input-file(s)
m---Used to include manifest information from an existing manifest file.
5. 更新jar文g
jar uf jar-file input-file(s)
u---want to update an existing JAR file.
1。先得到上下文对?此对象的用client端得getContext()Ҏ(gu)加以改进复制)?
2。由对象然后lookup工厂的jndi(q个jndi WEBLOGIC默认的是"Weblogic.jms.ConnectionFactory")?
3。由工厂得到q接Q当然此q接Ҏ(gu)要得到的cd不同而改?队列是createQueueConnection主题是createTopicConnection)?
4。由conn得到相应的session例如(TopicSession session=conn.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);)
5。根据上下文对象和队列的jndi得到要监控的队列?Topic topic=(Topic)ctx.lookup("pubsub");)?
6。在session的基上徏立发送?
7。在session的基上徏立要发送的对象(Ҏ(gu)cd?U?
8。发送者发送对象?或?接收者开始接?
psQ关于自己写的监听class可以 写一个内部类 让这个内部类extends MessageListener interface,然后写一个和标准MDB一L(fng) onMessage()Ҏ(gu)?