0
votes
0answers
5 views

How to Do Java EE Container Security With MongoDB on Tomcat

I have used file realm and JDBC realm before to host the username and password combinations. I have not yet used MongoDB to perform the same function. I have read the Tomcat docs and searched around ...
1
vote
0answers
28 views

Spring environments difference

I keep on studing Spring, and find Spring environment comparison as a very obscure topic. It's very difficult (IMHO) to find something intelligible on the topic. I've got a vague understanding of ...
0
votes
1answer
21 views

Java MDB - How to keep track of number of messages processed

I have an MDB that processes different types of messages (Object Messages). I want to keep a track of the number of messages received by the MDB and as well as keep count of the type of the messages ...
2
votes
2answers
52 views

Spring container implementations

I keep on learning Spring and it is very difficult to figure out which implementation of ApplicationContext is intended for. I've standalone J2EE application and I don't interested in Web* or Portlet* ...
0
votes
1answer
20 views

how to get static connection object in case of pooling?

Iam unable to understand how to get connection in other classes (iam using connection pooling using DBCP) MyServlet //NOT A COmplete Code class MyServlet extends HttpServlet { public ...
0
votes
1answer
23 views

My servlet throws exception ResourceClosed

My servlet is contacted simultaneously by three devices that read the result. A strange thing happens: the first device displays the result, often the second, while the third device receives 500 ...
0
votes
2answers
20 views

Can't resolve javax.servlet.http

I used to create web application in eclipse and I never got this issue. import javax.servlet.http.HttpServletRequest; The import javax.servlet.http cannot be resolved I was working on a project ...
0
votes
1answer
20 views

Measure the size of Session Attribute Objects

I want to measure the size of an object (Serialized or not) when it is set to HttpSession. How can I do this ? Even some supporting questions found, it could not be used.. Any one know how I can do ...
0
votes
1answer
24 views

Exposing REST service as EJB 3.1 method

How to convert Restful WebService (RestEasy) to EJB 3.1 Stateless session bean In my current project we are using Restful Web Services (Resteasy) combined with Jpos and Jcard with an ISO-8583 message ...
0
votes
1answer
18 views

Accessing Java Web App from different machine using IP of server

I have deployed a web application (name: SDCS) on tomcat 6.0 server that compares image files from user-provided folder path. The application is working perfectly fine on the server and its able to ...
0
votes
0answers
12 views

Spring Interceptor in Alfresco for Search Service

I am developing interceptor for searchservice in alfresco, there is method named QUERY in there which is overloaded like below public ResultSet query(StoreRef store, String language, String query); ...
0
votes
2answers
17 views

Using stateful bean in EJB using Client

I am working on the project to achieve stateful session using EJB and JBOSS7.1 in eclipse. I came up with an exception while running the client code as javax.naming.NoInitialContextException: Need ...
1
vote
1answer
14 views

could not resolve all dependencies for configuration X could not find Z required by B > A

I've already solved this but i'm still curious as to why gradle behaves this way. In my gradle project i have 2 gradle projects, one named app that is configured with the ear plugin and one named ...
-1
votes
0answers
11 views

Pluggable application development [on hold]

We have an existing web system and looking forward to expose services for third party developers. The requirement is, developers can use these services to create their own application and plugin to ...
0
votes
3answers
25 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
1answer
25 views

merge vs find to update entities JPA

From the book Pro EJB3 JPA: The most common strategy to handle this (-update entities-) in Java EE application that uses JPA is to place the results of the changes into detached entity instances ...
-1
votes
0answers
12 views

How to hide getter from Jax-WS service?

How to hide the getters from my Jax-Ws Service.?? When i generated the stub its showing getters along with the setters. I want to hide the getter when am getting the request.
2
votes
2answers
30 views

Create an entity with two fields that are mutually exclusive

I would like to create an entity which has two fields that are mutually exclusive i.e. only one or the other of the two fields should contain a value. Is there an annotation I can use to achieve this ...
0
votes
1answer
34 views

Not Able to get the values static fields

I created a Java Project Name A, there I have a class X with some static fields. This class implements singleton pattern. Then I created simple web project W1, where I created one servlet S1. This ...
0
votes
0answers
5 views

integration test with openejb container and hibernate fails

I'm trying to write integration tests for my java ee 6 application. This works with open jpa and also with eclipselink. But is doesn't work with hibernate. I've created a minimal project on github to ...
0
votes
3answers
49 views

ClassCastException from exact same class

I'm running a database query and trying to cast the result to a Customer object, but I'm getting an error saying: java.lang.ClassCastException: Entities.Customer cannot be cast to Entities.Customer ...
0
votes
1answer
30 views

Apache Camel merge two files from different routes

Here's what I am trying to do. I have to read two files that has this content <Person> <Requestor>Dinesh</Requestor> </Person> To do this I created a route <route ...
0
votes
4answers
43 views

Login authentication - null pointer exception

I'm trying to validate user credentials using the following code, but I'm getting a null pointer exception every time the method is called: public class LoginValidator { private static ...
0
votes
0answers
24 views

Maven multi-modules dependencies

I'm creating an archetype for some JEE projects. My structure is like this : a(ear) |---b(pom) | |---b1(jar) | |---... | |---bn(jar | |---c |---d b is an 'empty' module keeping common ...
0
votes
2answers
20 views

Accessing database stored in persistence.xml

I want to access the database that I've set up in persistence.xml in Netbeans. I have some sample code that seems to use an EntityManager and UserTransaction to store a person object in the database, ...
0
votes
0answers
9 views

Glassfish 4.0 cluster + mod_jk. Servlet streaming content issue

I'm trying to set up a glassfish 4.0 cluster with 2 instances using Apache 2.2 with mod_jk for load balancing. Everything is working as expected, except for a servlet used to serve images. When I ...
0
votes
2answers
46 views

How MVC web application works in java? [on hold]

As we define view,controller,service and Dao layer in application then how data flow in between them. e.g. suppose we add struts,spring,hibernate,etc. jars in project then how they work together?
0
votes
1answer
29 views

How to wire the bean from xml into @Component?

I am trying to customize a PreAuthenticatedAuthenticationProvider class to extend the logic: @Component("superAuthenticaionProvider") public class SuperAuthenticaionProvider extends ...
0
votes
1answer
25 views

Using a timer for tracking user action in a Spring web application

I am developing a management application in Spring Hibernate wherein I need to implement a timer system. USE CASE User clicks on an activity or an event on the UI(jsp). The timer starts, it ...
0
votes
1answer
53 views

Java Serializable confuse [on hold]

Recently, our project has to be redesign. But when I use JAVA's interface Serializable, I spend a lot time. Now, there are two program:A and B. A is offline, it function is transform JSON data to ...
0
votes
1answer
16 views

Mutliple Roles within Secured REST Endpoint Internal Server Error

I have a RESTful webservice that I want to allow different roles on different endpoints. For example I have the following class with two method one for the admin role to access and one for the manager ...
0
votes
1answer
18 views

Extensible/adaptable Java EE application: interfaces vs interceptors and decorators

We are currently in the process of analyzing the technical requirements for a new version of a Java EE application. It's Java EE 6, but moving onto 7 is an option. Until now this was a single ...
0
votes
3answers
35 views

What is difference between @Entity and @embeddable

The difference between @entity and @embeddable annotation when each one is added before class declaration? the first create class as an entity, second insert column from another table? the first ...
0
votes
2answers
35 views

JPQL query for searching if a word/string is consisted in one of entity's fields

Basicaly, its similar like looking if certain word exists in sentence. There is entity Post: public class Post implements Serializable { @Id @GeneratedValue(strategy = IDENTITY) ...
0
votes
1answer
35 views

Database connection is closed in Jboss AS

I have an application that runs behind JBoss Application Server. The client handles database operations via server. EJB beans handle database operations using entity manager. After a time, I see that ...
1
vote
1answer
55 views

how to use different classes as an argument in a method

I am going to explain my problem so clear I can :) I use a webservice in a jar file. In this jar file there is different classes that I will use. Each class is for one year: 2012 has a class ...
0
votes
2answers
37 views

Java Annotations simple error

I am newbie at Java EE and I have a simple problem. I created a project using Maven plugin's default directory structure and I want to annotate a class as @Loggable, but I get a Loggable cannot ...
0
votes
0answers
5 views

Jonas 5.2.2 : ear containings two wars : ejbs problems

The context of my issue : I deployed an EAR on Jonas 5.2.2. In my Ear, I have ejbs.jar and two war (deployed on /App1 and /App2) App1 : webApp which use my ejbs App2 : JaxWs which use my ejbs I ...
0
votes
1answer
38 views

Spring + Hibernate populating holder class with values from DB

For my web app I will loading a few details from the static DB tables which I plan to load when the container starts up on a HolderClass in a singleton bean. I will inject this class wherever I wish ...
-2
votes
1answer
57 views

How to delete a file in Java [on hold]

I try to delete one file in java but the last line of that file only deleted .I cant find the where is the problem.plz help me .My program code is PrintWriter writer=null; File sqlMaster = new ...
-1
votes
1answer
31 views

How to obtain a directory name inside of a directory not knowing the exact name in Java

I have a directory called: example Inside of directory "example" I have 3 subdirectories: blah123-words random123-words stuff123-words The problem is "123" integers in the subdirectories will keep ...
0
votes
1answer
10 views

Catch httpServeletRequest in loadUserDetails method

I have a customized spring AuthenticationProvider class but try to intercept the HTTPServletRequest and HTTPServletResponse within the loadUserDetails method. ...
3
votes
1answer
60 views

@PostConstruct executed twice in class with @Singleton and @Startup on JBoss 7

I have a following class: import javax.annotation.PostConstruct; import javax.annotation.Resource; import javax.ejb.Singleton; import javax.ejb.Startup; import javax.ejb.Timeout; import ...
1
vote
1answer
62 views

How to access the array variables stored in session from within the javascript?

I'm having a servlet in which I have stored an array within the session scope as follows, session.setAttribute("pageNames",pageNames); Now this servlet transfers the controll to an JSP page which ...
0
votes
1answer
19 views

How to enable or disable links in a jsp page through java

I have a web application using servlets, Now i need to add an additional feature that i need to disable or enable the links using a java code(i might create a new class and return the result object ...
0
votes
2answers
69 views

Java for loop iteration

In my application, I have list of values of type String, I am iterating throught it and comparing the values of each to another string and if it is true returning true value else false. ...
0
votes
1answer
67 views

Why doesn't Primefaces refresh my button?

I'm building an application that permits users to manage a task. The task monitoring screen can be accessed by two users at the same time. Each user can see if the task is currently running and can ...
0
votes
3answers
76 views

all Values are not inserted in database

I have a excel file with more than 20000 rows, which has large amount of data and the data from this file is inserted into database through a java Program. Whenever I run the file, some of the ...
0
votes
3answers
54 views

How to fix Tomcat “bug”

I am trying to run an web app. In the beginning it was going well, but I had to delete some jars from the project folder. I didnt delete the jars using eclipse. So, I started to get these erros: ...
0
votes
3answers
36 views

Upate a java file in war file

I am working on a project and the project is in running state. As there is some issue in a java file and I have resolved that issue. But I don't have an idea how to update that particular java file in ...

15 30 50 per page