java-ee-5

Any data-driven open source JEE5 EJB3+JSF Sample Project out there?

I am looking for an open source project that uses EJB3 as backend and JSF as frontend. It should not be a tutorial but a real application that real people are using. The application should be data-driven, i.e. the following aspects are fundamental and make 80% or more of the application. form-based (many input forms) table views, mast...

How can I best connect Seam and GWT in a stateful web application?

We have a web application that was implemented using GWT. What it presents is fetched from a Jboss/Seam server using the remoting mechanism, and this works fine. However, the application is now extended to support sessions and users. The Seam GWT service doesn't seem to provide a way to let me log in such that Seam can return restricted ...

Another JPA Question

I have this code: @PersistenceContext(name="persistence/monkey", unitName="deltaflow-pu") ... @Stateless public class GahBean implements GahRemote { But when I use this: try{ InitialContext ic = new InitialContext(); System.out.println("Pissing me off * " + ic.lookup("java:comp/env/persistent/monkey")); Iterator e = ic.getEnvironm...

JPA annotations and Interfaces

I have a class Animal and an interface it inherits from IAnimal. @MappedSuperclass public class Animal implements Serializable, IAnimal{...}. @Entity public class Jaguar extends Animal{...} My first question is, do I need to annotate the interface? I asked this because I am getting this error when I run my tests: Error compiling...

J2EE -- is it just fluff or the real stuff?

I'm familiar with the LAMP stack and over the years have successfully deployed a handful of web sties based on it. I've used everything from Apache + modPerl, to PHP, to Ruby and Rails. With good use of caching my Rails site can sustain a pretty good load, but I'm not talking massive. I never really liked Java as a language, or XML for ...

MVC framework for huge JEE 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 traffic. We are using Java, over Jboss 4.2.3x, with PG as DB, and Solr for the searches. We w...

EJB3 and manual hierarchy persistence.

I have a legacy database, which I am using EJB3 to model. The database is in quite a poor shape, and we have certain unusual restrictions on how we insert into the DB. Now I want to model the database in a hierarchy that fits in with the DB strucuture, but I want to be able to manually insert each entity individually without the persiste...

JBoss 5 AS and EJB3 bean injection from servlets?

It was my understanding that JBossAS 5.x supported EJB3 bean injection in servlets with the @EJB3 annotation. I'm using the default configuration for JBossAS 5.0.1.GA and it's not working. I've added the mappedName argument to the @EJB annotation with the session beans JNDI name, and it just doesn't do anything. No apparent errors, the b...

ICEFaces Session Auto-Extension

I have an application in which users frequently leave the page running in their browser all day. The page has an intervalrendered that updates data every 30 seconds. However, if the user doesn't interact with the page for a while, it still expires. I'd like it to auto-extend for as long as the browser is open and making the scheduled r...

EJB3 - handling non-standard link tables.

Hi all, I have a situation where I am working with EJB3 and a legacy database. I have a situation where there is a many-to-many relationship between two tables A and B, defined through a third (link) table L. The complication is that the link table has other fields in it other than the PK's of tables A and B. The columns are standard t...

Spring 2.5 in EJB container

Hi, I would like to use the spring framework within an EJB3 project. In detail I would like to use the JDBC template class which should be instantinated from a given data source. When I put the spring.jar to my Jboss lib directoy everything is working fine. But when I put the JAR inside my EAR only there seems to be external dependencie...

Can I inject a SessionBean into a JEE AroundInvoke-Interceptor?

I have an EAR with modules: foo-api.jar foo-impl.jar interceptor.jar In foo-api there is: @Local FooService // (interface of a local stateless session bean) In foo-impl there is: @Stateless FooServiceImpl implements FooService //(implementation of the foo service) In interceptor.jar I want public class BazInterceptor { @EJB...

@EJB injection and the Enterprise Naming Context - relation between the two.

The JEE specification states that an EJB injection like this: @EJB MyInterface myBean; will create en entry in the Enterprise Naming Context, viz. java:comp/env/.MyInterface/myBean. It is up to the deployer to bind this context entry to a real value and to inject this value in the myBean field. Now I have the feeling I am missing som...

How to hide RuntimeException details from EJB client ?

I have a JEE5 application that exposes services using (local) session beans. When an internal fault occurs during service execution, a RuntimeException is thrown and encapsulated by JBoss(5.0.1) in a javax.ejb.EJBTransactionRolledbackException. The problem is that client applications receiving this EJBTransactionRolledbackException can...

Configurable persistence in Java EE5+

There are 2 ways of using a persistence unit, code or annotation. CODE [..]EntityManagerFactory emf; emf = Persistence.createEntityManagerFactory("SOMEPU");[..] or ANNOTATION [..] @PersistenceContext(name = "persistence/LogicalName", unitName = "SOMEPU") [..] Question: If you want to change the persistence unit (or point to d...

quick way to add default method permissions for all EJBs specified in ejb-jar.xml

Like the title says, I have a valid ejb-jar.xml. However, for it to be JEE compliant, method permissions need to be present for all beans specified in the file. There are about a couple of hundred beans (I know!, don't even ask) so this is going to be horrible to do manually. Anyone out there have a neat way of doing this (automaticall...

Real world comparisons of Glassfish and JBoss 5?

Does anyone have experiences with both in the real world? How do they compare in terms of performance (memory usage, speed, etc)? Stability? Does JBoss Seam work well on Glassfish? ...

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 tomcat threads block indefinitely trying to write to the output stream: SocketOutputStre...

Proposing Glassfish to customers

With Sun being taken over by Oracle, Oracle will arguably gain control of Glassfish. I do understand that Glassfish is community driven but most of the contributions do come out of Sun at this time. Its a great App Server and perfect for many cost-sensitive customers. However, if Oracle decides to pull the rug from under our feet on th...

Migration solution for singletons in an OSGI environment

I'm working in a JEE Environment in which each application is in a war file of its own. In the WEB-INF/lib of each application war file there is a common jar that is shared by all applications. This common jar contains several Singletons which are accessed from many points in the code. Because of the war-file boundaries each application ...