Title: WebLogic 6.1 Developer Guide
1(No Transcript)
2JMS ??
- Java Message Service(JMS) ??
- Message-Oriented Middleware(MOM)?? Application?
Message? ??? ??? ??, ?? ???? ?? - ???? ??? MOM ?? Enterprise Messaging System? ????
?? API? JMS? - ?? Enterprise Messaging System? ?? ??? ??
- ??? ??? ?? API? ?????? Application ?? ??
Producer
Consumer
Message
Message
3Weblogic JMS? ??
- Weblogic JMS? ??
- JMS Spec 1.0.2 Version ??
- Clustering ??(?? Destination)
- ???? ??? ?? ??
- JTA? ?? ?? Transaction ? 2Phase Commit ??
- File ?? DB? ?? Persistent ??
- XML ??? ??
4JMS ?? ?? 1
- ?? ??
- Message Model
- Point to Point ?? ?? ?(?)? ????
- Publish/Subscribe ?? ?? ?(?)? ????.
Pub/Sub ??
PTP ??
5JMS ?? ?? 2
- Message Persistence
- ???? Persistent / Non Persistent ? ?? ??
- Persistent Message
- ??? ??? ??????? ??
- ?? JMS ??? ?? ???? ? ?? ? ??? receiver ?? ???? ??
- JMS ??? ???? ?? ?? ?? ??(file or db ) ? ??? ???
?? - JMS ??? Fail ???? ???? ?? ??
- Non Persistent Message
- JMS ??? Fail ?? ??? ??? ??????? ?? ??
- JMS ?? Fail? ?? ???? ?? ?? ? ??
- ConnectionFactory
- Factory ????? ??? Connection ??? ???, ??
Application ?? ??? Connection? ???? ??. - JNDI Binding ?? ?? (javax.jms.QueueConnectionFac
tory, javax.jms. TopicConnectionFactory,
weblogic.jms.ConnectionFactory), ?? ?? ?? - ?? ????? QueueConnectionFactory,
TopicConnectionFactory
6JMS ?? ?? 3
- Connection
- ?? App ? JMS ?? ?? ??
- ConnectionFactory? ?? ??
- ??? ?? JMS ?? ?? ??(username, password)
- ???? ?? ??(stop)??, ??? ??? ? ?? ?? ??(start)
- ?? ??? stop?? ? ? ?? receive??? blocking ??
- ?? ????? QueueConnection, TopicConnection
- Session
- ???? ??? ????, ?? ???? ??/???? MessageProducer ?
MessageConsumer? ?? - Connection? ?? ??
- ?? ??? ?? ??? ??? ??? ????
- ?? ????? QueueSession, TopicSession
7JMS ?? ?? 4
- Acknowledge Mode
- Non-Transacted Session ??? ???
- AUTO_ACKNOWLEDGE
- Session?? ???? ?? ???? ?? ??? ???.
- CLIENT_ACKNOWLEDGE
- ???? acknowledge()??? ?????? Acknowledge? ??
- Acknowledge ??? ????? Acknowledge? ??? ??? ?? ??
??? ?? Acknowledge - Session? recover() ??? ??? ? ?? ??
- DUPS_OK_ACKNOWLEDGE
- Session?? ???? ???? ??? ?? ??? ???.
- ??? Acknowledge? ??? ??? ?? ?? ??, Buffering??
???? ?? ??? Duplication? ???? - NO_ACKNOWLEDGE
- ???? ?? ?? ??? ?? ???.
- MULTICAST_NO_ACKNOWLEDGE
- ??? ??? ??? ???? ??? Multicast????? ??? ?????
???? ?? - Multicast ???? ??? ??? ?? ?????.
8JMS ?? ?? 5
- Destination
- ?? ???? ???? ?(???, ???)
- JMS ??? ??? ???
- ConnectionFactory? ???? JNDI lookup? ??? ???
- ???? Dest? ?? Dest ??
- ?? ????? Queue, Topic, TemporaryQueue,
TemporaryTopic - Message Producer/Consumer
- Session? ??? ???? Destination ? ??? ?? ?? ?? ???
?? ?? - Session? ?? ??
- ?? ??? ??
- ?? ????? QueueSender, QueueReceiver,
TopicePublisher, TopicSubscriber
9JMS ?? ?? 6
- Message Header ???? ?? ?? ?? ??(???? ??)
- Message Properties ???? ?? ?? ??
- Message Body
- Message Body?? Message ?????/??? Body ??? ?????
- TextMessage String ??
- StreamMessage primitive type? String ??? ??
Stream - BytesMessage byte? ?? Stream
- ObjectMessage Serializable ? ??? Object
- MapMessage primitive type? String ??? ?? ????
? - XMLMessage XML, TextMessage? ??,
weblogic.jms.extensions.XMLMessage
10JMS Sever ?? 1
- JMS Server ??
- ?????JMS?Servers?Configure a new JMSServer
11JMS Sever ?? 2
Topic/Queue ?? ???? ???? ?? ????
????? ??? ???? ??(???)? ?? ??? ?? Paging ??
????? ??? ???? ??(???)? ?? ??? ?? Paging ??
???? ??? ??? ?? high/low ??? ??? ???? ?
Topic/Queue ?? ???? ???? ?? ????
????? ??? ???? ??(??? ?)? ?? ??? ?? Paging ??
????? ??? ???? ??(??? ?)? ?? ??? ?? Paging ??
???? ??? ??? ?? high/low ??? ??? ???? ?
12JMS Sever ??3
- Destination ??
- ???? ?JMS?JMS Servers ? MyJMSServer ? JMS
Destinations
13JMS Sever ??4
Message Producer? ?? ??? Priority ? Override
Message Producer? ?? ??? TimeToLive ? Override
Message Producer? ?? ??? Time To Deliver ?
Override
Message Producer? ?? ??? Delivery Mode ? Override
(No-Delivery Not Chage)
14JMS Sever ??5
ConnectionFactory?? ??? ??? ????? Override
??? ?? ??
??? ? ???? ?? ???? ?? ??? ??
15JMS ?? 1
- JMS Chatting ?? ??
- JNDI? ??? ConnectionFactory? ????
- JNDI? ??? Destination? ????
- ConnectionFactory? ???? Connection ? ????
- Connection? ???? Session? ????
- Session? Destination? ???? ???? ????
MessageProducer? ???? ???? MessageConsumer?
????.?? ?????? ??? ?? MessageListener??? ????
MessageConsumer? ????. - Connection ? start()?? ??? ??/?? ??.
16JMS Connection Factory ?? 1
- JMS Connection Factory ??
- ?????JMS?Connection Factories?Configure a new JMS
Connection Factory
Connection Factory? JNDI Name
Durable subscription ???? ?? ???? ?? Client? ID
17JMS Connection Factory ?? 2
- JMS Connection Factory ??
- ?????JMS?Connection Factories?Configure a new JMS
Connection Factory
???? Delivery Mode Persistent, non-Persistent
???? ?? Max?? ?? ??? ??? ?? ??
onMessage()?? ??? Connection Close()? ? ? ??? ??
Client? acknowledge() ??? ?? ?? ?? Acknowledge ??
??
?? JMS Destination? ?? ??? ?? ? Load balance
?? Load Balancing ?? ????? Local JVM?
Destination? ??
18JMS Connection Factory ?? 3
- Transactions
- ?????JMS?Connection Factories?JMS Connection
Factory ?Transacton
Transaction Session?? ???? ??
?? ?? UserTransaction? ?? ??
Remote Client ?? ?? ? 2PC ?? ??
EJB? ?? Weblogic ?? ??? ?? ? 2PC ????
19JMS Connection Factory ?? 4
- Flow Control
- ?????JMS?Connection Factories?JMS Connection
Factory ?Flow Control
??? ??? ??? Flow? ??/?? ??? ?? 6?? ??? Flow? ??
/ ??
20JMS Store ?? 1
- File Store ??
- ?????JMS?Stores?Configure a new JMSFile Store
File ?? ?? Disabled OS? ?? Cache-Flush Cache?
?? Direct-Write ???(?)
21JMS Store ?? 2
- JDBC Store ??
- ?????JMS?Stores?Configure a new JMS JDBC Store
PreFix_JMSState, PreFix_ JMSStore ??? ?? ?? DB
??? , DB2, Infomix, MS-SQL, Sybase, PointBase
22Destination Key ?? 1
- Sort Message
- ????? ???? ??? ???? ?
- ??? ??? ??? ?? ???? ??? ??? ?? ??? ?? ??? ?? ? ??
- ?) Queue? ?? ???? ?? ??? ?? receiver ? ?? ??? ??
- ?? ?? ??? ?? ?? ? properties? ??? ??? ?? ??
- ?? ??
- Message Header (??? ??, ??)
- JMSMessageID , JMSTimestamp, JMSCorrelationID
, JMSPriority , JMSExpiration , JMSType ,
JMSRedelivered , JMSDeliveryTime - Message Properties
23Destination Key ?? 2
Unique Name
Message Header / Properties
Properties ? ?? property? ?? ?
?? ?? / ?? ??
24?? Destination 1
P2P
Que
? ? Q UE U E
? ? Q U E U E
Cosumer
Producer
Que
Que
?? ??? ?? Queue? Forwording
25?? Destination 2
Pub/Sub
Topic
Cosumer
? ? T O P I C
? ? T O P I C
Cosumer
Producer
Topic
Cosumer
Topic
?? ??? ?? ??? ???? ??? ? ??? ??? ?? Conumer?? ??
26?? Destination ?? 1
Unique ? ??
?? Detination JNDI Name
Round Robin ????? ?? Destination? ?? Random
Random ?? ?? Destination ??
Queue ?? ?? ?? ?? ?? ??? Consumer? ?? ?? ??
Queue? ???? Forwording ?? ?? ?? ??
27?? Destination ?? 2
?? Destination Member Name Unique
?? Destination Member Queue / Topic
?? Destination?? ?? Member? ??? Random ? ?? ??
28JMS , JDBC 2PC ??
- 2PC? ??? ?? ???? ??
- Weblogic Example ?? (C\bea\weblogic700\samples\se
rver\src\examples\jta\jmsjdbc) - Queue? ??? ?? ???? ??
- ??? ??? ???? Session Bean ?? DB? ??
29(No Transcript)
30Java Mail Session
- Weblogic ??? Mail ??
- Weblogic ???? Mail Server ??
- weblogic.jar ??? ??? ???? ?? ?? ??
- (IMAP, SMTP, POP ???? ?? Sun?? ?? ?? ??? ?)
- Mail Session? ??? ??? JNDI? ??? Mail ??? ?? ??
- ?? ??? Mail Session ??? ??? ??, ?? ??? ????? ???
- Mail Session Property
- mail.store.protocol imap, pop ?)
mail.store.protocolimap - mail.transport.protocol smtp ?)
mail.transport.protocolsmtp - mail.host ?? ?? ??? ?) mail.hostmail.mydom.org
- mail.protocol.host
- mail.smpt.hostmail.mydom.org
- mail.imap.hostmail.mydom.org
31Java Mail Session
- mail.user ?? ?? ??? ?? ??? (mail.userpostmaster
) - mail.protocol.user ?? ????? ?? ??
- mail.from ?? Return Address
- mail.debug ??? ??(true ???, false ??)
32Java Mail Session
Unique ? ??
JNDI Name
Mail Property ??