java-ee

Options For A Common Service in Weblogic.

I am working on a weblogic application farm that is hosting a few dozen applications. I would like to build a common application that will do lookups from a database. I need my program to be accessable to the other applications on the farm. So, my question is, What are my options for getting my data to the other application? Should I ma...

JSF 2.0: Validate equality of 2 InputSecret Fields (confirm password) without writing Code?

I'm developing a pure JavaEE6 application with JSF 2.0 and Glassfish. My JSF implementation is Primefaces (beside Mojarra provided by Glassfish). I want to verify if the values of 2 password fields in a JSF form are equal. With Seam, there is the neat component <s:validateEquality for="pw1"/>. I want do to the same without Seam, just us...

How do I make "simple" throughput servlet-filter?

I'm looking to create a filter that can give me two things: number of request pr minute, and average responsetime pr minute. I already got the individual readings, I'm just not sure how to add them up. My filter captures every request, and it records the time each request takes: public void doFilter(ServletRequest request, ...() { ...

Java EE app with PostGis hosting issue

Hello all I developed a web app that runs on tomcat 5.5 and needs PostGIS. It's been very difficult to find a hosting solution for these requirements. Is out there any professional hosting companies that can handle this hosting. (I say so because hostjava which i have payed already cannot install PostGIS) Any other suggestions? ...

Choosing approach for an IM client-server app

Update: totally re-wrote this to be more succint. I'm looking at a new application, one part of which will be very similar to standard IM clients, i.e text chat, ability to send attachments, maybe some real-time interaction like a multi-user whiteboard. It will be client-server, i.e all traffic goes through my central server. That mean...

Dealing With Java Default Level Access Specifiers

I've seen some code in a project recently where some fields in a couple classes have been using the default access modifier without good reason to. It almost looks like a case of "oops, forgot to make these private". Since the classes are used almost exclusively outside of the package they are defined in, the fields are not visible fro...

How to access the Principal from a Java service object without using FlexContext?

We're building some Java objects that are exposed via BlazeDS to our flex client application. So basically the BlazeDS messagebroker servlet instantiates and invokes methods on these objects in response to client requests. Works great. We're using app server-based authentication and have set up a security constraint on the <destination...

Are @ManagedBean's obsolete in JavaEE6 - because of @Named in CDI/Weld?

Because of CDI (and its implementation Weld), every POJO in JEE6 can be annotated with @Named, which makes the POJO accessible to the view. Does that mean that ManagedBeans are completely obsolete now? Or do i miss something where @ManagedBean still makes sense? ...

Tools available for debugging production Issues in Java applications

Hello, Just wondering what are various tools & techniques out there to debug production issues on Java applications. Like, What are the ways and tools to take thread dumps? What are the ways and tools to take heap dumps? What are the tools to analyse the above dumps? (Assumption all are in Linux/Unix environment) ...

Looking for Simplified Overview of EJB3

Hi I'm looking for a simplified overview of EJB3 components. I seem to understand most of the pieces of the puzzle, but can't quite get them to fit together in my brain as a full picture. I've developed numerous web applications (wars) that have been deployed on Tomcat before, but not a full-fledged EE application (ear). I would like ...

Can i never reference any external 3rd party jar in my independent ejb module?

Hello, Can we never refer any external 3rd party jar in independent ejb module (except copying the jar file in our appserver/lib)? This seems so illogical doesn't it? I don't want to create a Enterprise application. Why am i being forced to create an Enterprise application if i have to use any jar files? Are there no alternatives avail...

EJB 3 Session Bean Design for Simple CRUD

I am writing an application that's sole purpose in life is to do CRUD operations for maintaining records in database. There are relationships between some of the tables/entities. Most examples I've seen for creating session beans deals with complex business logic/operations that interact with many entities which I don't have. Since my...

Is JavaEE6 (embedded)container implementations available for experiments?

Is javaee6/ejb3.1 implementation available from openejb? Is javaee6/jpa2.0 implementation available from openjpa? I am trying to evaluate javaee6 and ejb3.1 and jpa2.0 with maven as a build tool; so trying to find the maven artifacts for it. Please suggest Any opensource javaee6 embedded container full implementation . ...

Talking J2EE 1.4 with JEE 5

Is it possible to use Enterprise Bean from JEE 5 server application in client application written in J2EE 1.4. What about difference in interfaces in this two technologies? ...

Build a JPA application with Netbean 6.8 and Glassfish v3

I am trying to learn JPA, and Sun tutorial on JPA ("order" application) is hard to understand. The tutorial does not show me how the mapping between JPA and the actual Datasource, and does not explain various annotation they used in the tutorial. I did some google search and I did not find any thing good and basic. Does any of you know a...

Do Java web-server apps have any way to PUSH?

Web-servers work in response to incoming HTTP requests... process the request and return an HTTP response. Are there any common ways that a server can PUSH data to clients in this architecture... e.g a request comes in from client1 and the server wants to notify client2? It can obviously be done by a non-web server, using sockets, but wh...

Tomcat secured static content

Hello guys, I'm making a service that among other has the "photo albums" feature that serve photos to users. User has to be "allowed" to see the photo from the album. So sending the direct link to other person shouldn't allow to view photo. Photos are stored in the folder outside of the context. What I need to do is to perform some c...

Can you add an additional entrypoint to servlet web-apps?

Imagine you have a standard java web-app using plain servlets, or SpringMVC, or whatever. You also want (for whatever reason) a way to talk to the server not using HTTP - I'll use direct sockets as it's the easiest example I can think of. Writing a web-app is easy, you have servlets acting as entrypoints. Writing a java app which monito...

ValidationException class version mismatch

I have a simple EJB application that I can deploy and test on a local WebLogic instance (v10.3.0.0) without problems. I need to deploy this on a remote WL server (v10.3.3.0), and test it from a local machine. Deployment is successful, but when I try to run any of the clients from JDeveloper, I get this error: <2010.06.02. 16:08:36 CEST>...

Out of Memory When Loading Java Entities

I have a terrible problem that hopefully has a very simple answer. I am running out of memory when I perform a basic If I have code like this: MyEntity myEntity; for (Object id: someIdList) { myEntity = find(id); // do something basic with myEntity } And the find() method is a standard EntityManager related method: public My...