How to run glassfish 4 on port 80 instead of 8080? root access is not an issue

To run GlassFish on port 80 you need to : Connect to the administration interface (by default on port :4848) In the left menu go to Configurations Then select the appropriate configuration you need to change eg server-config Then go to Network Config Then go to Network Listeners Select the appropriate listener, probably http-listener-1 Change … Read more

PermGen space error – Glassfish Server

To solve this problem ( in linux based os ) do following 1) increase memory (so that this problem don’t come frequently ) by configuring “domain.xml” in /glassfish/domain/domain1/config search for <jvm-options>-XX:MaxPermSize= set it to higher value eg- 198m or 256m 2) kill the glassfish process to free the port on which it was running ( … Read more

Jersey Grizzly REST service not visible outside localhost

To make a server IP adress visible outside of localhost, you must fist open the neccessary firewall ports(if you have one), or use “0.0.0.0” instead of “localhost” in order for the server to listen to all IP addresses and network adapters. Before testing it in your local network, try pinging your server device from your … Read more

Which Maven GlassFish plugin to use?

Update: CARGO-491 has been fixed and I’ve updated my answer accordingly. To summarize, there are now basically three options: Maven GlassFish Plugin A first option would be to use the Maven GlassFish Plugin. This plugin allows to interact with a local or remote GlassFish install and the management of Glassfish domains and component deployments from … Read more

Sharing a persistence unit across components in a .ear file

Here are the relevant sections of the JPA 2.0 specification: 8.2 Persistence Unit Packaging … A persistence unit is defined by a persistence.xml file. The jar file or directory whose META-INF directory contains the persistence.xml file is termed the root of the persistence unit. In Java EE environments, the root of a persistence unit must … Read more

How to prevent eclipse from deploying test classes on Tomcat?

It is configurable in Eclipse how to handle and deploy the different folders, somehow the Eclipse plugin M2Eclipse should configure Eclipse right, it seams that the configuration sometimes is done and sometimes not. So one has to check this two settings: Project Properties\Java Build Path(Tab)Source : Outputfolder for <PROJECT>/src/test/java as well as <PROJECT>/src/test/resources must be … Read more

Default EJB transaction mode for asynchronous methods?

Similar to an MDB the transaction is started by the container just before your @Asynchronous, @Schedule or @Timeout method (and applicable interceptors) is actually invoked and committed just after the method (and interceptors) completes. As per usual, the transaction propagates to all beans called in said method and all beans those beans call, recursively. Of … Read more

glassfish v3 vs tomcat 7 [closed]

I don’t recommend any particular one. If you want just JSP/Servlet support, both suffices. If you want more than that (e.g. anything provided by the Java EE API which is much more than alone JSP/Servlet), then Tomcat simply don’t suffice without manually adding a bunch of components on top of that to comply the complete … Read more