CMA is a technology within the Java Servlet Specification that takes care of authentication and role-based access to pages or sections of the web-app as specified by URL patterns.
Questions tagged [container-managed]
32 questions
1
vote
7 answers
Help me make this code exception-safe
So I have this library code, see...
class Thing
{
public:
class Obj
{
public:
static const int len = 16;
explicit Obj(char *str)
{
strncpy(str_, str, len);
}
virtual void…

ceo
- 1,138
- 1
- 8
- 16
1
vote
0 answers
Container Managed Transactions - Asynchronous method calls
The below is my requirement:
1. An MDB receives a message
Triggers a asynchronous method in another session bean - asynchronous because this method will be a long running thread and we don't want to hold the MDB thread for long time. The…

Sanjeev
- 119
- 4
- 18
1
vote
1 answer
Transaction mixing in Java EE ( container-managed beans method called inside bean managed method )
couldn't find any kind of relevant information besides useless tutorials on the internet as well as in the specs.
There's one thing that I struggle with right now, if you can please help.
Here's the thing.
lets say we have two EJB version 3.0 with…

sheeva
- 11
- 3
1
vote
0 answers
Issue with Container managed transaction (openJPA + Spring + WAS 8.5)
I am facing an issue with the injection of EntityManager to DAO without using @PersistenceContext.
I am working on an application that has two EntityManagerFactories one which use a jndi datasource and another which uses a jdbc datasource. I have to…

n611
- 11
- 5
1
vote
1 answer
Setup JSF application on JBoss 7.1
I want to deploy a working JSF appliction (Tomcat 7.0.34) on JBoss 7.1 I have configured the datasource so far, which is working. But I have troubles by setting up the container managed authentication. By calling the index.xhtml, all items are…

My-Name-Is
- 4,814
- 10
- 44
- 84
1
vote
1 answer
JSF Tomcat container managed authentication plus additional login button
I am currently expanding my JSF website. I use Tomcat container managed authentication mechanism (works well, user is forced to login before accessing protected area), and now I want to provide an additional login button.
With the login button I…

My-Name-Is
- 4,814
- 10
- 44
- 84
1
vote
1 answer
How to achieve pagination without writing Query in JPA?
I have a Question object which has List of Comment objects with @OneToMany mapping. The Question object has a fetchComments(int offset, int pageSize) method to fetch comments for a given question.
I want to paginate the comments by fetching a…

Samik
- 575
- 2
- 8
- 19
0
votes
1 answer
Java Container Managed Security Not Redirecting to Login Page
I have a JSF 2 web application I am building on GlassFish 3. I am using container managed security to handle the login. Every page in my web app needs to be secure. All pages are in the root directory along with the login page. The problem is when I…

Adam
- 4,590
- 10
- 51
- 84
0
votes
1 answer
Some CMT and BMT doubts in EJB?
when using CMT in session beans where do we commit the transaction?
With REQUIRES_NEW attribute Container creates a new transaction and the callers transaction is suspended
Just get better understanding of REQUIRES_NEW , does it achieve the above…

M Sach
- 33,416
- 76
- 221
- 314
0
votes
1 answer
How to update more than one object at a time using a JPA OneToMany relationship?
I have Principal and PrincipalRoles entity classes. They have a bi-directional “parent-child” relationship defined like this:
Principal has:
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH},…

Jorge Campins
- 413
- 1
- 4
- 11
0
votes
0 answers
How to change the status of container managed transaction which is marked for rollback
@Singelton
class A {
@Resource
private TrsnactionSynchronizationRegistry tsr;
@TransactionAttribute(TransactionAttributeType.Required)
method () {
// here tsr.getTransactionStatus() is 0 means active
EntityClass entity = new…

pvjhs
- 549
- 1
- 9
- 24
0
votes
1 answer
How welcome page works when using JDBC Realm?
When setting up JDBC Realm we specify the form-login-page which loads at first for authentication. If it occurs first, how the welcome file specified in web.xml loads? Will JDBC Realm redirect to welcome file when login is success?

Sidath Asiri
- 359
- 4
- 18
0
votes
0 answers
Hash+Salt Passwords using Container Managed Authentication/Authorization
I created a JSF web application using container-managed authentication and authorization. I defined security constraints, security role(s), and the FORM log-in config; I provided the code below for how I defined all these parameters. Everything…

Immer Alexis
- 23
- 1
- 5
0
votes
2 answers
(OpenJPA/WAS) How to use the Container Managed Authentication for the Container Managed Entity Manager
Objective
To understand how to configure WAS or OpenJPA to use the Container Managed Authentication with the Container Managed Entity Manager.
Issue
Trying to access the Oracle database via the JDBC Datasource registered in JNDI as "jdbc/DB2" (it…

mon
- 18,789
- 22
- 112
- 205
0
votes
1 answer
Bean Managed MDB and Database exceptions
I have a Bean managed MDB -InvoiceInquiryMessageBean with the following definition which calls a CMT - InvoiceManager which performs database operations.
The MDB is explicitly mentioned as Bean managed and the onMessage() has a transaction…

user3491141
- 53
- 8