ejb

simple EJB jar deployed in jboss with its own log4j configuration

I have a simple EJB jar with a stateless session bean, deployed in JBOSS AS 4.2.2, under <JBOSS_HOME>/server/default/deploy. The bean is registered under JNDI tree as viewed from jboss jmx console and I am able to access it through a remote java client outside JBOSS. Inside EJB jar, I have added some logging to be written to a separate ...

How to propagate spring security login to EJBs?

Context I have a J2EE application running on a JBoss 4.2.3 application server. The application is reachable through a web interface. The authentication is done with basic authentication. Inside of the EJBs I ask the security context of the bean for the principal (the name of the logged in user) and do some authorization checks if this u...

Weblogic 10.3 EJB2 Deployment Problem

Exception preparing module: EJBModule(Basic.jar) Unable to deploy EJB: Basic.jar from Basic.jar: There are 1 nested errors: weblogic.utils.compiler.CodeGenerationException: Error in RDBMSCodeGenerator.generateCmrGetterMethod: weblogic.utils.compiler.CodeGenerationException: Exception: 'java.lang.NullPointerException' while trying to invo...

Accessing an EJB deployed on websphere community server using Open EJB?

How can I access an EJB deployed on websphere community server using Open EJB? I'm trying to use code like the following but am not sure what to use for a URL. Note I've tried port 2809 and 1099 with ejb: and IIOP URL prefixes. Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY,"org.ap...

Java singleton VO class implementing serializable, having default values using getter methods

Hi All I have a J2SE application having user threads running in a separate JVM outside JBOSS server. During startup, J2SE invokes a EJB inside jboss, by passing a new object(singleton) of simple JAVA VO class having getter/setter methods. {The VO class is a singleton and implements serialiable(as mandated by EJB)}. EJB receives the ob...

How do I write a J2EE/EJB Singleton?

A day ago my application was one EAR, containing one WAR, one EJB JAR, and a couple of utility JAR files. I had a POJO singleton class in one of those utility files, it worked, and all was well with the world: EAR |--- WAR |--- EJB JAR |--- Util 1 JAR |--- Util 2 JAR |--- etc. Then I created a second WAR and found out (the hard w...

Running websphere community server example on Websphere 7.0?

I've downloaded the Websphere community server examples and gotten them to compile and run with Maven. I'd like to run these on Websphere 7.0. When trying to deploy the calculator example to Websphere 7.0 as an ear file I get the following error. Getting Error executing deployment: java.lang.NoClassDefFoundError. Error is com.ibm.ws.ast....

JBoss, exploded jar vs compact jar.

Hi, I am working on Java 1.6, JBoss 5.1, EJB 3, and Hibernate 2. Every time I deploy the ear, if the jar is a compact one (non-exploded), application doesn't work. However when I explode the jar and then add it to the ear, the app works fine. Tried restarting Jboss, doesn't help. The ear refers to numerous external jars; would the orde...

Can it be important to call remove() on an EJB 3 stateless session bean? Perhaps on weblogic?

I'm in the process of migrating an EJB 2 application to EJB 3 (and what a satisfying task it is to delete all those deployment descriptors!). It used to run on Weblogic and now runs on Glassfish. The task is going very smoothly, but one thing makes me wary: The current code takes great care to ensure that EJBObject.remove() is called on...

How to access session bean in EJB

Hi! I'm new to ejb. I've created the session bean in one computer. And i want to access that session bean from the another system. How to do this? Thanks in advance :-) ...

Strange problem with SEAM stateful session bean

Hi, I've got a stateful session bean. @Scope(ScopeType.SESSION) @Name("chuckNorrisBean") public class ChuckNorrisBean implements Serializable, ChuckNorris with some function public void roundHouseKick() { ... } interface @Local public interface ChuckNorris { public void roundHouseKick() { ... } } and cal...

How to call session bean from jsp

Hi! I'm new to ejb. Actually I've created one ejb and I added reference to a web application which will call the session bean simply. How to call the session bean from the jsp file? ...

Java: Tracking a user login session - Session EJBs vs HTTPSession

If I want to keep track of a conversational state with each client using my web application, which is the better alternative - a Session Bean or a HTTP Session - to use? Using HTTP Session: //request is a variable of the class javax.servlet.http.HttpServletRequest //UserState is a POJO HttpSession session = request.getSession(true); Us...

Spring/EJB 3 books?

Ok so I'm a complete beginner when it comes to Spring and EJB and I really want to change it, the problem is I can't find any single book on Spring 3/EJB 3, everything is about 2 (for Spring/EJB) or 2.5 (for Spring). What are the differences between 2.x and 3? Should I just go with the 2.x books and then google the differences? I was thi...

"Local transaction already has 1 non-XA Resource: cannot add more resources" error

After reading previous questions about this error, it seems like all of them conclude that you need to enable XA on all of the data sources. But: What if I don't want a distributed transaction? What would I do if I want to start transactions on two different databases at the same time, but commit the transaction on one database and ro...

How to provide business logic in spring in an remote server?

Using Spring as Framework, if i need provide business logic's service to either JSP/Servlets(on Web Servers) or to Application desktop client or Mobile clients, the only way to accomplish the logic business(without EJB) in a remote server is through Servlets? ...

java.lang.VerifyError during ejb method call

Hi, When I try to call a method from a local ejb I have this error : java.lang.VerifyError: com/pwc/lu/ejb/hcfollowup/staff/HCFStaffManagerLocal.getPersonById(Ljava/lang/Integer;)Lcom/pwc/lu/mapping/hcfollowup/hibernate/global/Person; HCFStaffManagerLocal is my local interface and getPersonById an ejb method. Person, the result typ...

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