java-ee-5

Navigate to the Same Page After Action in JSF 2

I have a component done in JSF 1.x, this component has a command button as follows <h:commandButton ... action="#{templateController.next}" /> Where templateController was passed as an EL binding and can be any object that implements a certain interface. The generic implementation of next() was just executing code and then returning a...

Defines JEE 5 the handling of commit error using bean managed transactions?

I'm using glassfish 2.1 and 2.1.1. If I've a bean method annotated by @TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW). After doing some JPA stuff the commit fails in the afterCompletion-Phase of JTS. GlassFish logs this failure only. And the caller of this bean method has no chance to know something goes wrong. So...

Object suddenly missing from HttpServletRequest

I print a list directly in the servlet using the print writer and the list prints. When I try to put in the jsp however the list doesn't print whether I use JSTL or scriptlets. I tried to test in JSTL and scriptlet if the object is null and turns out that it is! Why does this happen and how can I fix this? Servlet code that works ...

Generated queries contain schema and catalog name

I've the same problem as described here In the generated SQL Informix expects catalog:schema.table but what's actually generated is catalog.schema.table which leads to a syntax error. Setting: hibernate.default_catalog= hibernate.default_schema= had no effect. I even removed schema and catalog from the table annotation, this caus...

How to set the transaction isolation level of a

How do I set the global transaction isolation level for a postgres data source. I'm running on jboss and I'm using hibernate to connect. I know that I can set the isolation level from hibernate, does this work for Postgres? This would be by setting the hibernate.connection.isolation hibernate property to 1,2,4,8 - the various values o...

JSON Web Service over simple HTTP GET/POST

Hi; Can you suggest a way or a framework or etc. for JEE in order to make simple HTTP GET/POST calls to some web services like in SOAP web services but transport format must be JSON; not XML and there must not be any wrapper around(may be some vey lightweight header) like SOAP etc. In short, my purpose is to serve web services using JSO...

SAP Netweaver JEE AS

Where is it possible to download a trial/community/developer version of SAP Netweaver Java EE Application Server? Thanks a lot! ...

ClassCastException When Calling an EJB Remotely that Exists on Same Server

I have 2 ejbs. Ejb-A that calls Ejb-B. They are not in the same Ear. For portability Ejb-B may or may not exist on the same server. (There is an external property file that has the provider URLs of Ejb-B. I have no control over this.) Example Code: in Ejb-A EjbBDelegate delegateB = EjbBDelegateHelper.getRemoteDelegate(); // lookup f...

Using EJB in Wicket WebPage

When I'm using @EJB annotation to access stateless EJB through remote interface in common HttpServlet, it works OK: public class ListMsgs extends HttpServlet { @EJB private Msgs msgsRI; ... protected void processRequest(...) ... { List msgs = msgsRI.getAll(); ... } ... } But when I'm trying the same thing in Wick...

Injecting into Validator or EntityListener?

I'm trying to do some validation of complex constraints on Hibernate entities in a JBoss JEE system. For that purpose, I need my validator (whether it be an actual JSR303 validator or just an EntityListener for PrePersist/PreUpdate/PreRemove) to have access to my DAO beans. Much perusal of JSR303 stuff doesn't give me any indication that...

How do I upgrade an existing enterprise project from Java EE5 to Java EE 6 in Netbeans (6.9)

The project has an EJB module & a web module. Changing the server is easy, but I'd like to switch to EJB 3.1 also but I believe I need to change all kind of configuration files since I can't do it from the project properties window(s). Any tips or links do useful documentation will be greatly appreciated. Thank you! ...

How is it to return a very long list from ejb3 session bean?

I have a ejb3 session bean and a servlet. The bean have access to a database with some big table. The servlet should retrieve the table's content from the bean and send data through ServletOutputStream. How I can transfer big data between ejb3 bean and servlet? I can't return a list with all rows at once because it doesn't fit in memory....

Ejb refrences another ejb

i have two ejbs , ejb A references ejb B, both are deployed to the same server , i am using netbeans and jbosss 4.2.3 as well as ejb3.0 each time i try to deploy ejb A it tries to register ejb B which is already deployed and registered which causes error :java.lang.IllegalStateException any idea how to prevent EJB A from registering t...

Stateless Session Bean

Do I package a stateless session bean in a war file or a ear file for deployment? ...

EJB3 beans JNDI lookup in Websphere 7

I have created an EAR with a web project, ejb3 project and the ejb client. I'm able to call the bean methods via injection in the servlet. I'm planning to use a ServiceDelegate which is a pojo to handle the bean invocation. So I'll call the delegate from my servlet and the delegate will call the appropriate beans and its methods. But I'...

What's the best way to do a authorization check programmatically on JSF pages?

Java EE 5 / EJB 3 / JSF 1.2, using Facelets / ICEfaces 1.8.2 I'm authenticating my users with JAAS, but I think that simple role-based authorization is insufficient for my needs—my users' permissions need to be computed out of data in JPA entities. I'd like to add to certain pages a check that gets some entities from an EJB, does a litt...

ejb3-using-2-persistence-units-within-a-transaction

I am having problems connecting to 2 persistence units from within the same transaction using following tech stack, WLS 10.3.x, Eclipselink 2.1, Oracle 11g JDBC driver, Informix 10 JDBC driver Using inputs from this SO post I made the oracle datasource XA compliant and the Informix ds "Emulate 2-phase commit" and things started to work...

How to initialize JEE 5 JAX-WS 2.0 Web Service with Parameters

Application configuration: Web application using java first method of creating JAX-WS 2.0 Web Services with annotations. WebLogic 10.3 My Requirements The requirements I have are to deploy a single web service implementation class, but change logic based on the URL from which the service was accessed. Question: I'm assuming a goo...

java.lang.NoClassDefFoundError: HttpSessionListener

I am trying to deploy a war that i didnt write and i am getting this error in my logs: java.lang.NoClassDefFoundError: HttpSessionListener i know that HttpSessionListener lives in servlet-api.jar which is found in the lib dir of tomcat(my app server). I tried including servlet-api.jar in the war's WEB-INF/lib folder, but the logs yel...

How do I get JSON data from my RESTful service using JEE 5?

I have a simple RESTful web service written in JEE 5. It works fine but I've decided to output JSON from the GET method. As an initial step I've only add one line of code: ObjectMapper mapper = new ObjectMapper(); That one line results in this error: 48d5-9878-2ef7c0a948c4;|StandardWrapperValve[Jersey Web Application]: PWC1406: Servl...