Questions tagged [java-ee-5]

Use this tag for questions relating specifically to Java Enterprise Edition 5.

Java Enterprise Edition 5 (JEE5) is a specification defining a collection of Java-based technologies and how they interoperate. JEE5 incorporates a set of technologies, including EJB3, JPA, JSF, etc. Numerous implementations are available in the form of both commercial products and open source projects.

246 questions
4
votes
1 answer

Guice @SessionScoped annotation causes IllegalArgumentException with Shiro HttpSession

I have an Apache Wicket 1.5 application that uses Shiro for security, and Guice for dependency injection. Most of its pages are stateless, but some of my model objects (user data, current menu state, ...) need to be consistent across all requests in…
weltraumpirat
  • 22,544
  • 5
  • 40
  • 54
4
votes
4 answers

Architecture guidebook for Java web application?

I'm looking for some good books/internet material that discusses on how to make decision on architecture for a Java web application, discuss on various considerations etc. I found this "J2EE Architecture Book" on TSS…
Shaw
  • 1,484
  • 4
  • 20
  • 31
4
votes
2 answers

Where is my ejb-jar.xml?

i created a Java EE 5 Enterprise Application on NetBeans 7.4 including a WAR and an EJB using Weblogic 10.3.0 Im using JPA so i need to use the datasource for my persistence.xml My problem is i'm trying to make a JDBC Datasource following…
GabrielBB
  • 2,479
  • 1
  • 35
  • 49
4
votes
0 answers

How can I detach an entity in JPA 1.0?

The Java EE 5 version of Entity Manager doesn't have a detach method, but I need this exact functionality. Is there a way to detach an entity in JPA 1.0, or is this functionality impossible to do?
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
4
votes
1 answer

Sorting even number and odd number in single line

This is an Interview question. Say you have an array like this {54,23,545,65,23,4,1,2,5} How to sort it and classify as even or odd in a single line of code? The answer's order of complexity should be O(1), without using any for loop. The result…
Sathish
  • 51
  • 4
4
votes
1 answer

JSF button to reset the session

Is there a way to reset (clear) the session for a user, when he clicks on a button?
Stella Peristeraki
  • 289
  • 1
  • 9
  • 16
4
votes
3 answers

How do I configure tomcat to handle bad HTTP clients?

We're running jBoss 5.1, which in turn uses the Tomcat servlet container. We've been seeing some cases where bad HTTP clients will open a socket, make an HTTP request, fail to read all data and fail to close the connection. The outcome is that the…
johnstok
  • 96,212
  • 12
  • 54
  • 76
3
votes
1 answer

How do I downgrade an existing project from Java EE5 to J2EE 1.4 in Netbeans (7.0.1)

I've created a new (Web Application) project in Netbeans 7.0.1 and set the Java EE version to Java EE 5. The options that I then have for the Source/Binary Format (Project Properties > Sources > Source/Binary Format) are JDK 5 and 6. If during…
Maria Ioannidou
  • 1,544
  • 1
  • 15
  • 36
3
votes
1 answer

Can not find getFlash() method in Myfaces

FacesContext.getCurrentInstance().getExternalContext().getFlash() I am trying to use above code seems like getFlash() does not exist in JSF2 implementation of Myfaces. How how can I access it. Above line gives me this error The method getFlash() is…
Java Ka Baby
  • 4,880
  • 11
  • 39
  • 51
3
votes
4 answers

EJB3 & How JAAS subject/principal is propagated to EJB Tier from servlet container?

I'm trying to understand how the JAAS principal propagates to the Business/EJB tier from web tier. I've read that the if the roles/realm is configured in login-config & security-context of web.xml then the servlet container will also transparently…
PlanetUnknown
  • 3,956
  • 4
  • 49
  • 67
3
votes
2 answers

Request scoped context for stateless session beans

Is there a request-scoped context for EJB3 session-beans? My environment is Java-EE-5. This example @Remote(SessionFacade.class) @Stateless public class SessionFacadeBean implements SessionFacade { @EJB private Other bean; public void…
Frank Schwarz
  • 71
  • 1
  • 5
3
votes
1 answer

Is it safe to cache DataSource lookups in Java EE?

I'm developing a simple Java EE 5 "routing" application. Different messages from a MQ queue are first transformed and then, according to the value of a certain field, stored in different datasources (stored procedures in different ds need to be…
Leikingo
  • 890
  • 3
  • 10
  • 23
3
votes
1 answer

JMS application client can create more than one active sessions while web/ejb components cannot?

I am reading the JEE5 tutorial for JMS. And I am having a hard time understanding the reason for this 'general rule': A general rule in the Java EE platform specification applies to all Java EE components that use the JMS API within EJB or web…
Robin Bajaj
  • 2,002
  • 4
  • 29
  • 47
3
votes
2 answers

Java EE 5 programmatic authentication

How I can authenticate a user from JSF action (or in servlet doGet/doPost methods)? I mean something like: Authenticator auth = ...; if (!auth.authenticate("user","password")) { FacesContext.getInstance().addMessage("Incorrect username or…
ProgramWriter
  • 283
  • 3
  • 11
3
votes
2 answers

MVC framework for huge Java EE application

Which MVC-framework is the best option (performance/ease of development) for a web application, that will have + 2 million visits per week. Basically the site is a search engine,but also there will be large amounts of XML parsing, and high db…
Mg.
  • 1,469
  • 2
  • 16
  • 29
1 2
3
16 17