java-ee

What are the main tools/frameworks used nowadays in Java?

I am a .NET / C++ programmer switching to Java. I had previous exposure to Java 10+ years ago in university. What would be the typical things to be learned in order to be able to program web applications in Java? I can think of: JSP/Servlets Eclipse EJB What else do people use these days? The idea would be to be able to land on a Jav...

Application level checksumming as the tcp checksumming might be too weak?

This Paper (When the CRC and TCP checksum disagree) suggests that since the TCP checksumming algorithm is rather weak, there would occur an undetected error every 16 million to 10 billion packets using TCP. Are there any application developers out there who protect the data against such kind of errors by adding checksums at the applicat...

Are EJBs still useful? And what are the Spring Framework ways to replace EJBs?

I have read for a while that EJBs are not useful or cumbersome. But what other ways implement the business delegate pattern? How do EJBs differ from the approach the Spring recommends? Also, how have recent advances with EJBs changed your opinion. ...

How to notify web-module about job status performing in MDB (EJB3.0)?

Hi, folks. We are using Message Driven Bean to generate large reports and process durable tasks. How can MDB notify web-module f.e. session listener about job status without client poll? Thanks in advance. ...

Teracotta and Hibernate Search

Does anyone have experience with using Terracotta with Hibernate Search to satisfy application Queries? If so: What magnitude of "object updates" can it handle? (How's the performance) What kind of performance do the Queries have? Is it possible to use Terracotta Hibernate Search without even having a backing Database to sat...

Unit testing in JEE environment

We're migrating our application into a JEE container, and looking for tools to use for unit testing (and integration testing) our migrated app. Our requirements include: Ad-hoc testing: the ability to run tests manually, on demand (to be used by developers while developing code) Batch testing: the ability to run a large (and growing) s...

How can I perform programmatic authorisation with jBoss?

I have a Java web application bundled as a WAR. The application is deployed in jBoss 5.0.1. For historical reasons I am unable to use the built in authentication & authorisation specified via web.xml. Primarily this is because it isn't possible to specify the URLs that should be protected using web.xml's "web-resource-collection" elemen...

What are the Grails advantages over other Java Web Frameworks?

I've worked with JSF, Spring MVC and Struts and I think I got a good level on these frameworks. Recently I heard that many good developers I worked with are learning Grails and using it in their projects. What are the practical advantages of Grails over other frameworks? Is worth to learn it besides I know other frameworks? What is all ...

Using JXPath to Query a List

I have a simple class (for testing purposes) that I am trying to Query against using JXPath. I create a list of various animal objects, and I want to get an Iterator for: All Animals where type='CAT' All Animals where numLegs = 4 Here is the simple class: public class Animal { private UUID uuid; private int numLegs; ...

Preparing for a Java professional work environment before interviews

I recently graduated in Computer Engineering. I don't have a permanent job yet. The recession is making a good difference in my aim and reality. I don't want to just sit down. I want to sharpen my capabilities. I want to learn and practice in a professional work environment. Now my question is: What are the tools and practices followed ...

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...

Is J2EE required for Hibernate

Are the extra J2EE libraries required to run Hibernate standalone Java applications, or is the standard SDK sufficient? Thank you. ...

Seam 2.1.1: build using Maven 2?

I'm interested to move a project based on Seam 2.1.1 from Ant to Maven, to integrate some tools in the build process (like testability explorer and others) Question is: you recommend it? I've read (in the few sites with useful information about this subject) that is quite pain in the back to use Seam 2 with Maven, while others say is wo...

How can I get HttpServletRequest when in an HttpSessionListener?

How can I access request headers from a SessionListener? I need to set a timeout on the current session when it is created. The timeout needs to vary based on a header in the HttpServletRequest. I already have a SessionListener (implements HttpSessionListener) that logs the creation and destruction of new sessions, and it seems to be th...

Java Web Application Structure

Hi, I'm looking to implement a simple web-based application. The main reason I want to do it is to learn a bit about Java EE technologies, but I want to make sure that the approach I'm taking is sane. The application should allow someone to upload a file (initially an image, but will be video eventually). I will do some analysis on the...

How can I store JEE configuration parameters outside of an EAR or WAR?

I want to store configuration for a web project outside of the web project (ear/war file). The application shouldn't know in which container it's running (WebSphere/JBoss etc.). What is the best way to handle this? Is JNDI a clean way? If JNDI can solve my problems, how should I configure it? (Custom Objects?) In my case are there o...

Hot deploy on JBoss - how do I make JBoss "see" the change?

I am developing a Java EE application that I deploy over and over again on a local JBoss installation during development. I want to speed up the build by hot deploying my application straight into [JBOSS]/server/default/deploy/myApp It seems to work - but there also seems to be a somewhat arbitrary delay between the hard deploy and when...

How do I migrate ejb2 stateless session beans to ejb3 piecemeal?

The EJB3 spec indicates that EJB2 and EJB3 can co-exist in a single application. I wish to migrate my EJB2 stateless session beans to EJB3 stateless session beans. This question does not relate to JPA at all (that is a separate piece of work to be carried out in the future) I'm running on websphere 6.1 with the EJB3 feature pack instal...

What could be a reason of a big lag between exit from RESTeasy controller and enter into MainFilter

I have EJB RESTEasy controller with CMT. One critical method which creates some entities in DB works fine and quickly on single invocation. But when i try to invoke it simultaneously by 10 users it works very slowly. I've tracked time in logs and the most expanded place vs. single invocation is lag between exit from RESTeasy controll...

How can I customize my web.xml configuration

I'd like to deploy the same web application for a number of different customers. Each deployment needs a different value in one of the elements of the web.xml configuration file. Without building a different .war file for each customer (with the different values set in the web.xml in each .war), is it possible to configure the values fo...