Questions tagged [ejb]

Enterprise JavaBeans (EJB) is a managed, server-side component architecture for modular construction of enterprise applications. The EJB specification is one of several [Java] APIs in the [Java EE] specification.

Enterprise JavaBeans (EJB) is a managed, component architecture for modular construction of enterprise applications which runs on an . The EJB specification is one of several APIs in the specification.

See also and

Tutorials

JBoss 4 EJB 3 Tutorial

JBoss 5 EJB 3 Tutorial

Video Tutorials

EJB Video Training

Reference :

Wikipedia

Oracle

6693 questions
2
votes
1 answer

shutdown threads using managedexecutorservice after stipulated time

I have a list of threads that need to be executed simultaneously. I was doing this using executorservice initially. The threads that need to be executed are coming from DB and I am retrieving their classnames, storing them in vendorDetails list. for…
wib
  • 425
  • 3
  • 17
2
votes
2 answers

@Asynchronous private method in EJB

I have an asynchronous method in my EJB singleton that's called from another method in the same class. I already know that I can't call the asynchronous method directly, I have to obtain an EJB proxy. The problem is, I don't want the asynchronous…
Mike Baranczak
  • 8,291
  • 8
  • 47
  • 71
2
votes
1 answer

EJB3 Stateful session bean for login and shopping cart and change template

Hello every body now I work with shopping cart, I wonder use between Stateful session beans or HTTP session for cart or login. Everybody have any ideas? In Stateful Session bean how to do compare state for item id, if it equals I will add to item…
Kency
  • 660
  • 5
  • 15
  • 30
2
votes
3 answers

ClassNotFoundException deploying webservice on Weblogic 10.3 with Hibernate

I have a project with a EJB implementing a JWS Webservice, like this: @Stateless @Remote(WebServiceTest.class) @WebService( serviceName="TestService", name="TestName" ) public class WebServiceTestImpl implements WebServiceTest { @Override …
Vinicius
  • 1,060
  • 1
  • 12
  • 21
2
votes
1 answer

How to define Remote EJBs Beans in Spring using annotation-based configuration (ie: JavaConfig)

I'm trying to figure out the best way to define Remote EJB 3 beans in Spring 4.x using JavaConfig (annotation-based configuration). I've looked at the Spring Docs for and have hacked together a functional configuration, but it is…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
2
votes
2 answers

Injecting @Stateful or @Stateless into @Singleton EJB

I have a @Singleton EJB, in which I inject another EJB which is not Singleton (it is either @Stateless or @Statefull). E.g. @Singleton public class MySingleton { @EJB MyStatefulBean statefulBean;//this is stateful! public void…
amihaiemil
  • 623
  • 8
  • 19
2
votes
2 answers

Wildfly Form Auth fails when using special characters

We are deploying our GWT app to a Wildly 8.1.0 server and are using form authentication for security. Our problem is that every time our customer has a special character (æøåäëö, etc.) in their username or password, they cannot login. I have seen…
Rasmus Nielsen
  • 411
  • 1
  • 4
  • 18
2
votes
1 answer

Is it a bad design for a EJB to depend on FacesContext?

Would it be better, for example, to pass context.getExternalContext().getRequestLocale() to the EJB by parameter, instead of using an import and getCurrentInstance from inside the EJB? import…
The Student
  • 27,520
  • 68
  • 161
  • 264
2
votes
2 answers

Cannot deploy JavaEE application to Glassfish 4.1

I am using Netbeans 8.1, MySQL Server, Glassfish 4.1, Eclipselink as JPA-provider, Jersey as JAX-RS provider and tried to deploy the following simple procedure: Setup of Glassfish 4.1 with a MySQL connection pool and a data source Generated a…
salocinx
  • 3,715
  • 8
  • 61
  • 110
2
votes
1 answer

how to read all date from PostgreSQL with array field jpa/hibernate ejb

i had problem to read all date from db PostgreSQL and jpa/hibernate ejb my table has array field see below : @Entity public class MyTable{ private Long id; private String name; private String[] values; @Type(type =…
ehsan sha
  • 83
  • 2
  • 9
2
votes
1 answer

CDI: beans.xml not used in an EJB project during integration testing with Arquillian

I'm trying to create a Java EE 7 project with explicit CDI. The project is packaged by Maven as an ejb project. Despite Java EE 7 not requiring beans.xml anymore, I have one such file, located under src/main/resources/META-INF/beans.xml, as I want…
Silver Quettier
  • 2,045
  • 2
  • 26
  • 53
2
votes
1 answer

Should we always close javax.naming.InitialContext at client side of JBoss app?

When we create a new InitialContext for remote access to Enterprise Java Beans, after work is done, should we always close the context via context.close() ? Here is a code sample: // Client side method private void doSomeActionMethod() { …
PeterB
  • 2,234
  • 6
  • 24
  • 43
2
votes
1 answer

Why Stateful and Stateless beans behave in opposite way?

I created Stateful, Stateless and singleton bean classes and trying to access them two different servlet. And running project on JBoss server. When I access Stateful bean from each servlet two different bean object will be created and different…
2
votes
1 answer

Will a stateless session be used by another thread if there is an asynchronous method still running?

As far as I know, no two threads can use a stateless session bean at the same time. In my case, I have two stateless session beans. In the second bean I have an asynchronous method. This method will be called from the first bean. My doubt is, will…
Krishna Chaitanya
  • 2,533
  • 4
  • 40
  • 74
2
votes
0 answers

Inject EJB - not required

I'm still new with EJB and i have an injection issue. I'am using the @Stateless annotation to create stateless beans. And I inject this beans by using the @EJB annotation. All works fine! Then I did a new project setup. I have a common ejb project,…
user3227576
  • 554
  • 8
  • 22