Skip to content

Commit 5e78d67

Browse files
gautamshettypauljervis
authored andcommitted
BAEL-717: Singleton Session Bean. (eugenp#4046)
* BAEL-717: Singleton EJB Bean Files for BAEL-717:Singleton EJB Bean. * BAEL-717: Singleton EJB Bean Corrected Indentation. * BAEL-717: Singleton EJB Bean Corrected Indentation. * BAEL-717: Singleton EJB Bean Corrected Indentation. * BAEL-717: Singleton EJB Bean Corrected Indentation. * BAEL-717: Singleton EJB Bean Changed artifactId value. * BAEL-717: Singleton EJB Bean. Added module for Singleton EJB Bean. * BAEL-717: Singleton EJB Bean. Removed Singleton EJB Bean Module. * BAEL-717: Singleton EJB Bean Changed the JNDI Lookup name. * BAEL-717: Singleton EJB Bean. Added the "singleton-ejb-bean" module. * BAEL-717: Singleton EJB Bean. Corrected Indentation. * BAEL-717: Singleton EJB Bean Corrected Indentation. * BAEL-717: Singleton EJB Bean. Corrected Indentation. * BAEL-717: Singleton EJB Bean. Corrected Indentation. * BAEL-717:Singleton EJB Bean. Corrected Indentation. * BAEL-717:Singleton EJB Bean. Corrected Indentation. * BAEL-717: Singleton Session Bean. Added class for Bean-Managed concurrrency. Changed class name from CountryStateCacheBean to CountryStateContainerManagedBean. * BAEL-717: Singleton Session Bean. Changing the name of the class to CountryStateContainerManagedBean. * BAEL-717: Singleton Session Bean. Added method to test Bean-Managed concurrency. * Get Latest. * deleting CountryStateBeanManagedBean for new file. * deleting CountryStateCacheBean for new file. * deleting CountryStateContainerManagedBean for new file. * BAEL-717: Singleton Session Bean. Adding file for Bean with Bean-Managed concurrency. Changing file name for original file to CountryStateContainerManagedBean with Container-Managed concurrency. * Deleting file for new checkin. * BAEL-717: Singleton Session Bean. Added test case for Bean-Manged concurrency. Change in JNDI names. * BAEL-717: Singleton Session Bean. Changed the assert method parameter order and null check in test cases. * BAEL-717:Singleton Session Bean Removed volatile keyword for the variable countryStatesMap. Marking it as final.
1 parent fa74f05 commit 5e78d67

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎spring-ejb/singleton-ejb-bean/src/main/java/com/baeldung/singletonbean/CountryStateBeanManagedBean.java‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import javax.annotation.PostConstruct;
99
import javax.ejb.ConcurrencyManagement;
1010
import javax.ejb.ConcurrencyManagementType;
11-
import javax.ejb.Lock;
12-
import javax.ejb.LockType;
1311
import javax.ejb.Singleton;
1412
import javax.ejb.Startup;
1513

@@ -18,7 +16,7 @@
1816
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
1917
public class CountryStateBeanManagedBean implements CountryState {
2018

21-
private volatile Map<String, List<String>> countryStatesMap = new HashMap<String, List<String>>();
19+
private final Map<String, List<String>> countryStatesMap = new HashMap<String, List<String>>();
2220

2321
@PostConstruct
2422
public synchronized void initialize() {

0 commit comments

Comments
 (0)