j2ee

Long Transaction Time Solution for JEE?

A problem I've encountered a few time in my career is in a tiered service architecture a single downstream system can bring down the entire client application if it gets into a state where all its threads are consumed on a deadlock or some sort of infinite loop bug in that system. Under these conditions the server socket on the JEE serve...

Auto generate data schema from JPA annotated entity classes

I'm using JPA (Hibernate's implementation) to annotate entity classes to persist to a relational database (MySQL or SQL Server). Is there an easy way to auto generate the database schema (table creation scripts) from the annotated classes? I'm still in the prototyping phase and anticipate frequent schema changes. I would like to be able...

A computer science student needs help selecting topic for thesis [j2ee]

Dear All, I am doing my Master degree, and I need to start working on my thesis( a j2ee project using MVC(Model view controller)). I am looking for a nice topic, but I don't know what. I have did some java projects using the following technologies: Data structure programming Java Server Socket Programming J2ee programming (JSP,S...

Servlet containers and class path

To what is the class path of a servlet container set to? As per my understanding there are three components involved. The jars in the lib folder of the servlet container and then the classes in the WEB-INF/classes and jars in the WEB-INF/lib folder. The classes in lib folder of the servlet container are added to the system class path a...

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. I fail to inject the EntityManager (@PersistenceContext) though, and to my understanding that is because it is running in my servlet context and not as a separate Entity EJB. Creating t...

struts property tag to retrieve Object

Is it possible to get an Object's attribute through the property tag in struts? For example, if I have a user object that consist of user name and email, is it possible to modify the code below to have it return the user name and email instead of the whole object? print("<s:iterator value="UserObjects"><tr><td><s:property/></td> </tr><...

javax.jms.JMSException: Enlist failed caused by XAER_RMERR

Any idea why this might happen. Usually the error happens on message arrival. It causes listener to restart. Actual message did not get consumed. The log dumps follow. [11/19/08 10:55:37:552 GMT] 1cc4d8ed XATransaction E J2CA0027E: An exception occurred while invoking start on an XA Resource Adapter from dataSource JMS$TSC_VFQCF$JMSMan...

How do I learn Java EE? Where to start?

I'm going to be honest with you guys. I want to learn Java EE (and its related technologies) because it offers a lot of job opportunities here (the Philippines) and abroad. The problem is I don't know where to start and what to read or where to learn from. I'm almost finished reading Head First Java and I'm liking the language so far. An...

can jconsole be used with J2EE?

all the examples I see are for J2SE applications by passing your JAR file at the command line. Can JConsole attach to a WAR or EAR and monitor application performance? ...

What are the advantages of using J2EE over ASP.NET?

We are currently planning to launch a couple of internal web projects in the future. Our company's dev teams are mostly experienced in J2EE and have worked with it for years. Today, we have the choice of launching a couple of our projects on .NET. I have checked out a couple of sources on the .NET, and it seems like the "J2EE vs ASP.NET"...

How do you test if cookies are enabled in Java/J2EE

Testing: return request.getCookies() == null; is not an appropriate way test. Is there another way? ...

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 example tomcat, WAS, Weblogic etc. The behaviour I have seen on tomcat is that it gives messages that the packaged version of these apis are not ...

What is the best design for an inquiry system (email to database) automatically filtered by some category?

We are working on an inquiry management system using J2EE. We're looking at a feature, allowing users to send inquiries to particular mail-id and entering into the database. Catch is to automatically allocate it to some categories. ...

How do I get user information within a stateless session bean

I'm working on an existing j2ee app and am required to remove some vendor specific method calls from the code. The daos behind a session facade make calls into the ejb container to get the user's id and password - in order to connect to the database. The user id and password part of the initialContext used to connect to the server. I ...

JPA Multiple Embedded fields

Is it possible for a JPA entity class to contain two embedded (@Embedded) fields? An example would be: @Entity public class Person { @Embedded public Address home; @Embedded public Address work; } public class Address { public String street; ... } In this case a Person can contain two Address instances - home...

How to enumerate HTTP listeners from a Java EE web app

I have a web app with a web-based configuration UI. If the user accesses via HTTP, I want to alert the user that they should really use HTTPS and give them a link to click on to get to the HTTPS-prefixed URL. Now, this is pretty straightforward if we're on the default ports, but often, we're not - for example, HTTP might be on 8080, wit...

What tag libraries you know for J2EE JSP, something like displaytag ?

What tag libraries you know for J2EE - JSP, something like displaytag ? ...

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 Object. There are so many options out there that it is confusing me. Here are the options I've narrowed down to but not sure.. Spring RM...

Unable to start Camel 1.5.0

Hi, I'm trying to run the Camel Example "camel-example-spring-jms" (also at http://activemq.apache.org/camel/tutorial-jmsremoting.html). However, when I try to start Camel using "org.apache.camel.spring.Main" class, I get the error saying "Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://...

JSP Struts Performance/Memory Tips

I am working on a basic Struts based application that is experience major spikes in memory. We have a monitoring tool that will notice one request per user adding 3MB to the JVM heap memory. Are there any tips to encourage earlier garbage collection, free up memory or improve performance? The application is a basic Struts applicat...