ejb

How to configure EJB lookup in clusterd websphere environment.

Hello, I'm developing a EJB client. The EJB (2.1) server in deployed as Websphere 6.0 cluster. I'm doing the jndi lookup after acquirement of the InitialContent object for specific ip address using the following code: Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTIORY,com.ibm.websphere.naming.WsnInitialContextFac...

How can you get the calling ip address on an ejb call?

If a java client calls a remote EJB on a different server, how can you get the client IP address? Note that it is important to get it from the server, because the client is likely behind a NAT firewall, and in this case we need the public IP address. NOTE: Although it would preferably be a generic solution, at a minimum I could use one ...

Why does EclipseLink think my database schema doesn't exist?

I'm working on a web project using EJB 3.0, and whenever EclipseLink tries to interact with the database, it says that the schema I'm using doesn't exist (which it does). I get a massive, unhelpful stack trace from GlassFish 2.1, which begins with: EclipseLink, version: Eclipse Persistence Services - 1.1.0.r3639-SNAPSHOT file:/C:/Docu...

Session Bean doesnt work

I have Session and want to load DATA from an InfoHolder Class .. called Benutzer but it doesn't Work ! /* * SessionBean1.java * * Created on 21.06.2009, 16:03:41 */ package egispartnerprofile; import com.sun.rave.web.ui.appbase.AbstractSessionBean; import group52.infoholders.Benutzer; import javax.faces.FacesException; /** * <p...

.NET - vs EJB

What is the comparable technology of EJB (Enterprise Java Beans) in .net? ...

How to start a background Process in j2ee

Hi I want to start a background process in a j2ee (OC4J 10) envronment. It seems wron to just start a Thread with "new Thread" But I can't find a good way for this. Using a JMS queue is difficult in my special case, since my parameters for this method call are not serializable. I also thought about using a onTimeout Timer Method on a...

What clustering solutions are available in .NET?

As a kind of follow on to this question, what specific services are available for .NET that allow clustering in .NET similar to what is available in (Session) EJBs. The answer to the other question focused on the remote method invocation and transaction management of EJBs, but what about clustering for fail over and scalability purposes?...

How to make a java project from a Websphere ear work with JPA

Hi, I have an EAR installed in Websphere 6.1. Development is done in Eclipse, but using a simple Java project and updating the *.java and *.class files directly to the server. I want to start using JPA, but the @Stateless annotation gives the error "cannot be resolved to a type". What am I missing? Thank you for your time, Iulia ...

Static Conenction Object Issue

I am creating a web service using j2ee. this webservice is hitting DB to insert/update data. We are using Connection drivers to eshtablish connection to database. When we launch this web service and tested it, we got a Memory Leak issue and hence the transaction failed. The folliwng is the error message we obtained: "Memory allocation fa...

EJB vs Spring + POJO

What advantages does EJB have to be stacked with Spring? Why couldn't I just use Spring Entity Manager, Security, and POJOs to do what EJB does? ...

Deploying multiple versions of same EJBs and classes to same JBoss server

I have a few separate application projects (EARs) with multiple EJBs that I want to deploy to the same JBoss server. Now, some of the projects may have the same EJBs, but different versions. In similar circumstances, some projects may use different versions of the same "ordinary" classes (i.e. classes loaded within VM, without JNDI looku...

Do you really need stateless session beans in this case?

We have a project with a pretty considerable number of EJB 2 stateless session beans which were created quite a long time ago. These are not the first-line beans which are accessed from our client via RMI, rather they are used by that code to perform specific functions. However, I've come to believe that there's nothing to be gained by h...

Java PropertySheets

I have a java program that will work with a variety of Java Beans. I'm interested in displaying a "property sheet" that will show the fields and methods for the bean from BeanInfo and/or reflection. It could also update the information from the bean. Is there a built-in way of creating these property sheets? I was thinking something ...

POJO vs EJB vs EJB 3

Does anyone have any example of what a Java Class might look like as a POJO, EJB, and EJB 3? I'm trying to understand these java technologies but am having trouble. I was hoping it would help if I could see what an implementation of all three would look like. ...

Where to fit in Jasper Reports - front end or business ?

Hi there, I am trying to use Jasper Reports (v3.5.2) to generate and print reports in PDF/HTML to the browser for a webapp. This webapp already uses JSF(Woodstock) for the front end and EJB 3 (with JPA and Hibernate as persistence provider to a MySQL db). My question is - where should the code for generating the Jasper based reports be...

Maven EAR module and EJB dependencies tests

We are building our EAR & EJB projects with maven. It will build all the EJB projects and then they are used as the dependency for EAR, so they are packed into the EAR file eventually. The problem is that each EJB project has junit tests that check the EJB. For now these tests are not very useful because they try to connect to applicati...

Calling an Enterprise bean method

Here's my Bean class source @Stateless(mappedName="StringVal") public class NewSessionBean implements NewSessionRemote { String val = null; public String stringChange(int parameter) { while(parameter < 5){ switch (parameter){ case 1: System.out.println(val + "One" + ","); case 2: System.out.println...

quick way to add default method permissions for all EJBs specified in ejb-jar.xml

Like the title says, I have a valid ejb-jar.xml. However, for it to be JEE compliant, method permissions need to be present for all beans specified in the file. There are about a couple of hundred beans (I know!, don't even ask) so this is going to be horrible to do manually. Anyone out there have a neat way of doing this (automaticall...

EJB Factory Class

Hi all I'm trying to create an EJB factory class, which works like this: You have a method which takes as argument a class of an EJB, then it checks whether the EJB has a remote interface (if not throw an exception) and if it does, it returns the concerning EJB. The code below does exactly this. However the object it returns is of the ...

Java Component based vs Request based frameworks

I was recently asked in an interview - In java, how do you compare component based frameworks to request based frameworks? I explained EJB as an example of Component based framework and Struts as a request based framework but was not convinced if I did justice to the question. Any ideas on what interviewer meant and what should have bee...