java-ee

Exposing multiple objects with RMI in Spring

How do I expose multiple objects with RMI using Spring? I start with what is written here. What if I want to expose more objects, must I declare another instance of RMIServiceExporter? ...

What's the point of JAAS

What's the point of JAAS if I have to write my own {whatever}LoginModule and everything else? ...

EJB3 - handling RollBackExceptions

Hi all, I have an EJB3 application which consists of some EJB's for accessing a DB, and exposed via a Session Bean as a web service. Now there are two things I need to find out: 1) Is there any way I can stop SQL exceptions from causing the web service from throwing a SOAP Fault? The transactions are handled by the container, and curr...

Changing JAAS roles based on software license flags

I've got a pretty ordinary JEE application running on JBOSS. It uses the JBoss DatabaseLoginModule JAAS authentication. It also has application layer users/roles in Hibernate that are exactly the same. I've got an idea ( which I think is pretty useful for me, anyway) to have a capability bit I can set in the software license object (not...

Writing Simple and Efficient Database Custom ORM Code in Java

I have a Java object that I want to store in a local in-memory database. The Object has a One-Many FK relationship, otherwise it has 20 or so Integer/String/Enumerated fields. I would like to avoid using a framework. Even though the objects themselves are not very large, there will be a large amount of these objects being inserted/u...

Java web start w/ SSL deployed in Glassfish

I've been trying to set up SSL for our Java EE application clients deployed in Glassfish (with Java web start), but after some reading I reached this page: Does someone has any experience trying to achieve the same thing as me? I've also considered JBoss, but Glassfish works really neat with Netbeans etc, and we really don't want to cha...

Open source survey/questionnaire engine for Java

Is there an open source survey engine for java that will allow branching of questions? i.e. Question 1 has the options of A, B, or C and they each take you to a different set of follow-up questions. I've found a couple (JSurveyLib and Socrates QE), but those seem to be very tied to a GUI. The application that I'm writing has a java bac...

Can Jython replace Java?

So many server side and the mobile Java applications use the native Java language for Java. Can we use Jython instead to build the enterprise applications, e.g. websites, application servers etc. Also what do you feel about Java ME applications in Jython. P.S. Comments on question also welcome. ...

Are Enterprise Java Beans still useful when compared to Spring?

I have an upcoming project in a class that will allow me to work with either EJBs or Spring, and I was wondering what would be more applicable for "real world" situations. ...

Java Web Application: How to implement caching techniques?

I am developing a Java web application that bases it behavior through large XML configuration files that are loaded from a web service. As these files are not actually required until a particular section of the application is accessed, they are loaded lazily. When one of these files are required, a query is sent to the webservice to retr...

How do I authenticate an application client to EJB 3.0 server

I am very new to the whole J2EE architecture. Could somebody help me out? I have a Swing client with Login, Password fields on machine A. Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); p.put(Conte...

Message Driven Bean Selectors (JMS)

I have recently discovered message selectors @ActivationConfigProperty( propertyName="messageSelector", propertyValue="Fragile IS TRUE") My Question is: How can I make the selector dynamic at runtime? Lets say a consumer decided they wanted only messages with the property "Fragile IS FALSE" Could the consumer change the s...

How do you get glassfish to show debug information for JSPs?

I'm switching from Tomcat to Glassfish for an app server. Glassfish is so much more complicated its a little overwhelming. Anyway now I'm getting an exception: java.lang.NullPointerException at org.apache.jsp.jsps.login_jsp._jspService(login_jsp.java from :67) Where tomcat shows you the line number and gives me some information on ...

Hot Deploy for JBoss on Eclipse 3.4: Ganymede

Hello, I am using Ganymede (Eclipse 3.4) to do some Java EE based web development targeting a JBoss 4.2 application server. I have always liked Eclipse very much for a Java editor. The thing is, for Java EE is not as useful as one might think. It's buggy, deployment and debugging is very slow, and you have to re-deploy your Java EE ap...

JPQL createQuery throws illegalArgumentException

The following simple code throws exception: entityManager.createQuery("SELECT c FROM Customer c"); But if I write entityManager.createNativeQuery("SELECT c.* FROM Customer c", Customer.class) then it works without any error. What might be wrong? I use GlassFish v2.1 with Toplink-essentials. ...

Hibernate, iBatis, JEE or other Java ORM tool

We're in the process of planning a large, enterprise application. We're focusing our efforts on evaluating hibernate after experiencing the pains of J2EE. It looks like the new JEE API is simpler. I've also read some good things about Hibernate and iBatis. Our team has little experience with any of the frameworks. There are 5 main co...

Terracotta + Compass = Hibernate + HSQLDB + JMS?

I am currently in need of a high performance java storage mechanism. This means: 1) I have 10,000+ objects with 1 - Many Relationship. 2) The objects are updated every 5 seconds, with the most recent updates persistent in the case of system failure. 3) The objects need to be queryable in a reasonable time (1-5 seconds). (IE: Give me...

Advice on handling multiple ear deployments into jBoss

We have a typical J2EE application: ear war A war B domain jar datasource config ejb.jar EJBs JPA config We use jBoss as our J2EE container. The same application must be deployed multiple times into the same container (in order to support different independent customers). This is proving to be a troublesome and error prone task s...

Can I dynamically unload and reload (other versions of the same) JAR?

Hello! I am writing a server program which is used to run unit tests of an API (displaying lots of information and providing web access to control / monitor the whole thing)... This API is known to the server during compile time and is provided as a JAR. To be able to compare between unit test results of different versions of the API ...

Is there a good comparison between ASP.NET, Java Enterprise Edition, and other "enterprise" platforms?

I've been Googling with little success, getting mostly marketing from Microsoft and Sun, backing their respective platform. Does anyone know if a resource that takes a good look at Java Enterprise Edition, ASP.NET, and any other major enterprise platforms? ...