Objectives
- Install the environment of development
Tools
- Java SE (JDK 6 or 7 higher) ~80MB
- MySQL Community Server (5.5.15) ~28MB
- MySQL Connector/J (5.1.17) ~4MB
- JBoss Application Server (7) ~68MB
- Eclipse IDE for Java EE Developers (Indigo) ~212MB
Installation
Step | Tool | Action | Optional Action | Example |
1 | Java SE | Launch installer | Customize directory | u:\dev\java\jse\jdk7 |
2 | JBoss | - Extract JBoss - Set the JBOSS_HOME - From <JBOSS_HOME>\bin launch either the domain or standalone script | Customize directory | u:\dev\java\srv\jboss7 |
3 | MySQL | Launch installer | Customize directory | u:\dev\db\mysql -dddd |
Customize installation options | Developer Default, Connector/J 5.15.0, Developer Machine, Enable TCP/IP Networking | |||
4 | MySQL | - Launch MySQL Workbench - Double-click "Local instance MySQL55" to connect to the DB - Create database called EJB3 | ||
5 | MySQL Connector/J | - Unzip - Create dir <JBOSS_HOME>\modules\com\mysql\main if not exists - Copy the MySQL Connector/J jar file into this directory | ||
6 | JBoss | - Create file <JBOSS_HOME>\modules\com\mysql\main\module.xml (see Notes below) - Edit <JBOSS_HOME>\domain\configuration\domain.xml and/or <JBOSS_HOME>\standalone\configuration\standalone.xml (see Notes below) | ||
7 | Eclipse | - Extract Eclipse - Launch Eclipse - Install JBoss Tools from Eclipse - In Eclipse, add the Server View - From the Server View, add JBoss AS 7 - From the Server View, launch JBoss AS 7 - Check JBoss in running going to http://localhost:8080/ (change port if customized) | Customize directory | u:\dev\java\ide\eclipse\jee-indigo |
Notes on JBoss AS 7
- JBoss Administration Console: http://localhost:8080/console (change port if customized)
- Require JSE 6 (1.6.0) min or higher.
- Before launching the domain or standalone scripts, ensure the port 8080 is not already in used. If already in use, change the ports in uses editing:
If domain: <JBOSS_OME>\domain\configuration\ domain.xml and in host.xml if needed.
If standalone: U:\srv\jboss7\standalone\configuration\standalone.xml
And restart either the domain or standalone script. - JBoss domain is a new addition to JBoss AS 7.
- See also:
Getting Started Developing Application Guide
User Guide
Videos (part 1, part 2)
JBoss docs
Note installing MySQL/J Connector
- modules.xml
<module name="com.mysql" xmlns="urn:jboss:module:1.0"> <resources> <resource-root path="mysql-connector-java-5.1.17-bin.jar"> </resource-root></resources> <dependencies> <module name="javax.api"> </module></dependencies> </module>
- <JBOSS_HOME>\standalone\configuration\standalone.xml and/or <JBOSS_HOME>\domain\configuration\domain.xmlLocate the <datasources> .. </datasources> section. Replace with:
<datasources> <datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS"> <connection-url>jdbc:mysql://localhost:3307/EJB3</connection-url> <driver>com.mysql</driver> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </pool> <security> <user-name>test</user-name> <password>test</password> </security> <statement> <prepared-statement-cache-size>32</prepared-statement-cache-size> </statement> </datasource> <drivers> <driver name="com.mysql" module="com.mysql"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
- See also: Installing the JDBC Driver on the JBoss doc in case of problem
FAQs
- JBoss AS: Which version: Web Profile Only (Java EE6 Certified) or Everything (NOT Java EE6 Certified) ?
See: Java EE6 Specs - Web Profile and JBoss Comparison Table.
Alternatives Open Sources Recommended Tools for Developpers
Category | Tool | Description |
JEE Server | OpenEJB | Embeddable and lightweight. Can be used as a standalone server or embedded into Tomcat, JUnit, TestNG, Eclipse, IntelliJ, Maven, Ant, and any IDE or application. |
GlassFish | GlassFish is a Java EE open source application server. Also for Production environments. | |
Database | HSQLDB | Open source relational database implemented entirely in Java. |
Apache Derby | Open source relational database implemented entirely in Java. | |
Oracle APEX | Oracle Application Express (Oracle APEX) is a rapid web application development tool for the Oracle database. Using only a web browser and limited programming experience, you can develop and deploy professional applications that are both fast and secure. |
Others JEE Applications Servers for Development and/or Production Environment
See also: JEE 6 - Applications Servers
No comments:
Post a Comment