Questions tagged [ejb-2.x]

This tag is used for question related to the session bean and message-driven bean component types of the EJB 2.x programming model. For questions about the persistent entities defined in the document "Java Persistence API" of the EJB 2.x specification, use the [JPA] tag.

This tag is used for question related to the session bean and message-driven bean component types of the EJB 2.x programming model. For questions about the persistent entities defined in the document "Java Persistence API" of the EJB 2.x specification, use the [JPA] tag.

240 questions
1
vote
1 answer

CMP 2.0 bean auto-generated primary key WAS 6.1

is it possible to map bean's key field with identity primary key column in DB2? Sample table: CREATE TABLE ADDRESS ( ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 INCREMENT BY 1 …
grzegorz_p
  • 483
  • 1
  • 4
  • 14
1
vote
0 answers

Translate JPQL query to plain SQL

I have a problem in my ejb java application .. and trying to solve it I stumble on this issue. in my ejb class, I have a finder method /* @ejb.finder signature="java.util.Collection findByAllMultiPlan()" * *…
Dima R.
  • 995
  • 2
  • 14
  • 25
1
vote
1 answer

How to obtain UserTransaction in websphere8.5.0.0?

I had deployed my EJB application in Websphere 8.5.0.0 server but while starting it I am facing below exception: **CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getABCMethod" on bean…
C. Dev
  • 11
  • 2
1
vote
1 answer

Why I am getting ClassCastException when accessing EJB 2.1 in Wildfly 8.2.1?

I am working with Java 1.7, XDoclet 1.2.3, WildFly 8.2.1.Final, Dynamic Web Module 2.5, EJB 2.1 in Eclipse Luna. I have an Enterprise Application project named P001_EAR. I have a Dynamic Web Project named P001_WAR. I have a EJB Project named…
ChumboChappati
  • 1,442
  • 4
  • 18
  • 38
1
vote
1 answer

Why Eclipse is not allowing me to select EJB Client JAR for a 2.1 EJB Project?

My environment is Java 1.7, Eclipse Luna, WildFly 8.x, XDoclet 1.2.3, Windows 7. I want to create a new EJB 2.1 project using XDoclet. I went to Java EE Perspective. Select File --> New --> EJB Project to open "New EJB Project" window. For the…
ChumboChappati
  • 1,442
  • 4
  • 18
  • 38
1
vote
1 answer

Should I use PortableRemoteObject.narrow() for EJB 2.1 session bean in wildfly

I'm using EJB 2.1 stateless session bean in wildfly 9. TestService testServiceLocal = (TestService) context.lookup("java:app/WildEarEJB/TestService!in.hinote.ejb.TestService"); testServiceLocal.someMethod(); While the above code works, but I was…
Sahid
  • 100
  • 1
  • 1
  • 11
1
vote
0 answers

MQ Queue transaction not rolled back in a 2 phase transaction

I have an EJB timer (EJB 2.1) which has bean managed transaction. The timer code calls a business method which deals with 2 resources in a single transaction. One is database and other one is MQ queue server. Application server used is Websphere…
1
vote
0 answers

How to refresh EJB 2.1 entity bean after changes made by JDBC in the same transaction?

I am working with following code, with mixed EJB 2.1 entity beans and JDBC operations done in a single container-managed transactions in Weblogic WLS 11g: Entity e = entityHome.findByPrimaryKey(entityId); e.setFieldX(initalValueX); // this performs…
tporeba
  • 867
  • 10
  • 23
1
vote
1 answer

EJB3 annotations get ignored when ejb-jar.xml is present

I have an application that currently consists of EJB 2.1 Session Beans. I want to transport them to EJB 3.1 annotations where possible. Unfortunately that is not possible for all so I need to maintain the ejb-jar.xml file for the ones where I can't…
Angelo Fuchs
  • 9,825
  • 1
  • 35
  • 72
1
vote
2 answers

Unable to get a EJB business object

I have a situation where I need to call methodB() of an EJB from methodA() of the same EJB, with a new transaction starting in methodB(). I read on some threads that getting a reference to the EJB…
Sahil Dave
  • 353
  • 1
  • 11
  • 25
1
vote
1 answer

Wildfly migration from 8.2 to 9 CR1

I'm trying to migrate our project from Wildfly 8.2 to 9, and using version 9.0.0 CR1. One of the problems I faced is with old EJB2 code. While in 8.2 everything works fine, in 9 I get ERROR [org.jboss.as.ejb3.invocation] (MSC service thread 1-2)…
dds
  • 2,335
  • 1
  • 31
  • 45
1
vote
1 answer

how EJB Life cycle methods are invoked

Can some one explain on how typical sessin bean's life cycle is and who hadle those?
Kumar
  • 11
  • 1
1
vote
1 answer

Passing method parameters from EJB3 to EJB2 is not happening

I have EJB3 and EJB2 bean. I am calling a method which is there in EJB2 from EJB3 bean. Below is the code in EJB3 bean. private EJB2ServiceRemote getEJB2Bean() { if (EJB2ServiceRemote == null) { EJBHomeAttributes EJB2Service = …
user2488578
  • 896
  • 4
  • 21
  • 40
1
vote
0 answers

Using ANT, identify if its EJB2 or EJB3

We have a build server which is today building ejb2 and ejb3 applications but we now have a requirement to identify if a given project is a EJB2 or EJB3 then based on that we need to perform some validations. Can anyone let us know how can this be…
1
vote
1 answer

How to access EJB 2.0 using a standalone program

I am developing EJB 2.0 project using Eclipse and Jboss AS. The below are the code samples: Component interface: package com.example.ejb; import javax.ejb.*; import java.rmi.RemoteException; public interface Advice extends EJBObject { public…
CuriousMind
  • 8,301
  • 22
  • 65
  • 134