Questions tagged [container-managed]

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.

32 questions
39
votes
2 answers

When does @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) commit?

An EJB method named Aby calls another EJB method named Bob Bob is marked with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) When does bob transaction commits?: a) when bob invocation ends b) when aby invocation ends c) other. when?
SDReyes
  • 9,798
  • 16
  • 53
  • 92
4
votes
1 answer

How do i catch exceptions from container managed transaction commit?

I have a @Stateless EJB with a @WebService interface, using container managed transactions, meaning transactions are automatically committed by the container after a method has been called if it doesn't throw a system exception. If i try to…
Christoffer Hammarström
  • 27,242
  • 4
  • 49
  • 58
4
votes
1 answer

Update object and get old value via JPA

I want to log changes of an account. Therefore, I have created an entity class that shall log the changes. Each time, an account entity is saved or updated a logging object is created. When the object is updated with a new balance the old balance…
Jochen
  • 121
  • 1
  • 1
  • 5
3
votes
1 answer

Glassfish/Hibernate save without calling save explicitely

I am using Glassfish 2 and container managed persistence with Hibernate 3.2 as persistence provider. I have some finder method in my business logic, which manipulates some persistent entities, which have been fetched via the EntityManager. The…
micgn
  • 245
  • 1
  • 4
  • 14
3
votes
2 answers

How to retrieve username, password and roles from a database instead of retrieving them from tomcat-user.xml while using container-managed security

I have a web application which i deploy in Tomcat. I want to secure all pages under the url path administration/*. I have set up container-managed security entering the next snippet in the web.xml file:
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
3
votes
2 answers

Container managed auth, handle currently logged-in user

I have been digging through posts for too long now and getting dizzy, so I'm hoping one of the gurus here can help me with this. I'm using Container Managed Authentication and it's working well. I have my Realm setup to authenticate against, set up…
Stijn de Witt
  • 40,192
  • 13
  • 79
  • 80
3
votes
1 answer

Alternative ways to configure security constraints with container managed security outside web.xml?

if you use Java EE 6 container managed security, you can configure security constraints for resources inside the web.xml deployment descriptor. Are there alternative ways to do this? For example the container could fetch them out of a database, like…
c0d3x
  • 691
  • 5
  • 12
  • 19
3
votes
1 answer

When does @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) commit? - Follow up

See this link: When does @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) commit? How can B be the correct answer? I would thought that a method annotated with REQUIRES_NEW would commit before the outer, suspended transaction, continues.…
Mike
  • 443
  • 9
  • 26
2
votes
1 answer

Protected URLs leaking unprotected components of the webapge to unauthenticated users

I believe implementing security for a JSF application through ++ & through use of are two different ways !? Are they ? I tried implementing security through the first method above(using …
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
2
votes
2 answers

Weblogic 10.3: Webapp security using web.xml and DB roles inside WLS console

Scenario We are using Weblogic Server 10.3.4 to run our webapp which has security constraints enabled in order to require a user to sign in before he/she can use the application. The user and group information shall reside in the application…
Axel Knauf
  • 1,683
  • 1
  • 13
  • 18
2
votes
0 answers

Spring authentication against tomcat-users.xml

I've been given a requirement that an application must be configurable to use either LDAP or container-managed authentication. The LDAP requirement has already been fulfilled, but the container-managed, in this case the container is Tomcat, remains…
angusrose
  • 143
  • 1
  • 3
  • 13
2
votes
2 answers

Glassfish container managed database location

I have a glassfish container managed derby database that I can access using CRUD operations. I would like to access my derby database directly through the asadmin tool to view the tables. However, I cannot find my database. After researching this…
2
votes
1 answer

Container Managed Transactions can not rollback

I am playing arround with transactions. I configured JPA to handle my Entitys, and want to persist them in the database. The problem is, CMT will not rollback, when my program throws an runtimeException. The idea behind this "container thing" is so…
tsiegleauq
  • 21
  • 3
2
votes
1 answer

jboss ignores requires_new after restart

I’m using jboss and cmt and have seen strange behaviour when using requires_new on an ejb method that I loop over from another bean to insert some records. I see that intermittently after restarting the jboss the operations in the method aren’t…
Mike
  • 443
  • 9
  • 26
1
vote
1 answer

Does .NET 4.0 have something similar to Container-Managed Transactions from Java?

Sure, there is Transaction Scope, but is there also something like this: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction3.html
csharpnoob
  • 505
  • 1
  • 9
  • 24
1
2 3