java-ee

Deploying an EAR to JBOSS times out (org.rhq.core.pc.inventory.TimeoutException:)

Hi, I am trying to deploy an ear file to JBOSS AS (defalut server). The application is the mavenised version of examples of SeamInAction book. When I copy the file to $JBOSS_HOME/server/default/deploy, I don't get any exception but the application doesn't respond, after some time trying to access the application from the browser gives ...

Where can i find a list of all the reference implementations for JEE6 ?

Do you know if there is a list with all the reference implementation for every component of JEE6? I.e. Glassfish is the reference container, Hibernate Validator for validation, etc. ...

Occasional weird Glassfish errors, resolved by a restart?

I'm developing a web app using netbeans with GlassFishv3. Every once in a while when I add a new feature in my app, glassfish starts nagging with stupid errors, after a lot of time wasting and panicking, i restart glassfish and run my application again, then suddenly the errors all go away and my site starts acting correctly. (or in cas...

Java EE online banking code example

Is there any open source Java EE application for online banking and processing that you guys are aware of? Say for example I want to implement the whole online banking stack, from front-end, middleware, and back-end. Has anybody open-sourced this before? ...

Why is struts validation not working for me?

I'm trying to use Struts validation to check various fields entered by users. If anyone is able to help me see what I lack, I would be extremely grateful. Here's what I have: I put validation.xml and TestAction-validation.xml in WEB-INF/classes/ Here is validation.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE validators PUBL...

How do I get my MDB to ignore messages coming from itself?

I have a few clients that are both consumers and subscribers to a single topic on an ActiveMQ message broker. All the clients share the same code, they are in fact using exactly the same Enterprise Application consisting of: (1) an EJB producing a message, and (2) an MDB consuming the message. The problem is basically that if I have c...

Spring MVC 3.0 InternalResourceViewResolver custom view file

Hello! I have a view resolver: <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/jsp/"/> <property name="suffix" value=".jsp"/> <property name="or...

Geotools google maps java ee web application

Hello all. I'm searching the alternatives for developing a java web application to calculate land values based on some variables with a visual presentation of a map. Since the data that i have is ESRI shapefiles and i want to go open source i ended up with this configuration. Take the shp files with Geotools , transform and store the...

how to instantiate more then one CDI/Weld bean for one class ?

In Spring it was possible to instantiate any class by defining the corresponding bean in xml conf. It was also possible to instantiate more then one bean for the same class with different parameters..... Are the such features in CDI as well, namely is it possible to create different instances of the same class with different initializ...

Can I throttle requests made by a distributed app ?

My application makes Web Service requests; there is a max rate of requests the provider will handle, so I need to throttle them down. When the app ran on a single server, I used to do it at the application level: an object that keeps track of how many requests have been made so far, and waits if the current request makes it exceeds the ...

Should Enterprise Java entities be dumb?

In our legacy JEE application, there are loads of value object (VO) classes which typically contain only getters and setters, maybe equals() and hashCode(). These are (typically) the entities to be saved in persistence storage. (For the record, our app has no EJBs - although that might change in the future -, and we use Hibernate for pe...

Looking for a good, practical example how to use JQuery or YUI with Java web application

I am looking for an extensive example or, the most preferably, an open source project with a nice, modern, ajax-enabled user interface which is using JQuery or YUI on top of Java web application - it can be full Java EE application, JSF only, Spring MVC application, anything. I would like to learn what are best practices to create such ...

How to integrate JSF with custom servlets?

I'm just getting started on JavaServer Faces and it looks very attractive. However I'd like to use my own servlets in the same web application as JSF. This might be really obvious, but what are the best practices for integrating JSF with a "normal" servlets-based application? This would include accessing JSF data from the servlets (read...

Custom message with FacesContext.getCurrentInstance().addMessage is not displayed in page (JSF)

Hi! My page: ... <div id="header"> <!-- content header --> </div> <div id="content"> <h:messages /> <h:ouputText value="#{example.text}" /> </div> ... My managedBean: public class ExampleManagedBean(){ private String text; public String getText(){ FacesContext.getCur...

java getSession().setAttribute()

I have to make a litle change to an existing project(tomcat and java WebApplication). now, in loginForm, if users type correct login and password, it is Ok, to users wil be shown main page. But when any user types incorrect password, or may be his account is temporarily locked, so to user again wil be shown loginform, user can not know...

Is it possible to create a write only fields bindings in Java Server Faces?

I am creating a form in JSF to save a new entity bean. I binding the properties of the new entity to input elements use the value property e.g. , where backing bean is JSF managed mean and newEntity is filed of the backing bean whcih contains a new instance of my entity. For properties which are value types (like numbers), the input fiel...

Stateless and Stateful Enterprise Java Beans

I am going through the Java EE 6 tutorial and I am trying to understand the difference between stateless and stateful session beans. If stateless session beans do not retain their state in between method calls, why is my program acting the way it is? package mybeans; import javax.ejb.LocalBean; import javax.ejb.Stateless; ...

Jetty datasource with Atomikos UserTransaction

I have two datasources in my Web application (principalDB and backupDB) on two Postgresql DBs, and a web container managed transaction manager (with Atomikos) for them. Spring FW and Hibernate are my building blocks for the application. The problem I am running into is that Jetty 6.1.3 web container does not seem to load the app specific...

Automatically create Entities from database

Is there a way to automatically create javax.persistence.Entity classes from an existing database (or from the SQL statements that created them)? I am just reading through the persistence part of The Java EE 5 Tutorial and creating all these annotations by hand seems rather wasteful considering that all (or most) of the necessary knowle...

How do I call a remote EJB in an EAR from another?

In Weblogic 10.3, how do I inject a remote EJB from one EAR into a Stateless bean of another, both EARs being deployed in the same container? Ideally I'd like to do as much as possible with annotations. So suppose I have the following interface: public interface HelloService { public String hello(); } implemented by the following E...