|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.instantbank.component.lettersjobmdb.ejb.LettersJobMessageEJB
Message Driven bean that process letter jobs. A message is a "reference" to a letter job.
Inner Class Summary | |
(package private) class |
LettersJobMessageEJB.SequencedFileName
Auxiliary class that generates names of files with a sequencing criterium. |
Field Summary | |
private Debug |
debug
The ubiquitous debugger object. |
private java.lang.String |
jobName
Name of the job |
private long |
templateCode
Code of the template bound to the letter job. |
Constructor Summary | |
LettersJobMessageEJB()
|
Method Summary | |
private void |
addLetter(java.util.zip.ZipOutputStream zout,
java.io.ByteArrayOutputStream letter,
int i,
java.lang.String ext)
Adds a letter as a new entry in a zip structure. |
void |
ejbCreate()
Initializes the debugger. |
void |
ejbRemove()
This method has void body for Mesage Driven Beans. |
void |
onMessage(javax.jms.Message jobMsg)
Process one letter job. |
private java.lang.String |
serializeSqlExec(java.util.ArrayList[] execSet)
Transforms the result of execution of the sql statement bound to a job into a String of row values separated by a non printable ROW_SEPARATOR character and values in a row separated by a VALUE_SEPARATOR non printable character. |
void |
setMessageDrivenContext(javax.ejb.MessageDrivenContext mdc)
Nothing interesting here. |
private java.lang.String |
writeZipFile(java.util.zip.ZipOutputStream zout,
java.io.File workDir,
java.lang.String zipname,
java.io.ByteArrayOutputStream zipbytes)
Writes a zip structure to a file. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private long templateCode
private java.lang.String jobName
private Debug debug
Constructor Detail |
public LettersJobMessageEJB()
Method Detail |
public void ejbRemove() throws javax.ejb.EJBException
ejbRemove
in interface javax.ejb.MessageDrivenBean
javax.ejb.EJBException
- Description of the Exceptionpublic void setMessageDrivenContext(javax.ejb.MessageDrivenContext mdc) throws javax.ejb.EJBException
setMessageDrivenContext
in interface javax.ejb.MessageDrivenBean
mdc
- The new messageDrivenContext valuejavax.ejb.EJBException
- Description of the Exceptionpublic void ejbCreate()
public void onMessage(javax.jms.Message jobMsg)
onMessage
in interface javax.jms.MessageListener
jobMsg
- Description of the Parameterprivate void addLetter(java.util.zip.ZipOutputStream zout, java.io.ByteArrayOutputStream letter, int i, java.lang.String ext) throws java.lang.Exception
zout
- The zip structure (in main memory).letter
- The letter to be added (in main memory)i
- A sequence number bound to the letter.ext
- The extension appended to the zip entry name.java.lang.Exception
- Description of the Exceptionprivate java.lang.String writeZipFile(java.util.zip.ZipOutputStream zout, java.io.File workDir, java.lang.String zipname, java.io.ByteArrayOutputStream zipbytes) throws java.lang.Exception
zout
- OutputStream through wich the zip structure has been created.workDir
- Directory where the file will be created.zipname
- Name of the file to be created.zipbytes
- The zip structure to be written.java.lang.Exception
- Description of the Exceptionprivate java.lang.String serializeSqlExec(java.util.ArrayList[] execSet)
execSet
- The result as calculated by LetterTemplate.executeSQL().
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |