Tagged Questions
0
votes
1answer
39 views
JAVA EE 7 WebSocket implementation
In nodejs socket.io uses a single socket connection for all modules, does this apply to the java websocket implementation?
for example
should i make multiple ServerEndPoints
@ServerEndpoint("/ws1")
...
-2
votes
0answers
39 views
Big data hadoop key skills [on hold]
My main skills have been core java, c, c++. I want to know what skills would one need to shift career into Hadoop (and associated ecosystem projects)? Do we need to be expert in Java EE or good, ...
0
votes
1answer
11 views
How to configure Eclipselink nosql JPA implementation with mongodb nosql database?
I want to use JPA to create an entity class that can be used with the persistence context to access my db2 nosql database. The problem is the @NoSql annotation is not being found.
As per ...
0
votes
0answers
66 views
java.lang.ClassNotFoundException: com.sun.corba.ee.impl.orb.ORBSingleton while using JDK 8 in Java EE 7 applications
I have an enterprise application running in the following environment.
Mojarra 2.2.6
PrimeFaces 5.0 final
PrimeFaces Extension 2.0 final
OmniFaces 1.8.1
EclipseLink 2.5.1 having JPA 2.1
GlashFish ...
0
votes
1answer
24 views
Confusion after installation of JDK 1.7 and Java EE 7 SDK?
I am just starting with the Oracle Java EE 7 tutorial. While I have already gained some practice with an existing Apache Tomcat Environment I wanted to get in touch with the complete tutorial to have ...
0
votes
1answer
45 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
36 views
Unexpected token “?” during JPA query?
I'm attempting to query a list of Api keys in my db2 database.
The problem is that the actual query JPA comes up with has an extra comparison field that is causing a syntax error.
The error:
[ERROR ...
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 ...
0
votes
1answer
48 views
“Needs to be compiled” badge on static metamodel classes in JPA 2.1
Given the following environment to run an enterprise application in Java EE 7.
GlassFish Server 4.0
NetBeans IDE 8.0
JDK 1.7
EclipseLink 2.5.1 having JPA 2.1
EclipseLink Metamodel Generator provided ...
0
votes
0answers
69 views
CDI Injection and Java Batch (JSR-352)
TLDR: CDI isn't behaving as I would expect after migrating a web profile sample to a full blown EE application
Let me start off by saying that I'm relatively new to CDI. I like to think that I ...
0
votes
1answer
45 views
POST using JAX-RS 2.00 client API
I have a REST Service which exposes a POST service using Form Parameters:
@POST
@Path("/add")
@Produces("text/html")
public Response create(@FormParam("key")String key,
...
2
votes
0answers
39 views
Servletrequest returns null sessions
I am getting a strange error where the session I get from the request is sometimes null. Code looks like this:
@Stateless
@Path("/login")
public class GetLogin {
@Context
private ...
0
votes
0answers
11 views
Content type for .jck file
What will be the content-type to send a KeyStore file of (".jck") with HttpServletResponse.
I am using content-type : application/octet-stream
But file gets corrupted
4
votes
0answers
499 views
Supported source version RELEASE_6 from annotation processor org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor less than source1.7
I have an enterprise application running in the following environment.
Mojarra 2.2.6
PrimeFaces 5.0 final
PrimeFaces Extension 2.0 final
OmniFaces 1.7
EclipseLink 2.5.1 having JPA 2.1
GlashFish 4.0
...
-2
votes
2answers
87 views
Choose appropriate UI technology in Java EE application [closed]
There are several approaches to choose from when creating new Java EE 7 application.
JSP
JSF (Facelets)
plain HTML 5 + JavaScript
???
The question is - please, show the conditions when it is ...
0
votes
2answers
93 views
Java EE 7 updatetool installation fails
I have tried to install Java EE 7 with updatetool to be able to run Java EE Tutorial examples.
But the installation of updatetool fails. I have tried to start updatetool installation from the command ...
0
votes
1answer
55 views
How to inject an EJB from another ejb file in a same application?
I am learning JavaEE 7 recently. I have a problem when I try to inject an ejb from a separate jar file.
My code is like
@Stateless
public class HelloService {
public String hello(String name) ...
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
1answer
33 views
Java annotations: dynamically build array based on annotated fields
I have to @Override an abstract function and offer an array of strings (defining searchable fields for my datatable):
@Override
public String[] getQueryFields() {
return new String[] { "email", ...
0
votes
1answer
146 views
Exception Handling With Java EE 7 JAX-RS2 And Bean Validation 1.1
What is the way to handle exceptions that get thrown when using Bean Validation 1.1 with JAX-RS-2 and Java-EE 7 (JBoss Wildfly)
I can't find any clear example/documentation that shows how to handle ...
2
votes
1answer
47 views
Does a Java EE container automatically close an injected EntityManagerFactory?
Say that I have this code in a @Stateless Enterprise JavaBean:
@PersistenceUnit
EntityManagerFactory emf;
Will the Java EE container automatically close my EntityManagerFactory sooner or later?
...
-4
votes
3answers
218 views
check user name avialability using jsp and mysql [closed]
For my web application i have a text field for username i need to check username availability from mysql database and should display status below the text field as available or unavailable..
i have ...
0
votes
0answers
37 views
Batchlet Read return value
I'm writing a Batch Job using Java EE 7 API. This Job contains a set of Batchlets. I can see that the Batchlet is able to return a value at the end of process():
@Named
public class MyBatchlet ...
0
votes
1answer
134 views
Create JsonArray from List
I'd need to create a javax.json.JsonArray object (Java EE 7 API) from a java.util.List of JsonObjects.
Formerly, when using JSON API I used to do it simply with:
JSONArray jsonArray = new ...
0
votes
1answer
71 views
Is @Singleton Session bean the correct place to manage objects across different sessions?
I am still learning about appropriate Java EE patterns and would appreciate advice on the best tools to use for this problem.
I have a system that needs to manage a number of instances of intelligent ...
0
votes
1answer
68 views
Message-driven bean outputs only one value
Im new to java message-driven beans and i have a little problem. I made a test web project(server is glassfish 4.0).
In messageclient, i'm sending 3 Strings to message queue. If i understand ...
4
votes
3answers
109 views
JSR-356: How to abort a websocket connection during the handshake?
I need to be able to abort a websocket connection during the handshake in case the HTTP request does not meet certain criteria. From what I understand, the proper place to do that is inside the ...
1
vote
1answer
208 views
Quartz vs Java EE 7 scheduler
I'm a java EE developer which has used until now frameworks like Quartz to schedule tasks. I can see that Java EE 7 features a ManagedScheduledExecutorService to schedule single or repeating tasks. ...
5
votes
1answer
86 views
What happens when stateful bean is destroyed during @Asynchronous method call?
I have a stateful EJB with a transactional @Asynchronous method returning Future<T>. It's being called from web-tier (@SessionScoped CDI bean) as shown below:
@SessionScoped
@Named
public class ...
0
votes
3answers
34 views
Hashtable “Unresolved compilation” in java
this is my class
package main;
import java.util.Hashtable;
public class Information {
private final static String name = "Info Name";
private final static String direccion = "direction ...
1
vote
2answers
2k views
EJB Container initialization error, Error while binding JNDI name *** for EJB ***
I am new to Java and I developed a sample Java EE application that works with normal Java client, but it does not work with Servlets. I developed EE project in Netbeans IDE with an Application Client, ...
0
votes
1answer
226 views
OpenEJB and JEE7
Does anybody knows if or when OpenEJB is going to support JEE7? I am trying to use JMS 2.0 with OpenEJB 4.6.0 but got an InitializationException at the startup of the container.
I know that I could ...
0
votes
1answer
115 views
JSP flush buffer confusion
If i have the below code:
<%
out.write("This will print!<br/>");
out.flush();
out.write("This will also print!<br/>");
out.flush(); <-- Should fail.
out.write("This will get ...
1
vote
2answers
594 views
Nested Transaction and EJBContext's setRollbackOnly()
I am reading the Transaction Management of Java EE 7 and I get confused by the concept of nested transaction and the functionality of EJBContext#setRollbackOnly().
Say I have two Session Beans, ...
0
votes
0answers
74 views
JMS + security realm in Jave EE 7 / Glassfish v4
We have a jms queue in a jee 7 application running on glassfish v4.
At the moment, an MDB is reading from the queue.
Is it possible to secure this queue with the application's security realm and be ...
0
votes
1answer
198 views
Circular Json serializing
i have a javaEE application with two entities which gets persistet in a database. both entities have a bi-directional association.
First Entity:
@Entity
...
1
vote
1answer
505 views
Mapping WebSocketEndpoints in a web.xml file
I am trying to develop a Java EE 7 web application that uses a websocket endpoint and deploy it on a Jetty server.
The application has the following structure:
Game/
src/
main/
java/
...
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 ...
5
votes
1answer
213 views
CDI + managed concurrency in Java EE 7
I'm implementing an application-scoped service (to be further injected into JAX-RS/JAX-WS service or a servlet, does not matter) which would spawn some processing via ManagedExecutorService or ...
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
696 views
How to create Java web application using Struts and GlassFish?
I can not find any resources on how to create a simple (Hello World) web application using Struts and GlassFish in Eclipse. The best thing I found was this. They are however not using GlassFish, and ...
0
votes
1answer
157 views
jax-rs service RolesAllowed Annotation throwing exception
I have following jax-rs Restful API which works fine if I won't add following Annotation line
@RolesAllowed("AdminRole")
above GET Annotation
package service;
import entities.Booking;
import ...
1
vote
0answers
97 views
Using a secured EJB from a JAX-RS web service
I'm running Glassfish 4 and Jersey as JAX-RS implementation. I have secured my EJB like this:
@Stateless
@DeclareRoles({"Authentication_Reader"})
@RolesAllowed({"Authentication_Reader"})
public ...
1
vote
0answers
222 views
Cant get Spring Data JPA + CDI on Java EE 7 stack
Im trying to get Spring data JPA to work with EJB and CDI (Java EE 7).
Well, I followed the documentation ...
0
votes
1answer
458 views
JSF h:messages render global message is not rerendered
I'm trying to display global error messages which are sent from EJB with:
FacesContext.getCurrentInstance().addMessage(
null,
new ...
2
votes
1answer
76 views
Migrating from Java/EE5 to EE7
I'm currently trying to migrate a large EE5 application to EE7, but I'm pretty unluckily in finding good documentation to do this step WITHOUT porting to EE6 first.
My question is: is there a ...
0
votes
0answers
52 views
glassfish some images in WebContent are not avaible
I have a web application on my glassfish 4.0 server. In /WebContent/resources/images/scaner/ there is few jpg files. In bean ScanerMonitor I have method:
public ArrayList<String> getAllImages() ...