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

JAAS microservice authentication

I am trying to design a JAAS microservice which handles user authentication for multiple J2EE applications. Currently we have multiple applications which authenticate against our LDAP and have seperate role-systems. Now I am stuck at designing the…
calaedo
  • 313
  • 1
  • 3
  • 15
2
votes
1 answer

EJB instance variables thread safety

As per my understanding, stateless EJB thread safety comes from the fact that concurrent requests to the same SLSB will be served by different intances of that particular bean, each one with it own instance variables. For example if a stateless…
GionJh
  • 2,742
  • 2
  • 29
  • 68
2
votes
1 answer

Arquillian tool implementation for EJB unit testing

I am working on a unit test implementation for an EJB module. I am using EJB 3, JBoss 7, Java EE 7 and JTA. I am using Arquillian for the EJB unit test. I am facing some issues while configuring arquillian for the EJB unit test. Here is my unit…
Awadhendra
  • 355
  • 2
  • 10
  • 34
2
votes
0 answers

How to pass client Locale to remote EJB Bean via JNDI

I have a problem regarding the localization of custom bean validation exceptions like ConstraintViolationException that are thrown at remote EJB Beans. The JSF web application uses german locale and calls remote EJB Beans of an EAR that runs at…
djmj
  • 5,579
  • 5
  • 54
  • 92
2
votes
0 answers

How do I change callerPrincipal from EJB timer?

My EJB timer always runs with UNAUTHENTICATED user. I tried to put @RunAs but did not work. I tried to change the value with reflection and did not work, I need call a remote EJB from this and I need a user that has permission. @Resource private…
Gustavo Rozolin
  • 1,070
  • 2
  • 13
  • 21
2
votes
2 answers

Wildfly - Infinispan Transactions configuration

I am using Wildfly 8.2 with its included Infinispan (6.0.2) and I am trying to cache all values from some Oracle database table in an Infispan cache. In most cases, it seems to work, but sometimes it does not. When accessing the cache.values()…
user140547
  • 7,750
  • 3
  • 28
  • 80
2
votes
0 answers

EJB injection fails in custom ConstraintValidator on JPA persist

I have a problem with my JSF/JPA/Bean Validation app. Custom constraints annotating (JPA) entity fields don’t function correctly on JPA pre-persist although they work fine during JSF form validation Environment: NetBeans IDE 8.0.2 / GlassFish Server…
NickJI
  • 466
  • 3
  • 12
2
votes
1 answer

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.
Filip
  • 573
  • 5
  • 19
2
votes
1 answer

@Specializes for EJB

I'm trying to specialize an EJB. I have package com.foo.core; @Stateless public class MyFacade { } and package com.foo.extension; @Specializes @Stateless public class MyFacade extends com.foo.core.MyFacade { } In my opinion, this should work,…
Ben
  • 447
  • 4
  • 13
2
votes
1 answer

java.lang.NullPointerException at com.sun.ejb.codegen.EjbOptionalIntfGenerator.generateSubclass(EjbOptionalIntfGenerator.java:280)

So I was using EJB to create users in DB. It worked. So after that I made a profile page that user can change. Unfortunately I'm hit with an NPE because the EJB can't load. So I've another @Stateless class and that I pretty much copy pasted to…
Ced
  • 15,847
  • 14
  • 87
  • 146
2
votes
1 answer

How is an EJB stateful session bean passivated to secondary storage

I have read for stateful session bean: "While in the ready stage, the EJB container may decide to deactivate, or passivate, the bean by moving it from memory to secondary storage" So what is this secondary storage? Is it the underline database?…
Harshana
  • 7,297
  • 25
  • 99
  • 173
2
votes
2 answers

NamedQuery resultList returning objects, but all values are null

I have a table in database with these columns: id serial NOT NULL, name character varying(255) NOT NULL, url character varying(255) The Entity: @Entity @Table(name = "Topmenu") @XmlRootElement @NamedQueries({ …
Erates
  • 646
  • 1
  • 9
  • 24
2
votes
2 answers

How do I stop/start EJB Apps in JBOSS 6.0 from the command line

If I use the web based administrative console for JBOSS, I can navigate to Applications - EJB2 JARs and see a list of deployed EJBs. By clicking on one of these, I get a page that allows me to start and stop the selected EJB. However, I cannot…
Brett McCann
  • 2,469
  • 2
  • 27
  • 44
2
votes
0 answers

Configure http basic auth on EJB web service in Wildfly

I work with Glassfish and in glassfish-ejb-jar.xml I'm able to secure ejb exposed web service like this (http basic auth) Command Command
Sava
  • 142
  • 1
  • 9
2
votes
1 answer

EJB failure to update datamodel

Here my EJB @Entity @Table(name = "modelos") @NamedQueries({ @NamedQuery(name = "Modelos.findAll", query = "SELECT m FROM Modelos m"), @NamedQuery(name = "Modelos.findById", query = "SELECT m FROM Modelos m WHERE m.id = :id"), …
Ignacio Garat
  • 1,536
  • 6
  • 24
  • 48