[JBoss Seam] - EntitySecurityListener and MDBs
by mtpettyp
I've just recently started using Seam's JBoss Rules support for securing entities and I've run into an issue. When one of my MDBs tries to write to the database, I get the following exception:
| java.lang.IllegalStateException: No active session context
| at org.jboss.seam.security.Identity.instance(Identity.java:157)
| at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:26)
| ...
|
This makes complete sense, as there obviously isn't a session context in an MDB.
Anyone have any ideas on how to work around this? Ideally I'd like to be able to turn off EntitySecurityListener when running in my MDB, but I can't see an easy way to do this. Each method of EntitySecurityListener checks the static method Identity.isSecurityEnabled(), but if I was to turn security off it would affect my entire application, which is not desirable.
I'd also like to be able turn off entity security for the duration of my authentication method (since I load the User entities to see if the passed-in credentials are valid, but would like to be able to protect access after logging in).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080036#4080036
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080036
16Â years, 10Â months
[JBoss Seam] Data access
by José Moreira
Hello,
how is it possible to encapsulate data acess / business logic with Seam?
most of the examples i have seen, for example,
query the entity manager directly from the "actions".
i was starting to code @stateless ejb's but had some compile errors and
i had to switch to @stateful.
--
Melhores cumprimentos,
José Moreira
16Â years, 10Â months
[JBoss Portal] - LinkageError when accessing to admin portal
by angelo.dangelo
Hi,
I'm using JBoss Portal 2.6.1 in bundle with AS 4.2.1 and Oracle 10 db.
I deployed my ear application, which contains (besides the WARs of my portlets) the following libraries:
- commons-validator-1.3.0.jar
- jakarta-oro-2.0.8.jar
- joda-time-1.4.jar
- jsf-facelets.jar (ver 1.1.12)
- jsf-portlet.jar (ver 1.2.1)
- tomahawk-1.1.6.jar
After visited my portlets, If I try to access to admin portal, clicking Admin link in the dashboard nav, I have this error:
| 15:27:04,828 ERROR [CommandServlet] Exception in command invocation
| java.lang.LinkageError: loader constraints violated when linking javax/faces/component/UIComponent class
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:242)
| at com.sun.facelets.compiler.ReflectionUtil.forName(ReflectionUtil.java:55)
| at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass(TagLibraryConfig.java:278)
| at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:205)
| at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
| ...
|
Could you, please, help me to solve this problem?
Thank you.
Angelo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080033#4080033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080033
16Â years, 10Â months