Questions tagged [ejb-3.1]

This tag is used for question related to the session bean and message-driven bean component types of the EJB 3.1 programming model.

JSR 318: Enterprise JavaBeans, Version 3.1

Enterprise JavaBeans is an architecture for the development and deployment of component-based business applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and multi-user secure.

The Enterprise JavaBeans 3.0 specification focused on bringing ease-of-use to the EJB API. The purpose of the Enterprise JavaBeans 3.1 specification is to further simplify the EJB architecture by reducing its complexity from the developer's point of view, while also adding new functionality in response to the needs of the community.

The focus will be on the core session bean and message-driven bean component models and their client API. Although the Java Persistence API was developed within EJB 3.0, it will evolve under a separate JSR rather than within EJB 3.1.

1103 questions
0
votes
1 answer

Is it possible to configure multiple Timer EJBs

I have an EJB that uses the @Schedule annotation to perform some enterprise logic in a cron like manner. I am using JBoss 7.1 final. The problem is that this method is consuming messages from an AWS SQS service, in that API there is a restriction…
maxsap
  • 2,971
  • 9
  • 44
  • 70
0
votes
1 answer

EJB3 Singleton with HashMap vs JPA 2nd Level @Cacheable on Entity

I'm trying to determine which methodology for caching is better using an EJB3 Singleton session bean with HashMap or using 2nd level Caching with @Cacheable annotation on Entity.
Jason H
  • 51
  • 3
0
votes
1 answer

Java-EE6: What type of Session Bean to use as JMS topic provider?

I built a 3-tier application with MySQL 5.5, Glassfish 3.1.2 and a stand-alone Swing client (JRE 6_u32). I plan a GUI update service running on the Glassfish server, so that any user currently connected to the application server gets informed when…
salocinx
  • 3,715
  • 8
  • 61
  • 110
0
votes
1 answer

How to create scheduler in EJB3.1

I am new to EJB3 world. I want to create scheduler for file processing in EJB. I tried the following code.. package com.fks.nclp.ejb.scheduler; import javax.ejb.Schedule; import javax.ejb.Schedules; import javax.ejb.Stateless; @Stateless public…
Gunjan Shah
  • 5,088
  • 16
  • 53
  • 72
0
votes
1 answer

EJB3 security: how to track a logged in user?

I have a EJB 3 application as a service layer and a Tapestry 5 web application as its client. The EJBs should provide a session facade for use by the web app. To do the operations defined in the EJB layer, the user needs to log in trough the web…
Nefron
  • 699
  • 6
  • 11
0
votes
2 answers

Can I define a non final static field in ejb 3.1 singleton

According to EJB specs, non final static fields are not allowed. Is this still the case for an EJB 3.1 stateless session bean defined as singleton? Just to make things clearer and to prevent question like why you want to do it: I have a situation…
Tomer
  • 17,787
  • 15
  • 78
  • 137
0
votes
2 answers

JBOSS: EJB how to fix java.lang.reflect.UndeclaredThrowableException?

inside a bean I try to list all the articles with this method public List
listerLesArticles() { javax.persistence.Query req = manager.createQuery("select * from Article"); return req.getResultList(); } from a client when I call the…
chillo
  • 49
  • 3
  • 11
0
votes
1 answer

Caching read-only entity beans in EJB 3.1

How do I go about marking an entity bean (let us say that I have an "Country" entity bean which holds a record about a country that never changes) read-only on a Glassfish 3.1 with EJBs 3.1? There seems to be a way to mark column immutable, but…
bozo
  • 947
  • 1
  • 13
  • 33
0
votes
4 answers

Stateless Session Bean - Stopping Multiple Calls

So I read from this post from BalusC about how to stop a stateless session bean from continually thrashing a data store (e.g. DB) when accessed by JSF (which may/will make multiple calls) and so I've implemented my code in what I'd like to think is…
user573151
0
votes
2 answers

Adding an EJB to a web application in netbeans

I was following a tutorial on how to create a web application in netbeans using Java EE 6. The tutor added a new bean by just right clicking on the project name->new->session bean. When I tried to follow the same instruction, I didn't find the…
helpdesk
  • 1,984
  • 6
  • 32
  • 50
0
votes
1 answer

Message Queue for each Sender

I am using Glassfish 3.1.1 with an EJB 3.1 architecture combined with the smack library to process incoming XMPP packets. For this i have a thread started from a Singleton which processes my incoming packets. Packet packet =…
mkuff
  • 1,620
  • 6
  • 27
  • 39
-1
votes
1 answer

EJB Major Distinctions from other Technologies that perform the same function?

What are some major distinctions between EJB and the other technologies that perform the same function, and why is there such focus on the technologies that are, or are not supported, as opposed to other systems that refer to things such as…
Dan Chase
  • 993
  • 7
  • 18
-1
votes
1 answer

Asynchronous vs new Thread - Need help for a solution (Java)

I have a method which currently needs to return a result to the client no slower than it currently is. So it must call a method and forget about it, it should continue processing and not wait for that method to return any result. I have been…
Ken
  • 127
  • 2
  • 11
-1
votes
1 answer

JPA in EJB container vs. Web container

Is there any documentation / articles identifying best practices / rules for when should one use JPA in an ejb container vs. when is it appropriate to use JPA in a web container? At a high level - couple of things that I can think about is if we…
adbdkb
  • 1,897
  • 6
  • 37
  • 66
-1
votes
2 answers

best way to keep statistics for an EJB method for every cluster node

I have 2 clusters in websphere 8.5 and a frecvent used method in an Ejb 3.1 stateless bean. I want to use a timer that logs every hour the fail and success count and average execution time.It is not important to be very accurate. What is the…
dapi
  • 11
  • 4
1 2 3
73
74