public class JmsManagedObject extends Object implements ManagedObject, Transaction
ManagedObject
for a JMS Session
.
TODO close the session on disposing of managed object.Constructor and Description |
---|
JmsManagedObject(javax.jms.Session session,
TextMessageProducer producer)
Initiate with
Session . |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begins the transaction.
|
void |
commit()
Commit the transaction.
|
Object |
getObject()
Obtains the object being managed.
|
void |
rollback()
Rolls back the transaction.
|
public JmsManagedObject(javax.jms.Session session, TextMessageProducer producer)
Session
.session
- Session
.producer
- TextMessageProducer
.public Object getObject() throws Exception
ManagedObject
getObject
in interface ManagedObject
Exception
public void begin() throws Exception
Transaction
begin
in interface Transaction
Exception
- If fails to begin.public void commit() throws Exception
Transaction
commit
in interface Transaction
Exception
- If fails to commit.public void rollback() throws Exception
Transaction
rollback
in interface Transaction
Exception
- If fails to rollback.Copyright © 2005–2016. All rights reserved.