Task #350

JMS R&D

Added by Tan Lee Yong about 14 years ago. Updated about 14 years ago.

Status:Closed - End of life cycleStart date:August 10, 2010
Priority:NormalDue date:August 12, 2010
Assignee:Ang Wei Cheng% Done:

100%

Category:-Spent time:8.00 hours
Target version:-

Description

Do research, develop and test JMS on WebLogic server.
For those who involved in this research task, please update you finding here.
So all of us can share the finding and ideas.

jms.pdf - Programming weblogic jms (2.09 MB) Ang Wei Cheng, August 11, 2010 10:45

History

#1 Updated by Wong Bernard about 14 years ago

Read this tutorial up till Chapter 8: http://download-llnw.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html

1. Need to use Point-to-Point (PTP)

2. Message settings to use:
  • PERSISTENT - Data is kept even if there is a failure in transmission
  • Session.CLIENT_ACKNOWLEDGE - Client has to manually acknowledge the acceptance of message
  • setPriority (0-9) - Determine important messages to be transited first, based on application
  • setTimeToLive - Based on application

3. Usage of JNDI and EJB is J2EE standard
4. Message-Driven Bean (MDB) - EJB that can handle connection
5. Distributed Transactions - Helps ensures data integrity
6. JMS admin controls are command lines

Sample coding provided in the link for easier understanding

#2 Updated by Ang Wei Cheng about 14 years ago

Studied the JMS concept, configuration and maintenance for JMS on WebLogic(create Queue, JMS server). Faced problem on how to execute the sample java code on the app server. EAR? Will investigate further on how to deploy message driven bean.

#3 Updated by Tan Lee Yong about 14 years ago

You can access this site for the WebLogic. You are free to deploy and test on it.

http://219.95.244.226:7001/console/
Username: weblogic
Password: @t3h@2oo9

#4 Updated by Ang Wei Cheng about 14 years ago

Discovered some documentations from the WebLogic CDs in the office.

#5 Updated by Ang Wei Cheng about 14 years ago

The tutorial at http://download-llnw.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html is referring to Java EE version 1.3. It is outdated. The j2ee commands and "deploytool" is not available anymore in the new version of java EE sdk. I'm not sure whether the sample code provided is still relevant to the newer version which probably uses more annotations.

Very limited resource and information is available on how to create and deploy EJB bean to the server, not to mention about JMS.

Downloaded and installed Java EE 5 SDK which is bundled with Glassfish app server. Downloaded and installed JMS SDK. Only ant script is provided to generate EAR file from the samples, which fail when I tried to run.

Try to install NetBeans now as the JAVA EE 5 official guide is referring to NetBeans directly.

links found:
http://download.oracle.com/javaee/
http://download.oracle.com/javaee/5/tutorial/doc/

#7 Updated by Ang Wei Cheng about 14 years ago

Successfully run the sample code from http://download.oracle.com/javaee/5/tutorial/doc/bncgw.html on glassfish app server.

Both the producer and consumer is Enterprise Java Bean(EJB). I found out that EJB makes it easier to act as a web service interface.

The generated EAR file fail to deploy on Weblogic. Need to look into weblogic documentation.

#8 Updated by Wong Bernard about 14 years ago

Checking out best programming practices for WebLogic JMS programs. Link:

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms/implement.html#wp1097243

Hopefully can get a connection to WebLogic soon

#9 Updated by Ang Wei Cheng about 14 years ago

I found out that the WebLogic server we are using is version 9.2. Its Java Enterprise version is 1.4 which is an older version and does not support the EJB features that I'm using.

Already asked Hazli to setup WebLogic version 10(Java EE 5). It's ready now. I can deploy the EAR file successfully. Need further testing though.

http://219.95.244.226:7001/console
username: weblogic
password: @t3h@2oo9

#10 Updated by Wong Bernard about 14 years ago

Can connect to WebLogic, can send, browse and receive messages. There are sample coding on the WebLogic server:

C:\ESB250\weblogic92\samples\server\examples\src\examples\jms

Now will implement EJBs.

#11 Updated by Tan Lee Yong about 14 years ago

Postponed our date to go to Maybank.
New date: August 19 to 27, 2010

#12 Updated by Tan Lee Yong about 14 years ago

This article talk about the EJB for serialization
http://www.jguru.com/faq/view.jsp?EID=301817

#13 Updated by Ang Wei Cheng about 14 years ago

Study more about EJB. Found an ebook but it's too big to upload here, can request from me in the future.

Trying to develop JMS producer EJB in Eclipse. Decided to make it a webservice client for easier testing. But discovered that Weblogic requires further compilation(tools provided with weblogic) in order for the EJB web service to work.

Hazli will download the weblogic 10 windows version for me.

#14 Updated by Ang Wei Cheng about 14 years ago

Tested the Webservice stateless EJB sample code. Works in Glassfish but not in WebLogic.

Found out that for WebLogic, its ant script need to be used to process the files before it can be recognized by the app server. Successfully run a simple webservice call on WebLogic.

Now going to combine the JMS sample code and webservice call together.

#15 Updated by Ang Wei Cheng about 14 years ago

  • % Done changed from 0 to 20

Successfully use the web service interface of the EJB to send message to the JMS. Now working on the Consumer(Receiver).

#16 Updated by Wong Bernard about 14 years ago

Some links to share:

http://download.oracle.com/docs/cd/E13222_01/wls/docs100/index.html - WebLogic 10 Documents including EJB3.0 and JMS

http://programming.manessinger.com/tutorials/an-eclipse-glassfish-java-ee-6-tutorial -

Using Eclipse to create EJBs easily, project design and management. Tutorial is long, but worth going through for design concept and methodology. Also introduces soapUI for testing with SOAP messages.

#17 Updated by Ang Wei Cheng about 14 years ago

  • % Done changed from 20 to 30

Successfully developed a Message Driven Bean(MDB) that will listen for new message from Request Queue and send a mock-up response to the Response Queue.

Need to work on filtering the message in EJB Consumer. Face some problems when try to deploy the files to the weblogic server in maybank.

#18 Updated by Ang Wei Cheng about 14 years ago

  • Assignee changed from Low Jelson to Ang Wei Cheng
  • % Done changed from 30 to 50

Able to filter message based on a String property called "msgId"(can be customized) when querying the queue for new message.

Trying to develop a mock up web application to simulate what happen at M2U Service layer calling the web services.

#19 Updated by Ang Wei Cheng about 14 years ago

  • % Done changed from 50 to 70

Developed a mock-up web application to call the web services. Timeout period is configured at the EJB side (set to 5 minutes for now).

WebLogic web console can actually displays the messages and its content. The message would not be expired by default.

Now try to integrate the socket programming code into the MDB.

#20 Updated by Ang Wei Cheng about 14 years ago

  • Status changed from New - Begin Life Cycle to Closed - End of life cycle
  • % Done changed from 70 to 100

Successfully deployed and tested the socket programming code segment in the MDB.

Also available in: Atom PDF