____________________________
My ejb-jar.xml
<?xml version="1.0"?>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>EMailContact</ejb-name>
<home>com.ls.dialog.ejb.email.EMailContactHome</home>
<remote>com.ls.dialog.ejb.email.EMailContact</remote>
<ejb-class>com.ls.dialog.ejb.email.EMailContactBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.ls.dialog.ejb.contact.ContactPK</prim-key-class>
<reentrant>False</reentrant>
<resource-ref>
<res-ref-name>jdbc/oraclePool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
<session>
<ejb-name>EMailManager</ejb-name>
<home>com.ls.dialog.ejb.email.EMailManagerHome</home>
<remote>com.ls.dialog.ejb.email.EMailManager</remote>
<ejb-class>com.ls.dialog.ejb.email.EMailManagerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<resource-ref>
<res-ref-name>jdbc/oraclePool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>EMailContact</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>EMailManager</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
_________________________
My JBoss.xml:
<?xml version="1.0"?>
<jboss>
<resource-managers>
<resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
<res-name>oraclePool</res-name>
<res-jndi-name>oraclePool</res-jndi-name>
</resource-manager>
</resource-managers>
<enterprise-beans>
<entity>
<ejb-name>EMailContact</ejb-name>
<jndi-name>EMailContactHome</jndi-name>
<resource-ref>
<res-ref-name>jdbc/oraclePool</res-ref-name>
<resource-name>oraclePool</resource-name>
</resource-ref>
</entity>
<session>
<ejb-name>EMailManager</ejb-name>
<jndi-name>EMailManagerHome</jndi-name>
<resource-ref>
<res-ref-name>jdbc/oraclePool</res-ref-name>
<resource-name>oraclePool</resource-name>
</resource-ref>
</session>
</enterprise-beans>
</jboss>
____________________________
Here EMailManager is the session bean where getCallerPrincipal is OK.
>From EMailManager function i calling function of entity bean EMailContact and here
>getCallerPrincipal returns null.
Thanks for help in advance
D&D
On Wed, 14 Feb 2001 11:55:03 -0800, Scott M Stark wrote:
>Post your ejb-jar.xml and jboss.xml configs.
>
>----- Original Message -----
>From: Darius Davidavicius
>To: jBoss
>Sent: Wednesday, February 14, 2001 7:24 AM
>Subject: [jBoss-User] getCallerPrincipal() == null
>
>
>Hello,
>
>I have downloaded the last source from VCS.
>I have the same problem i had few weeks ago.
>I do calling session bean and from the session bean i do calling entity bean.
>In the session bean callerPrincipal name is corrent but in the entity bean it is NULL.
>
>Few week ago i was using such work around:
>
>org.jboss.security.SecurityAssociation.setPrincipal( )
>
>public void setPrincipal( Principal principal ){
>this.principal = principal;
>this.beanPrincipal = null;
>SecurityAssociation.setPrincipal(principal);
>}
>
>any sugestions why it happens?
>i do using default Jboss configuration.
>
>
>Darius Davidavicius
>
>
>
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>List Help?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]