java-ee

What's your "best practice" for the first Java EE Spring project?

I'm currently trying to get into the Java EE development with the Spring framework. As I'm new to Spring, it is hard to imaging how a good running project should start off. Do you have any best practices, tipps or major DO NOTs for a starter? How did you start with Spring - big project or small tutorial-like applications? Which technolo...

How can I override an EJB 3 session bean method with a generic argument - if possible at all?

Suppose you have the following EJB 3 interfaces/classes: public interface Repository<E> { public void delete(E entity); } public abstract class AbstractRepository<E> implements Repository<E> { public void delete(E entity){ //... } } public interface FooRepository<Foo> { //other methods } @Local(FooRepository....

Are there any studies comparing JEE vs. .NET?

I've been tasked with the awesome responsibility of trying to document the advantages of using JEE for a web app over .NET. Of course via Google I am mostly getting back blog posts on how an Int is an object in Java, or a list of code comparisons. No real hard evidence or numbers. Is anybody aware of any legitimate studies trying to pro...

Are there any alternatives to Gigaspaces?

Anything thats as good and as stable and as feature-rich as gigaspaces? ...

JSF Lifecycle and Custom components

There are a couple of things that I am having a difficult time understanding with regards to developing custom components in JSF. For the purposes of these questions, you can assume that all of the custom controls are using valuebindings/expressions (not literal bindings). Although I'll gladly upvote those who give good explanations on...

data 'security' with java and hibernate

Hi there, The system I am currently working on requires some role-based security, which is well catered for in the Java EE stack. The system intends to be a framework for business domain experts to write their code on top of. However, there is also a requirement for data 'security'. That is, what information is visible to an end user. ...

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

Tomcat vs Weblogic JNDI Lookup

The Weblogic servers we are using have been configured to allow JNDI datasource names like "appds". For development (localhost), we might be running Tomcat and when declared in the <context> section of server.xml, Tomcat will hang JNDI datasources on "java:comp/env/jdbc/*" in the JNDI tree. Problem: in Weblogic, the JNDI lookup is "app...

Is there a simpler way to deploy to WebSphere?

I have seen this question about deploying to WebSphere using the WAS ant tasks. Is there a simpler way to do this? In the past I have deployed to Tomcat by dropping a war file into a directory. I was hoping there would be a similar mechanism for WebSphere that doesn't involve calling the IBM libraries or rely on RAD to be installed on...

JEE SqlResultSetMapping Syntax problem?

I have the following Java 6 code: Query q = em.createNativeQuery( "select T.* " + "from Trip T join Itinerary I on (T.itinerary_id=I.id) " + "where I.launchDate between :start and :end " + "or ADDDATE(I.launchDate, I.equipmentPullDayOfTrip) between :start and :end", "TripResults" ); q.se...

Mixing EJB 2.x BMP entity beans with Hibernate 3.x

I have a large application that uses EJB 2.x entity beans (BMP). This is well-known to be a horrible persistence strategy (I can elaborate if necessary). I'd like to start migrating this application to use a much more expressive, transparent, and non-invasive persistence strategy, and given my company's previous experience with it, Hibe...

What is the best place to store a configuration file in a java web application (war) ?

I create a web application (war) and deploy it on Tomcat. In the webapp there is a page with a form where an administrator can enter some configuration data. I don't want to store this data in an DBMS, but just in an xml file on the file system. Where to put it? I would like to put the file somewhere in the directory tree where the appl...

Hosting control panel with JEE Application Server support?

I currently have WHM/cPanel on my server, but it doesn't integrate properly with any JEE App Server. I installed Tomcat manually, and have made it work through Apache, but the configuration is more fragile than I'd like. So, I'm trying to find a replacement where a JEE App Server can be properly integrated & managed. Requirements: Open...

Which EJB 3 persisent provider should I use?

I are using EJB 3 on a fairly large J2EE project, by default with Netbeans sets the persistent provider for the entity beans to TopLink. There is the option to change the provider to one of the following or even add a new persistence library: Hibernate KODO OpenJPA Which persistence provider do you prefer to use? What are the benefit...

Most important problem solved by EJB 3?

The scenario You have developed a webapp using EJBs version 3. The system is deployed, delivered and is used by the customer. If you would have to rewrite the system from scratch, would you use EJBs again? No: Don't answer this question, answer this one instead. Yes: Provide one important, real problem that EJBs solved, based on yo...

EJB3 Transaction Propogation

I have a stateless bean something like: @Stateless public class MyStatelessBean implements MyStatelessLocal, MyStatelessRemote { @PersistenceContext(unitName="myPC") private EntityManager mgr; @TransationAttribute(TransactionAttributeType.SUPPORTED) public void processObjects(List<Object> objs) { // this method ...

what is j2ee/jee?

OK stupid question but... I realize that literally it translates to java 2 enterprise edition. What I'm asking is what does this really mean? when a company requires j2ee experience what are they really asking for? experience with ejb's? experience with java web apps? I suspect that this means something different to different peopl...

Are EJB still alive ?

Do you still use session or entity EJB in your project ? Why ? ...

Servlet for serving static content

I deploy a webapp on two different containers (Tomcat and Jetty), but their default servlets for serving the static content have a different way of handling the URL structure I want to use (details). I am therefore looking to include a small servlet in the webapp to serve its own static content (images, CSS, etc.). The servlet should ha...

What is the default session timeout for a Java EE website?

If I do not specify the following in my web.xml file: <session-config> <session-timeout>600</session-timeout> </session-config> What will be my default session timeout? (I am running Tomcat 6.0) ...