0
votes
1answer
44 views

Service layer and dao layer in java ee EJBs

Question: Can anyone, in context to Java EE and EJBs, show a specific DAO class (or more than one) that has two different methods. and a service class that calls those 2 methods in ONE transactional ...
0
votes
1answer
19 views

spring mvc controller equivallent javaee controller

I used spring. Is there an equivalent controller strategy for pure plain java-ee 6/7? Like there is spring controllers which take care of path params, request params, return types, redirecting, ...
0
votes
0answers
17 views

RequestParams and PathParams in pure JavaEE controller servlet

for a @webservlet annotated servlet, how can I do something similar to spring mvc: @Path = my/custome/path/{id} and then use the id in the servlet code? or do @requestParam (for post) ? and ...
4
votes
0answers
72 views

mvc pattern in java ee and migrating from spring to java ee 7

I used spring MVC in the following manner: @Controller class MyControllerClass { @RequestMapping... method(){ ServiceCall()... //put something to modelAndView object here ...
1
vote
0answers
42 views

Async Servlet - preferred implementation

Lately, during my research about asynchronous processing in Servlets, I came across at at least three ways to implement some functionality using this approach. The questions are: Which one is the ...
0
votes
1answer
71 views

Running Java EE 7 on Tomcat 7 in Netbeans

I'm not able to run a Java EE 7 webapp on tomcat 7 while in Eclipse using the same tomcat server it works. I can find my tomcat 7 server if I change the following in my pom.xml: ...
0
votes
1answer
45 views

In Home Page when we navigate to another page and come back to home there is an error returning the username

Hello i am developing a web Application.. Where on login the user will be redirected to his respected login page with a welcome text as WElCOME Username.. But when the user navigates to some other ...
0
votes
0answers
120 views

Custom Login Module and HttpServletRequest.authenticate(HttpServletResponse response) method

I have created custom Login module based on this tutorial. But I have one problem: How can I force container to use this custom Login module in HttpServletRequest.authenticate(HttpServletResponse ...
1
vote
0answers
25 views

Unable to view the jaxrs restful webservice

I am new to jaxrs , i followed this http://www.youtube.com/watch?v=-Aec0KEDdzE tutorial for creating and deploying a restful web application and i also created a entity class and created a restful web ...
0
votes
1answer
61 views

What happened to DigestRealmBase in Glassfish 4.0?

I successfully integrated my custom security realm in Glassfish 3.1.2.2 and it worked just fine. Now I am trying to port my project from GF3 to the newly released Glassfish 4.0. But I now get the ...
2
votes
3answers
344 views

Custom Security mechanism in Java EE 6/7 application

I would like to create (implement by my own) authentication mechanism which will be plugged into my Java EE application. As far as I know I have to implement LoginModule and connect this ...
3
votes
1answer
226 views

Is it safe to inject @Resource UserTransaction to EJB Singleton bean

Q1: I am writing an EJB Singleton bean that use BMT so I need to use UserTransaction in my bean. I was wondering that IS IT SAFE to inject @Resource UserTransaction to my EJB singleton bean. I don't ...
2
votes
0answers
258 views

CDI JPA - DAO pattern without EJB

I am writing a CDI-JPA DAO pattern that not using EJB because I am using Tomcat. Here is my code: @ApplicationScoped public class UserDao { @PersistenceContext(unitName = "unitName1") ...
0
votes
4answers
155 views

can't retreive data from database

Thank you for your help in advance. Problem was: Can't get just inserted data from the table. From the error message it looks like it doesn't see the first column. I know the column is there and data ...
1
vote
1answer
116 views

Java EE 6 / 7 equivalent for Spring @Configuration

Is there a Java EE 6 / 7 equivalent annotation for Spring's @Configuration? If the answer is yes then are the equivalents for its surrounding annotations, such as @ComponentScan and @EnableWebMvc? I ...
2
votes
0answers
100 views

How to initialize and destroy Non-contextual CDI bean initialization PROPERLY

I have a Controller instance. This is NON contextual CDI bean. I want to inject CDI beans into my controller instance. I coded like this: MyController controller = myWayToCreateController(); ...
1
vote
1answer
120 views

javax:javaee-api-6.0 contains non-abstract classes with no method body

I am fairly new to Java EE and when I look into the compiled code (I could not find the source code for javax:javaee-api-6.0), I notice this class. package javax.servlet; import ...
1
vote
1answer
161 views

Java EE CDI, packaging and code readability, best practices

Recently I've started to migrate one of the ongoing Java EE projects towards more intensive usage of CDI concepts (events, producers, disposers, qualifiers, etc) and after a week of an intensive ...
0
votes
1answer
51 views

Packaging optional JPA entity classes

I was reading the following post to package JSF pages into jar files, which is great for including only those modules of a system that a client needs: Packaging Facelets pages in a JAR I'd like to do ...
0
votes
1answer
450 views

Glassfish Digest Authentication

i want to build RESTful webservices using JAX-RS (Jersey + Jackson, Jackson for production of JSON). I'm using Glassfish 4.0 as server and netbeans as the IDE. The webservices are working fine but ...
2
votes
1answer
904 views

How do I determine the Java EE version of JBoss AS 7.1

I'm using JBoss AS 7.1 and I need to determine the Java EE version that is provided. I'm pretty sure that it is Java EE 6. But how can I determine the version number and how can I switch to Java EE 7 ...
3
votes
2answers
4k views

WELD-001408 Unsatisfied dependencies for type [Validator]

I'm unable to deploy my project after migrating it from Java EE 6 to Java EE 7. I already have CDI enabled (beans.xml with bean-discovery-mode="all" for backwards compatibility) The deployment ...
0
votes
2answers
2k views

How do I upgrade an existing NetBeans Java EE 6 Web project to Java EE 7?

The project uses JavaServer Faces and JPA. NetBeans 7.3.1 IDE does not allow to change the Java EE version. I already found this question: How do I upgrade an existing enterprise project from Java ...
1
vote
1answer
1k views

Bean validation with EJB

I've been reading a lot about the Bean Validation API that accompanies Java EE 6+ and I understand the basics of how the validation api works, but in the documentation that I have been reading, all of ...
0
votes
2answers
274 views

How can a singleton Java EE bean obtain a reference to itself?

I have a singleton bean for which the @PostConstruct method needs to call an @Asynchronous method within itself. It cannot do so directly using this because that makes the call synchronous. I cannot ...
0
votes
1answer
711 views

Cannot Cancel @Asynchronous call to EJB

What am I doing wrong in this simplest of examples? (Glassfish 4.0-b87 + Eclipse Kepler m6) Myself.java package com.example.cancelbug; import java.util.concurrent.ExecutionException; import ...