Questions for java-ee


Overriding application server behaviour for loading jsp-api and servlet-api jars in a packaged web application

I have a project built and packaged with a specific version of jsp-apiand servlet-api jar files. Now I want these jars to be loaded when deploying the web project on any application server for exam...

Almost Simultaneous HTTPServletRequests

Is it possible to reject a request to my servlet or not respond to it? Say if I recieve 2 requests within 100 ms on the same thread, can I ignore the second one completely? Or is it possible to abo...

JPA Multiple Embedded fields

Is it possible for a JPA entity class to contain two embedded (@Embedded) fields? An example would be:

Accessing Hibernate Session from EJB using EntityManager

Is it possible to obtain the Hibernate Session object from the EntityManager? I want to access some hibernate specific API...

Backing beans (@ManagedBean) or CDI Beans (@Named)?

I've just started reading through Core JavaServer Faces, 3rd Ed. and they say this (emphasis mine):

Launching felix shell on glassfish

I am trying to launch the felix shell that would allow me to interact with OSGI runtime on glassfish and start/stop bundles. From what I read it should be accessible via telnet localhost 6666, but ...

Why can't I catch EJB exceptions?

I can't seem to catch exceptions such as NoResultException or EJBException in my java ee 6 project. Is there something I am doing wrong? I have caught exceptions outside the EJB container but thi...

How to run jar file from JSP?

When I am going to click on button, I want to execute jar file which is on server.

Hibernate 2.1.6 or 3.x?

We are in the process of revamping our persistence layer from some proprietary orm. Most of our developers are already familiar with hibernate 2 and also its gotchas. So we decided to stay with Hib...

Best LDAP server to be used with Java EE

I am going to build a Web application that will interact with LDAP.

JPA and order of columns in the database

I'm using Eclipselink as my persistence provider. Is there any way to specify the order in which the columns appear in the database? The column-order in the database doesn't match the attribute-ord...

How to use WorkManager with GlassFish 3?

I need to launch a background task from a servlet in a GlassFish server, and I figured WorkManager was a somehow Java EE-compliant way to achieve this.

Are “Application Client Container” and “Embedded Enterprise Bean Container” the same?

Is the "Application Client Container" (see here) the same as the "Embedded Enterprise Bean Container" (see here)?

How to run a javaweb project through Main function in Netbeans´╝č

I've created a JavaWeb Project in Netbeans7.2 following the book Beginning JavaEE6 Platform with GlassFish3 2nd edition. The book uses Maven and commandline to compile and package while I'm using

struts property tag to retrieve Object

Is it possible to get an Object's attribute through the property tag in struts?

Sending SMS Text in Java via Email Error

I am trying to send a text message via email within Java.

SVN commit behavior / failure criateria

So I'm making some changes/fixes to someone's subclipse mod and had a few questions.

How to close EnityManager when not injected?

I have a servlet running in an Oracle OCCAS server. Currently I map some data in a database to an entity class in my application using @Entity annotaion.

Why ear and war are behaving same way in my application?

According to my project requirement i have to deploy an EAR file of my application in JBOSS7.

How to remotely view activity logs from a Java EE app in Vaadin?

I'd like to remotely monitor the activity of my Java EE application (deployed on a glassfish server).

Difference between static variable in ActionScript and in Java EE

Please verify my understanding. When a static variable is defined in a Java EE application, the variable is visible and can be altered by any other user. But in case of actionscript, the static

ejb-jar.xml: ejb-client.jar or ejb-module.jar

Sometimes, configurations or declarations need to be done in the ejb-deployment descriptor, the ejb-jar.xml file.

JPA Concurrent Transaction Strategies

I am working on a warehouse management system, using JPA 2.0 - EclipseLink and I have come across the need to implement concurrent transactions, currently I am implementing a timestamp difference to

LDAP Searching with # character

I am trying to search for the Organization Unit on Active Directory (Window Server 2003). This is my code

multiple-target url using spring security 3.1

i want multiple target url to be redirected to for the different roles of the users, how to achieve it using spring security 3.1, I have already done with the single target url, but i am not gettin...

serveResource called when i call actions

i use jQuery.ajax to call this method in my portlet :

What does the @EJBs annotation do?

I know roughly what this construction does: It creates a SomeType EJB and injects the objecty into another EJB.

Turning on/off logs at runtime

I am using SLF4J with Log4J for logging. So far I am using the log4j configuration from xml file. How I can turn on/off logging at runtime.

setContextClassLoader implications

I'm trying to clean up Tomcat warnings about memory leaks due to creating my own threads. proposes that I call myThread.setContextClassLoader(null)

Displaying selected Item's data (JSF, Primefaces)

I am having problems with displaying the selected item's data on a dialogue using Primefaces dialogue. setSelectedUsers method will fire but the dialogue won't display the data of the user object. ...

Understanding authentication providers in Spring security

I am trying to understand authentication providers in Spring (3.1) and I have a question to what is really happening here. I know that I use the namespace that gives easier access to functionality ...

Adding jar file to each project multiple times

I have three projects(Admin,user,viewer) for each of them i added jar files in class path in eclipse. Now i have to use some of admin modules in user and some of admin and user modules in viewer(no

What is an 'error dispatch' in servlet processing?

The javadoc of the javax.servlet.AsyncContext interface says:

EJB/JPA: Is it called JPQL or EJBQL?

Is the JPA query language called JPQL or EJBQL? I keep reading about them here and there, JPQL seems to appear slightly more often, but frameworks like JBoss Seam use EJBQL everywhere, so which one...

Error while persisting record

I am trying to persist a record in a remote database. But I am getting the following error:

Mapping array with Hibernate

Can you please help me to map th class Hbernate?

MyEclipse Deployment

Are other people using the MyEclipse Libraries? Every time I start working in a project and then update MyEclipse the build libraries change or versions are not what I need. Is it common practice t...

Suggestions about Lightweight Open Source Web Servers which can support Web Services written in Java

I am currently looking for Lightweight open source web servers which can support Web Services written in Java.

execute a script on each page java-ee

I'm trying to build a multilang website and for that I have to identify the user lang

Spring security does not work

I am getting an error when I try to login (or, when I abort the HTTP Basic dialog with escape)

Passing Objects from Java(BlazeDs) Server to Front end Flex app

I am looking for some help. I have set up a Java Dynamic web project which uses BlazeDs. This is on a Tomcat server and can send and recieve strings to a front end Flex project.

Primefaces 3.4: Tree selectedNode is null

I am new in Primefaces and I try to use the Primefaces Tree for several days now.

Using JdbcUserDetailsManager vs own UserDetailsService

I am learning about Spring Security and I don't understand completly if I should use JdbcUserDetailsManager or a custom implementation of UserDetailsService. I am using a database for storing users...

If I put EJB's in an EAR file, should I put the entity classes in there, a seperate jar, or the web app?

If I put EJB's in there on EAR file should I put the entity classes in there, a seperate jar, or the web app?

Connecting a MySQL database to Glassfish classpath is not set or classname is wrong

I'm swapping out a derby database for a MySQL one. I had everything working before but after what I thought was the proper configuration I'm getting the error:

How to install jars in maven repository which is eclipse embedded?

My objective is to install jar file in the Maven repository.

Servlet containers and classpath

To what is the class path of a Servlet container set?

MyBatis - Mapping tree data-structure

How can I map table id | parent_id | name to my pojo class:

Does this run in transaction?

Let's say I have two EJBs A and B:

Making a Service Layer call from Presentation layer

I have to choose a technology to connect my Application/Presentation Layer (Java Based) with the Service Layer (Java Based). Basically looking up appropriate Spring Service from the Business Delegate

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.