- 
        1. Re: Storing lastUpdatedBy for database update historyschmidts Jul 22, 2004 4:01 PM (in response to danl_thompson)Check out the "audit" element in http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd and see if "updated-by" and "updated-time" is what you are looking for. 
 As you stated, Entity Beans need to be put in a JAAS security domain to make this make - otherwise you cannot retrieve the principal.
- 
        2. Re: Storing lastUpdatedBy for database update historydanl_thompson Sep 3, 2004 4:24 PM (in response to danl_thompson)It looks like the "audit" element would certainly work, but I've been at it all day, and I can't seem to figure out the right combination of xdoclet tags to get it to run without throwing exceptions. 
 My web container is already running under java:/jaas/myLogin
 Because of this and because I know that the EJB container runs in the same JVM, the EJB container SHOULD automatically use the same domain as the web container. But even so, I must add a securitydomain attribute to my ejbdoclet 's <jboss tag. which then ends up in the jboss.xml. This in order to get clean deployment.
 Next I've added the audit tags to my EJB as follows:
 * @jboss.audit-created-by
 * field-name="createdBy"
 * column-name="CREATED_BY"
 * @jboss.audit-created-time
 * field-name="createdTime"
 * column-name="CREATED_TIME"
 * @jboss.audit-updated-by
 Clean deployment, but accessing the bean by an authenticated web user results in:
 No method permissions assigned to method=create, interface=HOME
 So next I've added an @ejb.permissions unchecked="true" in some vague and hopeless attempt to get some permissions assigned... but this seems to have no effect on the ejb-jar.xml
 So I'm lost as to what the next steps should be.
 Any help, anyone can provide would be appreciated.
 dt
- 
        3. Re: Storing lastUpdatedBy for database update historydanl_thompson Sep 3, 2004 5:06 PM (in response to danl_thompson)I'm sorry it is @ejb:permission not permissions 
 and while it does add a method-permission area as follows:
 <method-permission >
 <![CDATA[description not supported yet by ejbdoclet]]>
 <![CDATA[description not supported yet by ejbdoclet]]>
 <ejb-name>MyTest</ejb-name>
 <method-name>*</method-name>
 </method-permission>
 the same error shows up...
 javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
 No method permissions assigned to method=create, interface=HOME
 so... I still need some help.
 dt
 
    