tag:blogger.com,1999:blog-5874979429188093780.post4608551389082464579..comments2024-03-18T06:46:54.352+01:00Comments on Andrej Baranovskij Blog: JDeveloper 11g PS2 - getUserPrincipalName() Returns Anonymous in prepareSession() MethodAndrej Baranovskijhttp://www.blogger.com/profile/04468230464412457426noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5874979429188093780.post-31245389497442959722011-07-13T15:16:34.880+02:002011-07-13T15:16:34.880+02:00Thanks for fast reply, when You will write Your ne...Thanks for fast reply, when You will write Your new blog? When I can read it?<br /><br />Best regards, KristapsKristapsnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-47230487896591340762011-07-13T14:18:08.769+02:002011-07-13T14:18:08.769+02:00This is described in ADF Developer Guide, but I ca...This is described in ADF Developer Guide, but I can describe in my next blog with step by step.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-31484811250368286782011-07-13T13:54:07.900+02:002011-07-13T13:54:07.900+02:00Hi! How can I define a custom base class for all e...Hi! How can I define a custom base class for all entities and overriding the prepareSession method? Pleas explain step by step what to do?Kristapsnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-11332932453513220232010-05-31T14:08:45.266+02:002010-05-31T14:08:45.266+02:00Hi,
I didnt had chance to look into that particul...Hi,<br /><br />I didnt had chance to look into that particular patch.<br /><br />Probably you should raise request on Metalink.<br /><br />Regards,<br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-79653744836605283972010-05-31T13:25:19.451+02:002010-05-31T13:25:19.451+02:00Hi all,
thanks for your suggestions.
Do you have...Hi all,<br /><br />thanks for your suggestions.<br /><br />Do you have tested <br />FIX 11.1.1.3.1A from metalink bug id 9546149?<br />I have not found the patch on support.oracle.com ;-(- ASK -noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-17602608986893654382010-05-03T21:18:58.453+02:002010-05-03T21:18:58.453+02:00Hi Don,
Thanks for update, thats very important t...Hi Don,<br /><br />Thanks for update, thats very important to know.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-17676362295792005902010-05-03T20:53:39.571+02:002010-05-03T20:53:39.571+02:00This bug affects the writing of user name for enti...This bug affects the writing of user name for entities defined with history columns. The history column gets set to anonymous. I fixed this by defining a custom base class for all entities and overriding the prepareSession method to set it from the adf context. <br /> @Override<br /> protected void prepareSession(Session session) {<br /><br /> if ("anonymous".equals(session.getEnvironment().get(PropertyMetadata.USER_PRINCIPAL.getName()))){<br /> session.getEnvironment().put(PropertyMetadata.USER_PRINCIPAL.getName(),ADFContext.getCurrent().getSecurityContext().getUserName());<br /> <br /> }<br /><br /> super.prepareSession(session);<br /> }<br />}<br /><br />This worked everywhere except in our log-in bean, immediately after logging in when it wrote the login history. I had to specifically get the app module for that one and set the logged in user using the same technique.Don Kleppingernoreply@blogger.com