[JBoss jBPM] - Re: Chapter 17. Security
by trofimov
"tom.baeyens(a)jboss.com" wrote : currently this is not moving very hard because lack of user input. the more precise you can describe what kind of security checks you want to specify in your processes, the faster we can start implementing them.
|
| our main question is what type of assertions do we need to build in. to do that, we need a broad overview of use cases. preferrably concrete.
Ok.
I have two nodes: node1, node2.
And I have two users whith actorId = "user1" and "user2".
User1 have permission on signal node1, user2 - on node2.
When user1 is executing signal of node1 they will must recive error (for example) "Access denied".
Currently, user1 can execute signal nodel1.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965489#3965489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965489
19 years, 9 months
[JBoss Seam] - Design Question and Seam/JSF question
by jkrupka
I'm still working on my extension of the Seam CRUD app. I've been able to do everything I needed to so far, but have ran into a snag. My immediate question is how can you see the JSF outcome after hitting a button on a page? I think I know what it is, because of where the page flow goes, but it's not what I expected. I have it in debug, and the first time i hit that button it stops at my breakpoint, I can see what happens, and it proceeds normally. When i navigate back to this page by way of a button on the new page, then hit that same button, it skips my breakpoint that is in that action method for that button and goes to an unexpected page - I can't find what it's doing!
The design question I have is this - my CRUD app is for 3 tables, table A is the parent, B is the child of A, and C is the child of B. I was playing with this to see how I could pass the key fields from A to B, and from B to C, so the user doesn't have to remember them. Right now when the user is on an A record, and clicks to create a B, i put an the instance of A as a conversation context variable. It does work, but I have a feeling this isn't the best way of doing things..? Maybe abusing biijection is causing some weird behavior?
Thanks a bunch...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965488#3965488
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965488
19 years, 9 months
[JBoss Seam] - Peter Muir - @SelectItems
by mrohad
hi , thanks , I'm using yours now
getting the same exception:
| 18:22:24,087 INFO [STDOUT] Hibernate: select codes0_.ID as ID121_, codes0_.TABLE as TABLE121_, codes0_.DESCRIPTION as DESCRIPT3_121_, codes0_.CODE as CODE121_, codes0_.LABEL as LABEL121_, codes0_.disabled as disabled121_ from wannabet.codes codes0_ where codes0_.TABLE=?
| 18:22:24,097 INFO [STDOUT] Hibernate: select codes0_.ID as ID121_, codes0_.TABLE as TABLE121_, codes0_.DESCRIPTION as DESCRIPT3_121_, codes0_.CODE as CODE121_, codes0_.LABEL as LABEL121_, codes0_.disabled as disabled121_ from wannabet.codes codes0_ where codes0_.TABLE=?
| 18:22:24,107 ERROR [STDERR] 16/08/2006 18:22:24 com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/login/register.xhtml]
| java.lang.IllegalArgumentException: Value binding '#{cLang}'of UISelectItems with component-path {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /login/register.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id38][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id40][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: _id51][Class: javax.faces.component.UISelectItems,Id: _id52]} does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null
| at org.apache.myfaces.shared_impl.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:141)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:477)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:453)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:277)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:251)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 18:22:24,167 INFO [STDOUT] Hibernate: select codes0_.ID as ID121_, codes0_.TABLE as TABLE121_, codes0_.DESCRIPTION as DESCRIPT3_121_, codes0_.CODE as CODE121_, codes0_.LABEL as LABEL121_, codes0_.disabled as disabled121_ from wannabet.codes codes0_ where codes0_.TABLE=?
I changed my code to be like that:
| @SelectItems(label="label")
| private List<Codes> cLang;
|
| @Factory("cLang")
| public void getLanguages()
| {
| List resultList = em.createQuery("select c from Codes c where c.table = :table")
| .setParameter("table","languages")
| .getResultList();
| this.cLang = resultList;
|
| }
and my jsfto :
| <h:selectOneMenu converter="org.jboss.seam.EntityConverter">
| <f:selectItems value="#{cLang}" />
| </h:selectOneMenu>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965487#3965487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965487
19 years, 9 months
[JBoss Seam] - Re: Injection woes
by stan.silvert@jboss.com
"ptmain" wrote : It would get the job done, but my goal also was to reduce it to one annotation, since @Singleton really says it all. :-)
|
I don't think @Singleton really says it all. There is a difference between:
Inject from any scope, create if needed, and outject to SINGLETON scope:
@In (create = true)
| @Out (scope = SINGLETON)
| private DocumentManager docMgr;
Inject from any scope, outject to SINGLETON scope:
@In
| @Out (scope = SINGLETON)
| private DocumentManager docMgr;
Inject from any scope, one of which could be SINGLETON
@In
| private DocumentManager docMgr;
Don't inject, but outject to SINGLETON scope
@Out (scope = SINGLETON)
| private DocumentManager docMgr;
I don't think this can/should be reduced to one annotation. Just my humble opinion.
The more I think about it, the more I like the idea of a SINGLETON scope. Most of the time when you use application scope you really want a web app singleton. But application scope allows the singleton instance to be replaced or removed which could be a source of errors.
Stan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965486#3965486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965486
19 years, 9 months
[JCA/JBoss] - Re: Results caching in Connection Pool
by weston.price@jboss.com
Ok thanks, that makes a bit more sense.
You basically have 3 options:
a)Use the javax.transaction.UserTransaction interface to demarcate transaction boundaries in your Servlet. Doing this will enable you to remove the explicit commits from your code, as well as use the default transaction isolation level of the driver.
b)Manage the transactions explicitly yourself. This is effectively what you are doing now, just with the wrong datasource, <local-tx-datasource>. This is why it worked when you switched to the <no-tx-datasource>.
c)Wrap your POJO's in an EJB and allow the container to manage the transactions for you.
Generally I prefer the first approach because it keeps your POJO's free of transaction code that can be cumbersome to read, and error prone. Further, try to leverage as much of the application server facilities as you can, that's why it is there.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965480#3965480
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965480
19 years, 9 months
[JBoss Portal] - org.jboss.portal.portlet.container.PortletInitializationExce
by klsateesh
Hi All,
I am trying to deploy a Sample Portlet App in JBoss Portal 2.4.0 CR3 and i am getting the following Exception
| 09:43:35,812 INFO [TomcatDeployer] deploy, ctxPath=/jbossPortlet, warUrl=.../tmp/deploy/tmp30826jbossPortlet-exp.war/
| 09:43:36,030 WARN [PortalObjectMetaData] Window AssessSamplePortletWindow has security a configuration but it is not ta
| ken in account, portlet instance configuration should be done rather
| 09:43:36,046 ERROR [AbstractKernelController] Error installing to Start: name=portal:container=Portlet,id=/jbossPortlet.
| AssessSamplePortlet state=Create
| org.jboss.portal.portlet.container.PortletInitializationException: The portlet AssessSamplePortlet threw a runtime excep
| tion during init
| at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:287)
| at org.jboss.portal.portlet.container.PortletContainerAdapter.start(PortletContainerAdapter.java:74)
| at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:72)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextA
| ctions.java:92)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelContro
| llerContextActions.java:452)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(Kern
| elControllerContextActions.java:147)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:5
| 1)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:74)
| at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:232)
| at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:77)
| at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfo$DeploymentContext.start(PortalDeploymentInfo.ja
| va:211)
| at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:242)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy115.deploy(Unknown Source)
| at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:296)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy88.deploy(Unknown Source)
| at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:54)
| at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:145)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
| at $Proxy116.handleNotification(Unknown Source)
| at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.
| java:127)
| at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.ja
| va:108)
| at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
| at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java
| :188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy93.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:26
| 3)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
|
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: java.lang.ClassCastException: com.lmco.dpa.AssessSamplePortlet
| at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:249)
| ... 101 more
| 09:43:36,062 WARN [PortletAppDeployment] Failed to create instance AssessSamplePortletInstance of portlet /jbossPortlet
| .AssessSamplePortlet
|
My Simple Portlet has one method doView()
| protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException, UnavailableException {
| rResponse.setContentType("text/html");
| PrintWriter writer = rResponse.getWriter();
| writer.write("Assessment Sample Portlet!");
| writer.close();
| }
|
Pls let me know hot to resolve this..
Thanks
Sateesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965477#3965477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965477
19 years, 9 months