[JBoss] JBoss AS7 | EAP6 + Seam 3 + Maven 3 on Fedora 16
April 6, 2012

Dear *,
Recently I looked for Seam 3 applications running into JBoss AS7 (foretaste purpose) or EAP 6 (Professional use purpose).
So I uncompressed the following packages into a temporary directory (Test purpose) of a common|standard user of the system :
- JBoss EAP6 Beta – Server which provides software applications with services such as security, data services, transaction support, load balancing, and management of large distributed systems. – -> Download Package
- JBoss AS7 – Server which provides software applications with services such as security, data services, transaction support, load balancing, and management of large distributed systems. -> Download Package
- Seam 3 – Seam is a powerful open source development platform for building rich Internet applications in Java. – -> Download Package
- Maven 3.0.3 -> well, if you are using Fedora or RHEL, be root on your system and run “yum install maven”. If not, then go to http://maven.apache.org to install the application
Then I set the JBOSS_HOME directory with the path of my application server – Here I chose to use JBoss EAP6 Beta : export JBOSS_HOME=/home/user/jboss-eap-6.0 (you can set it definitively in the maven settings.xml file or in you local profile).
I ran the JBoss EAP6 Beta Application Server in standalone mode with the following command :
jboss-eap-6.0/bin/standalone.sh
I opened the seam-3.1.0.Final/examples directories to set the following stanza in the pom.xml file :
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.1.1.Final</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Finally, I choose one of the Seam 3 examples, went to the corresponding directory and I compiled and deployed it to the running JBoss EAP6 Beta application server with the following commands :
cd seam-3.1.0.Final/examples/seam-booking
mvn package jboss-as:deploy
and then went to the following URL : http://localhost:8080/seam-booking

Ref : https://docs.jboss.org/jbossas/7/plugins/maven/latest/index.html
BR
Frederic
[FOSDEM'12] Definitive JBoss.org Schedule
January 12, 2012
Here is the definitive JBoss.org schedule for FOSDEM’12 :
Saturday 2012-02-04
Ref : http://www.fosdem.org/2012/schedule/track/jbossorg_devroom
BR
Frederic
[JBoss.org AS7] Presentation in February 2012. – Belgium
January 4, 2012
I am going to do a presentation about “JBoss.org AS7” in Brussels in February 2012.
If your company or you are based in BeNeLux and are interested by this presentation, just let me know and I will try to arrange a Meeting for you.
Ref : http://www.jboss.org/jbossas
BR
Frederic
[JBoss.org AS7] Datasource configuration with Postgresql.
January 2, 2012
Well, recently I tried to make my application work on JBoss.org AS7.
Just to check if I should have to do some code modifications in my application when JBoss.com EAP 6 will be released.
FYI, you can download freely JBoss.org AS7 at the following URL - http://www.jboss.org/jbossas – however as it is a community project you will not have any support with SLA.
In case of you would need one(s) then I would suggest you to subscribe to JBoss EAP Solutions – http://www.jboss.com/ -
So, one of my main targets was to make AS7 work with Postgresql as its underlying database.
1] I wanted to use an updated Postgresql JDBC then I had to download it from the JDBC Postgresql website - http://jdbc.postgresql.org/download.html -
I used postgresql-9.1-901.jdbc4.jar
2] I had to create dedicated directories and files inside the JBoss.org AS7 directory.
jboss-as-7.0.2.Final/modules/org/postgres/main
Then, to upload the postgresql-9.1-901.jdbc4.jar in the following path : jboss-as-7.0.2.Final/modules/org/postgres/main
And then to create specific xml file named : module.xml with the following content :
<module xmlns="urn:jboss:module:1.0" name="org.postgres"> <resources> <resource-root path="postgresql-9.1-901.jdbc4.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies></module>jboss-as-7.0.2.Final/modules/org/postgres/main path you should retrieved the following files :> postgresql-9.1-901.jdbc4.jar – Postgresql JDBC4 driver.
> postgresql-9.1-901.jdbc4.jar.index – Index file generated by JBoss. That file should automatically created by the JBoss instance as soon as the Postgresql JDBC Driver will be discover by the instance.
> module.xml – Module Description
4] Then, I had to add a Posgresql node in the following section of the jboss-as-7.0.2.Final/standalone/configuration/standalone.xml file.
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
</connection-url>
<driver>
h2
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
sa
</user-name>
<password>
sa
</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/PostgresqlDS" pool-name="java:jboss/datasources/PostgresqlDS_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:postgresql://localhost:5432/mydb
</connection-url>
<driver>
postgresql
</driver>
<security>
<user-name>
myuser
</user-name>
<password>
mypassword
</password>
</security>
</datasource> <drivers> <driver name="postgresql" module="org.postgres"> <xa-datasource-class> org.postgresql.xa.PGXADataSource </xa-datasource-class> </driver> <driver name="h2" module="com.h2database.h2"> <xa-datasource-class> org.h2.jdbcx.JdbcDataSource </xa-datasource-class> </driver> </drivers></datasources></subsystem>5] You can check in the JBoss Administration Console your JDBC connection is rcognized – http://localhost:9990/console/App.html#server/datasources
You should see a green light if everything is OK.
6] Finally, do not forget to change the persistence -persistence.xml – file of your application to check your application works with the new Posgresql datasource.
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="astroDatabase">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/PostgresqlDS</jta-data-source>
<class>com.hornain.as.astro.Users</class>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="false"/>
<property name="hibernate.use_sql_comments" value="false"/>
</properties>
</persistence-unit>
</persistence>
Ref #1 : http://community.jboss.org/wiki/JBossAS7-DatasourceConfigurationForPostgresql
Ref #2 : http://community.jboss.org/thread/168958
Best Regards
Frederic
[FOSDEM'12] JBoss.org Schedule – DRAFT 2
December 29, 2011
Yesterday, I received a confirmation from the FOSDEM team this year -2012- the opening/closing schedule for devrooms on Saturday will start at 11:00AM and end at at 19:00PM.
The thing is I planned to start session from 13:00PM.
So that means I have still 2 free other one hour -55mins- sessions available.
Well, as I mentioned in one of my previous post I would like to use them to talk about HornetQ and Gatein/BoxGrider.
So If you are from these communities and want to submit your talk then feel free to contact me.
Anyway, here are the already the confirmed talks :
-> JBoss AS7 in the Cloud [ OpenShift ] – http://www.jboss.org/openshift
-> Drools Planner - http://www.jboss.org/drools/drools-planner.html
-> Infinispan – http://www.jboss.org/infinispan
-> RHQ – http://www.jboss.org/jopr
-> jBPM/designer and Guvnor. -http://www.jboss.org/jbpm & http://www.jboss.org/guvnor
-> JBoss Forge and Arquillian.-https://docs.jboss.org/author/display/FORGE/Home & http://www.jboss.org/arquillian
BR
Frederic



