This project demonstrates how an EAR archive with an MDB can be created : Message Driven Beans « J2EE « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Collections Data Structure
8. Database SQL JDBC
9. Design Pattern
10. Development Class
11. Email
12. Event
13. File Input Output
14. Game
15. Hibernate
16. J2EE
17. J2ME
18. JDK 6
19. JSP
20. JSTL
21. Language Basics
22. Network Protocol
23. PDF RTF
24. Regular Expressions
25. Security
26. Servlets
27. Spring
28. Swing Components
29. Swing JFC
30. SWT JFace Eclipse
31. Threads
32. Tiny Application
33. Velocity
34. Web Services SOA
35. XML
Microsoft Office Word 2007 Tutorial
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java » J2EE » Message Driven BeansScreenshots 
This project demonstrates how an EAR archive with an MDB can be created

// Example from 'maruthi at aprameyah.com'

This project demonstrates how an EAR archive with an MDB can be created.
The project also demonstrates the use of an utility jar and the JNDI based datasource.
The project also demonstrates how to send a message to the MDB for testing. 
This can be imported as an eclipse project. 

Description of files:
build.xml: Builds the MDB jar file into the EAR folder
jbossmq-destinations-service.xml: The file that contains the Queue configuration for JBoss. Compare this with the file located in jboss\server\default\deploy\jms folder to understad the configuration of a new queue in jboss
mysql-ds.xml: the file that configures a MySQL database connection factory in JNDI. You might have to edit to suit your database. For use with other types of databases, refer to sample configuration XML files in jboss\docs\examples\jca folder
mysql-connector-java-5.0.5-bin.jar: this is the MySQL JDBC driver. Should be placed in jboss\server\default\lib folder so that the connection can be made
testMDB.java: the main method class that can be used to send a message to the MDB for testing
MyMDBean.java - the MDB class


Procedure to setup this archive:

1. create the Q required by copying jbossmq-destinations-service.xml to jboss\server\default\jms folder
2. create the database connection factory by copying mysql-ds.xml to jboss\server\default\deploy folder
3. Run the build.xml to create the EJB jar
4. Copy the SampleMDB.ear to jboss\server\default\deploy folder
5. Start jboss and run the testMDB.java to send the message for testing.



           
       
EclipseProjectMDB.zip( 4,511 k)
Related examples in the same category
w___w_w_._ja___v___a_2___s___.com__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.