java-ee

Jaxws notifications

Hi, Could you please help in the following? Is there an acceptable design guideline to implement WS Notification Messaging in java? My scenario is the following: a web service client makes a web service call to a web service. After that, the web service should be able to send asynchronous notifications to the web client (as a result of...

Can I make arbitrary classes "injectable" in Java EE?

I'm working on a large legacy application using stateless session beans that has recently been migrated from EJB2 to EJB3, and I'd like to use dependency injection. Unfortunately, in a (IMO misguided) attempt to achieve decoupling, all actual business logic lies in "manager" classes to which the session beans forward their calls. Those m...

Refresh data in stateless EJB

Is there a function which is called every time an EJB is looked up? I need to refresh some data before any method is called. ...

Java: Difference betwen UserTransaction and EntityTransaction

Title says it all: What is the difference between a UserTransaction and a EntityTransaction? My rudimentary understanding is that UserTransaction is used when JTA is required (e.g. to do queries on mulitple things), and that EntityTransaction is used when JPA only is required (e.g. when the query is atomic). Is that the only difference...

How m2eclipse create a new domain by maven-glassfish-plugin?

version is glassfish v3 I want to trying maven-glassfish-plugin but I don't know how to create a new domain . Plz step by step say me,thx. And I want to looking pom.xml,thx ...

Why i create a new domain isn't existed master password

I used maven-glassfish-plugin create a new domain but file isn't existed master-password? Why? Command is glassfish:start-domain. My pom.xml declares the following: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <ver...

What is core difference between Java for Google App Engine and J2EE?

What is core difference between Java for Google App Engine and J2EE? (I am not familiar with Java at all so can you please explain me what is diference in general and in what to learn is better for resume) ...

How to make ActionBean be instantiated immediately but not after I call one of handlers?

I'm trying to make something simple with Stripes. I've read and heard a lot about easiness of using this framework and about steep learning curve (i.e. learning is quite fast and productive). But till this moment I can't even create the simplest HelloWorld with Stripes. All examples I've found demonstrate functionality like: "click on...

Maven-glassfish-plugin can't use <adminPassword> tag?

settings.xml I define to: <profile> <id>GlassFishv3</id> <activation> <activeByDefault>false</activeByDefault> <property> <name>glassfish.version</name> <value>3</value> </property> </activation> <properties> <glassfish.home>E...

Stable, open-source Servlet 3.0 container

Are there any JSR-315-capable servlet containers available besides the one in GlassFish 3? Neither Tomcat nor Jetty have stable versions that support the Servlet 3.0 API. ...

Publishing EJB's local interface in weblogic

Hi, is there a way to lookup an EJB in weblogic if it implements only local interface? If I use this @Remote public interface TestSessionRemote { public void businessMethod(); } @Stateless(mappedName = "A") public class TestSessionBean implements TestSessionRemote { public void businessMethod() { } } the EJB can ...

EJB Dependency Version Conflict in Sun Application Server

To summarize the issue I'm encountering, I have an EJB which uses version A of a library (let's call it dep-vA.jar). dep-vA.jar is packaged in the root of the EJB's jar file. The domain lib folder in the application server contains version B of the same library (let's call it dep-vB.jar). When calling the EJB, I get an error due to dep-v...

Can we use both Stateless and Stateful session beans in a J2EE application ?

Is it good way to use both Stateless and Stateful session beans for the different modules if the requirement demands ? ...

Which exceptions kills your web application in java

I have a web application which needs to do some checking before user is allowed to use the application. I want to throw some kind of exception that undeploys or kills the the web application if these checks fails, however I am not sure if there are any exceptions I can throw that kills the web application RuntimeException()? or if I have...

Using an application managed connection pool in a JEE application server

Is it safe to run a database connection pool (like Commons DBCP or c3p0) as part of an application deployed to an application server like Glassfish or Websphere? Are there any additional steps over a standalone application that should be taken to ensure safety or performance? Update, clarification of reason - the use case I have in mi...

Struts 2 Error Handling - How do I get the stackTrace and exception attribute?

Hello, I'm working with Struts2 and I'm having an issue with it's error handling mechanism. What I would like to do is to get the stackTrace and exception attributes in order to use it inside an action class (as for printing on the console) or inside a JSP page (without using taglibs). Bellow there is a snippet of my struts.xml file: ...

CDI - conditional installation

Hi all, I have several components which are application scoped. Depending on which environment I am in, I want to install one or the other. In JBoss Seam, I would use @Install(false), then configure the bean that I wanted through components.xml. Is there a similar method for doing this in CDI / WELD? Thanks, Walter ...

Application.xml vs sun-application.xml

Hi, I'm developing a JSF2 application using Glassfish which contains some EJB's; is there a reason I should use sun-application.xml versus the standard application.xml file? I would like to deploy my application as an exploded EAR. Do I need to do anything special with the application xml configuration? Thanks in advance! ...

'Immediate' window for IntelliJ

Hello, I'm using IntelliJ 9 and I'm curious if there is any IntelliJ equivalent of the Visual Studio 'immediate' debug window. There is ALT-F8 to evaluate an expression, but what I'd like to be able to write code in a window that interacts with what I am currently debugging (if that's even possible). Having breakpoints that log messag...

JPA: Persistence a One-To-Many Relationship

I am using Java EE 6. Just want to throw it out there first Here is the relationship. A customer can have multiple facility Here is Customer Class @Entity public class Customer { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @OneToMany(cascade=CascadeType.ALL) @Jo...