java-ee

shared ejb 3 for multiple web project with glassfish

Hi all, I currently have a J2EE project containing an EJB and a WAR. Everything goes fine while I have only one WAR and one EJB module bundled in the final EAR. I now need to develop an other WAR using the same EJB module. So, I added the EJB module in the library of the new WAR. The problem is when I try to deploy the EAR bundled with...

CDI: Using Interceptors across different modules / bean archives

My Java EE 6 application consists of a war and an ejb module packaged in ear file. I'm using CDI for DI (i.e. I have a beans.xml file in both modules). I want to use a logging interceptor that is defined in the ejb module in the war module, as well. I've enabled the interceptor in the ejb's beans.xml: <beans> <interceptors> ...

Tomcat - Set working directory when not running as a service

I'm trying to get my web app to recognize my working directory. When running as a windows service, I can set --StartPath=C:\Path\To\Directory\ and using that I can access files starting from that directory. ie - Folder\Folder2\file.txt can be opened and recognized as being C:\Path\To\Directory\Folder\Folder2\file.txt I thought ...

A fresh graduate confused by the Java EE jargon Spring, Struts, JSF, EJB, Jboss, JMS,

As we all know that we rarely get a chance to learn whats out there in the enterprise world when it comes to college. In my experience I have always seen people learning Core Java and may be some other languages and when they graduate they have no Idea about this enterprise jargon. I am in that boat now. I am a recent graduate with a pr...

Doing AJAX with JSF 2.0 without using action listeners

I'm new to JSF. I am using JSF 2.0. I'd like to be able to use scripts that use ajax in a classical way, not going through JSF's f:ajax tag. However, I know that it's easy to mess up with the application's state if you go around JSF features too much. Has anyone done this before? Any ideas on how it should be done? Suggestions and exi...

JPA 2 (EclipseLink) Trying to use UUID as primary key EntityManager.find() always throws exception (Database is PostgreSQL)

I'm trying to use a UUID for a primary key using JPA 2 (EclipseLink). I'm using PostgreSQL as the database. I have my entity declared as follows: I have an Employee table with its PK set as a UUID. I have a JPA Entity mapping to the employee table, which looks like this: @Entity public class Employee { @Id private String id; ...

Java EE: how to share a secret (password) between instances of a (GlassFish) cluster

I have an environment with a GlassFish cluster. Each instance must have access to a password string that must not be stored on the instances. Thus it has to be entered upon instance startup by an administrator. Once entered on one instance other servers in the cluster should be able to gain access to this value automatically so that it o...

opensource javaEE project for learning

I have been learning javaEE and MVC pattern for a while from books and tutorials. but I wish to see how is coded a real world JavaEE projects. by real world project I mean a full application which is using by other people. maybe an opensource project like an e-commerce, a forum or a cms, I know many for php but none for javaEE. will be...