Digital Marketing

Differences between Glassfish and WildFly

Datasource

The JNDI name is used by the application to reference the datasource. That’s a fundamental difference between GlassFish and WildFly. GlassFish's JNDI name may look like jdbc/myds, but in WildFly you need to append the prefix java:/, resulting in java:/jdbc/myds. They appears in configuration file, persistence.xml and @Resource annotations

JavaMail Session

Glassfish: mail/myApp
WildFly: java:/mail/myApp

They appears in configuration file and @Resource annotations.

Security Realm

If you use a database as a security repository, in GlassFish it is called JDBCRealm, which is pretty restrictive. It requires you to provide a fixed database model. In WildFly, it is more flexible, you can actually specify a SQL query that finds in the database what the security domain needs to authenticate and to authorize users.

The role-group mapping you have in the file WEB-INF/glassfish-web.xml is corresponding to
WEB-INF/jboss-web.xml.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>appdomain</security-domain>
</jboss-web>

appdomain is the name of the security domain. the file appdomain.properties locates in the folder WILDFLY_HOME/standalone/configuration or WILDFLY_HOME/domain/configuration.

JPA implementation

GlassFish: EclipseLink
WildFly: Hibernate
Your code should reference classes from the package javax.persistence.* instead of such as org.eclipse.persistence.* for implementation independent.

Rigorous tests are necessary for migrating.

Comments

Popular posts from this blog

Make online money from the Internet