java-ee

jee servlet to create a file and show progress while creating it

I need to write a servlet that will return to the user a csv that holds some statistics. I know how to return just the file, but how can I do it while showing a progress bar of the file creation process? I am having trouble understanding how can I do something ajaxy to show the progress of the file creation, while creating the file at ...

Suggestions for JMS Queue and Topic naming conventions

For larger JMS deployments what are your best practice suggestions for naming conventions? Currently we're following the suggestions in the Sun Developer Network Blueprints. For example: jms/<resource-name>[Queue|Topic] I am concerned about scaling this as we get more and more queues and topics in the system. I'm particularly interes...

Avoid using a DB for storing small set of data on a Java EE App

I have a small JSF app and would like to keep some state on the server, without using a DB. It will just be a small string for every user so I don't see the point in deploying an RDMS for that. ...

Can I use a single war file in multiple environments? Should I?

I have a Java web application at my work and I'd like simplify how we deploy to our DEV, QA, and PROD environments. The application reads in a series of properties at startup, and the properties files are different for dev, qa, and prod. Whenever I want to deploy to a certain environment I drop the environment-specific properties fi...

What are the differences between Servlet 2.5 and 3?

I'm rolling J2EE code that adheres to Servlet 2.5 and am wondering what the major differences are between 2.5 and 3. Pointers to official Sun docs and personal experiences most appreciated. If I shouldn't be concerning myself with 3 for the time being, just say so. Thanks! ...

Any decent weblogic tutorial?

Hi, We are migrating an application from Tomcat to WebLogic. There are many things we just don't know about. Is there any decent tutorial out there? We know about this but I'd like to read about experiencies, and/or processed information. Thanks in advance. ...

Problem Installing Java EE SDK From Wizard?

Upon fixing my earlier problem where, I uninstalled both, JRE AND Java EE, and then successfully reinstalled JRE, the problem started with installing Java EE, when, upon clicking the Java EE Installation .exe file, and waiting for a few minutes, (for the extraction of files to take place) the main Java EE 5 SDK Update 7 Installation Wiza...

What is a web-component in Java EE?

What does term 'web-component' mean in Java EE? Give me some examples from different Java EE technologies (jsp, jsf, ejb..) UPD: can I say that every custom tag in jsp is a web-component and that tags in jsf are web-components? or only servlets and whole jsp-pages are web components? is deployed session bean a web component? ...

Exclude entity bean attributes from hibernate query?

I'm new to this hibernate/jpa stuff so bear with me.. I've generated an entity bean and it works fine, but I would like to add some extra attributes to it and this causes hibernate to complain that the extra attributes aren't in the table's field list.. Is there a keyword to exclude these attributes from hibernate's query?? ...

Webservice protection against big messages

Hi! I am developing a WebService in Java upon the jax-ws stack and glassfish. Now I am a bit concerned about a couple of things. I need to pass in a unknown amount of binary data that will be processed with a MDB, it is written this way to be asynchronous (so the user does not have to wait for the calculation to take place, kind of...

How to Generate an ELContext without an active FacesContext?

I need to get access to EL functionality in a Servlet Filter, but... that means I am not within the FacesServlet lifecycle. Thus, I need to instantiate an ELContext. I do not want to go down the road of instantiating a FacesContext, since that may cause issues when the application does forward to FacesServlet. Suggestions? Thanks! ...

Connection Pooling in Java

Hello, I am trying to implement Connection Pooling in java.I have written one java code and one jsp file.When I run it on tomcat6.0.20,I got following error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null' on this line Connection conn = ds.getConnection(); ...

Glassfish doesn't load jdbc

I've a application in swing and ejb3 inside glassfish v2ur2 and until one week ago all was ok. in sometime, the glassfish never more load the jdbc driver of postgresql and the connection with the bd fail, but the jdbc driver is in the project and in the classpath. the only way to fix it was put the jar inside lib folder of glassfish doma...

Which J2EE web development framework to choose for a simple, accessible application?

Hi everyone, I want to write a simple web application, on J2EE, with these characteristics: I don't need any AJAX, and it should even work with JavaScript disabled on the browser. It is a simple CRUD application I would need full control on the way each element is laid out on the page - no compromise on the GUI's look and feel. I can ...

JNDI and javax.sql.DataSource

I'm someone that used to do some J2EE coding in the past and I'm coming back into the fold to work on a new J2EE project. A lot has changed since 2001, so I need to ask this very basic question. I'm using syntax like this in my database class: @Resource(name = "jdbc/MyDatabase") private javax.sql.DataSource dataSource; I understa...

Eclipse .classpath file. How to control server name entry?

I'm using Eclipse Galileo with a kind of well known plugins to develop Java Enterprise Applications. Now having a Java Project, Eclipse writes the following line to the .classpath file in the projects root folder: <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runti...

How do I convert an Ant Path into a FileSet?

I'm writing an Ant script to package a project into a WAR file. The software consists of several projects with their own source directories, libraries, etc. The WAR task has a nested element lib which I'm currently working on. I currently have a reference of the required libs as a Path (containing several FileSets, which I use in a clas...

Java EE6 over EE5 ?!

We are at the edge of getting Java EE6 (with Glassfish v3 as reference implementation). Planned release is December 09. While still quite a number of companies are struggling to move their codebase to EE5 (from earlier versions), we are in the luxurious situation to start development of a new product and could choose to do it with EE6 as...

JUnit View in Eclipse on OSX Snow Leopard

I recently purchased a mac and am trying to get junit tests working on Eclipse. I am using the latest Galileo, but for some reason there is no option to "run as junit" on the tests. What am I doing wrong? There's no JUnit view panel either. However I went into the "About Eclipse" thing and it said JUnit is installed. I also port installe...

afterTransactionCompletion not working

I created an hibernate interceptor : public class MyInterceptor extends EmptyInterceptor { private boolean isCanal=false; public boolean onSave(Object entity, Serializable arg1, Object[] arg2, String[] arg3, Type[] arg4) throws CallbackException { for(int i=0;i<100;i++){ System.out.println("Inside MyInterceptor(onSave) : "+entity....