java-ee-6

Alternative ways to configure security constraints with container managed security outside web.xml?

Hi, if you use Java EE 6 container managed security, you can configure security constraints for resources inside the web.xml deployment descriptor. Are there alternative ways to do this? For example the container could fetch them out of a database, like it does with the user data. Is something like this possible? I would like a way th...

Best way for user authentication on JavaEE 6 using JSF 2.0?

I'm wondering what the current state of art recommendation is regarding user authentication for a web application making use of JSF 2.0 (and if any components do exist) and JEE6 core mechanisms (login/check permissions/logouts) with user information hold in a JPA entity. The Sun tutorial is a bit sparse on this (only handles servlets). ...

jar file for JPA 2.0

import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; I've created a JPA project where I try to user the above classes but I'm unable to find what jar I'm missing for them. Please guide me. ...

Differences between Java EE 6 CDI Implementations

I've looked at JBoss' Weld Reference Implementation of JSR-299 Contexts and Dependency Injection, and I wanted to know how others CDI implementations compare to each other. Specifically, I know about Weld, Resin CanDI (by Caucho), and Apache OpenWebBeans. ...

What do I need to realize notification using JMS?

I just need notification system. javax.jms.* - good solution I think, but I can't understand what do I need to use JMS? I don't want to use any app. servers like GlassFish or Tomcat, I just would like to use standard jdk and myserver(very light) and myclient(very light too) and some MessageSystem to exchanging bitween myserver and myclie...

Where can i find a list of all the reference implementations for JEE6 ?

Do you know if there is a list with all the reference implementation for every component of JEE6? I.e. Glassfish is the reference container, Hibernate Validator for validation, etc. ...

how to instantiate more then one CDI/Weld bean for one class ?

In Spring it was possible to instantiate any class by defining the corresponding bean in xml conf. It was also possible to instantiate more then one bean for the same class with different parameters..... Are the such features in CDI as well, namely is it possible to create different instances of the same class with different initializ...

With JavaEE6, do we still need Spring, Hibernate or other frameworks?

Question as stated on title. Thank you. ...

How to inject a Session Bean into a Message Driven Bean?

I'm reasonably new to JEE, so this might be stupid.. bear with me pls :D I would like to inject a stateless session bean into a message-driven bean. Basically, the MDB gets a JMS message, then uses a session bean to perform the work. The session bean holds the business logic. Here's my Session Bean: @Stateless public class TestBean im...

EJB3 Remote vs Webservices, performances?

Hello I'm planning to a webapp where every guy using it would have a client that would run computations on its computer (because these computations can't be done on the server, too much load...), and then send results to the server. I guess there will be lot of people interested in my application and that's why i'm wonder if my archite...

JEE6 vs. Spring 3 stack

I'm starting a new project now. I have to choose technologies. I need something light, so no EJB or Seam. On the other hand I need JPA (Hibernate or alternative) and JSF with IceFaces. Do you think that such a stack on Spring 3 deployed on Tomcat is a good choice? Or a JEE6 web application could be better? I'm afraid that JEE6 is a new t...

How to use 3rd party libraries in glassfish?

I need to connect to a MongoDB instance from my EJB3 application, running on glassfish 3.0.1. The Mongo project provides a set of drivers, and I'm able to use them in a standalone Java application. How would I use them in a JEE application? Or maybe better phrasing: how would I make a 3rd party library available to my application when i...

Maven2 multi-module ejb 3.1 project - deployment error

The problem is taht I get the following error qhile deploying my project to Glassfish: java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging But, let us start on how the project structure looks like in Maven2... I've build the following scenario: ...

How to use EJB 3.1 DI in Servlet ? (Could not inject session bean by @EJB from web application)

I am tying to merging web application(gwt, jpa) to an separate 2 application(business login in ejb/jpa and web client in gwt). Currently i can`t inject my beans from web application (simple servlet) I am using glassfish v3. module limbo(ejb jar) is in dependency of module lust (war). If I use lust with compiler output of limbo everythi...

Dependency Injection with @Inject in Weld (JSR-299 RI). How is the corresponding @Produces found?

I have played with the JSR-299 Reference Implementation "Weld" with the purpose of using it in a stand-alone application, and I have had a look at the documentation, and marveled at the magic. My question is how the producer of a given object to be @Inject'ed is found? Either the java compiler produces hints for annotations which is ea...

Cost of creating exception compared to cost of logging it

Hello, Just wonder how much cost to raise a java exception (or to call native fillInStackTrace() of Throwable) compared to what it cost to log it with log4j (in a file, with production hard drive)... Asking myself, when exceptions are raised, does it worth to often log them even if they are not necessary significant... (i work in a hig...

(Enterprise GlassFish v3 build 11) Communication link problem (MySQL DB)

I get a communication link failure while application tries to establish a connection with DB. [#|2010-04-08T20:09:57.825+0300|SEVERE|glassfish3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=24;_ThreadName=Thread-1;|Cannot connect to database server = com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: ...

How to model in J2EE / JEE?

Let's say, I have decided to go with J(2)EE stack for my enterprise application. Now, for domain modelling (or: for designing the M of MVC), which APIs can I safely assume and use, and which I should stay away from... say, via a layer of abstraction? For example, Should I go ahead and litter my Model with calls to Hibernate/JPA API...

Communication between EJB3 Instances (JEE inter-bean communication) possible?

I'm designing a part of a JEE6 application, consisting of EJB3 beans. Part of the requirements are multiple parallel (say a few hundred) long running (over days) database hunts. Individual hunts have different search parameters (start time, end time, query filter). Parameters may get changed over time. Currently I'm thinking of the foll...

EJB3 + JEE6: What is a persistent Timer?

I'm just about to use the new EJB3 TimerService (as part of Java EE 6), and as usual, I'm impressed by the brevity of JavaDoc :) Do you know what is the effect of the persistent property of the TimerConfig object? JavaDoc TimerConfig says: The persistent property determines whether the corresponding timer has a lifetime that spans the ...