[JBoss Portal] - Re: authorisation facilities access from within portlet
by radzish
Thank you for answer.
Unfortunatelly it is not enough for me. The problem is that I need to check permission of the current user for any PortalObjectNode instance from within my portlet (my custom navigation portlet).
Of course, I can invent my own security-role property of page/window and getting it from my portlet and then check permissions using isUserInRole functionality, but i would not like to reinnvent the wheel.
I believe that I can achieve my goal in the same way as it was implemented in org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.injectTabbedNav()
Bu, PageCustomizer has access to PortalAuthorizationManagerFactory, thus to PortalAuthorizationManager for permission checking.
>From within portlet I had retrieved this factory using following:
PortalAuthorizationManagerFactory pamf = (PortalAuthorizationManagerFactory) JMX.getMBeanProxy(PortalAuthorizationManagerFactory.class, "portal:service=PortalAuthorizationManagerFactory");
Factory and Manager seemed like got OK, but when I use checkPermission() method of the Manager,
org.hibernate.HibernateException: Unable to locate current JTA transaction
exception is thrown.
Do you have any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000371#4000371
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000371
19 years, 3 months
[JBoss jBPM] - Exception when calling jbpmcontext.save
by NiB
Hi,
I Get the following error when I call the following source
anonymous wrote :
| DEBUG [Services] executing default save operations
| DEBUG [HibernateSaveOperation] saving process instance
| DEBUG [SaveLogsOperation] ignoring logs. no logging service available.
| DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@4c03d4'
| DEBUG [JbpmContext] closing JbpmContext
| DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@1011f1f
| ERROR [STDERR] org.jbpm.JbpmException: no jbpm tx service configured
| [...]
| ERROR [Services] problem closing service 'persistence'
| org.jbpm.JbpmException: no jbpm tx service configured
|
org.jbpm.JbpmConfiguration jbpmConfiguration = org.jbpm.JbpmConfiguration.parseXmlString(
| "<jbpm-configuration>" +
|
| // A jbpm-context mechanism separates the jbpm core
| // engine from the services that jbpm uses from
| // the environment.
|
| " <jbpm-context>" +
| " <service name='persistence' " +
| " factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />" +
| " </jbpm-context>" +
|
| // Also all the resource files that are used by jbpm are
| // referenced from the jbpm.cfg.xml
|
| " <string name='resource.hibernate.cfg.xml' " +
| " value='config/hibernate.cfg.xml' />" +
| "</jbpm-configuration>"
| );
| org.jbpm.JbpmContext jbpmcontext =jbpmConfiguration.createJbpmContext();
|
| try {
|
| org.jbpm.graph.exe.ProcessInstance pi = jbpmcontext.newProcessInstance(processname);
|
| pi.getRootToken().signal();
| jbpmcontext.save(pi);
| } catch (Exception ex) {
| ex.printStackTrace();
| } finally {
| jbpmcontext.close();
| }
|
|
Why does that happen? Anyone an idea?
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000369#4000369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000369
19 years, 3 months