[JBoss Portal] - Re: isUserInRole returning hardcoded false
by klj62
Issue Resolved --
This method is being called from a request dispatcher "include". The only instantiation of a DispatchedHttpServletRequest object that I could find is in the PortletRequestDispatcherImpl class, and only for the case of a JSP dispatcher "include".
Although the original request is made available to the DispatchedHttpServletRequest object, it does not make use of it to provide information such as the isUserInRole. The 2.2.1 code is the same as the 2.4 code.
SRV.8.3 "The Include Method" section of the 2.4 Servlet Specification states:
"The target servlet of the include method has access to all aspects of the request object,"
Based on this statement from the spec, I would think that a call to request.isUserInRole from the target servlet should return the same answer as the call to the original request object. The following section 8.3.1 states what must explicitly be included as request attributes, but it looks like this implementation ignores the 8.3 statement above and supplies only those things listed as "must be set".
It's probably irrelevant since I solved the problem by extracting the original request from the dispatched request by:
<%
RenderRequest renderRequest = (RenderRequest)
request.getAttribute("javax.portlet.request");
if ( renderRequest.isUserInRole( "rolename" ) ) { . . . }
%>
It's not an obvious answer, so I hope this helps others who run into the same problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982681#3982681
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982681
19Â years, 6Â months
[JBossWS] - JAX-RPC Enumeration type did not conform to expectations
by lds23
Hi,
When trying to deploy a webservice on JBoss 4.0.4 I get an exception and the only reference I cannot find any hints on the web. Any hints? The service was implemented by running wsimport on wsdl file (Parlay X Send SMS function). The implementation is a stateless session bean. I'll be really grateful for any tips:
org.jboss.ws.WSException: JAX-RPC Enumeration type did not conform to expectations
at org.jboss.ws.tools.schema.SchemaTypeCreator.handleJAXRPCEnumeration(SchemaTypeCreator.java:377)
at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:317)
at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:272)
at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:133)
at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:128)
at org.jboss.ws.tools.schema.SchemaTypeCreator.createFieldParticle(SchemaTypeCreator.java:597)
at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaProperties(SchemaTypeCreator.java:582)
at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:334)
at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:272)
at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:133)
at org.jboss.ws.tools.JavaToXSD.generateForSingleType(JavaToXSD.java:109)
at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateType(JavaToWSDLHelper.java:555)
at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateTypesForXSD(JavaToWSDLHelper.java:141)
at org.jboss.ws.tools.JavaToWSDL11.handleJavaToWSDLGeneration(JavaToWSDL11.java:236)
at org.jboss.ws.tools.JavaToWSDL11.generate(JavaToWSDL11.java:168)
at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:318)
at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.processOrGenerateWSDL(AnnotationsMetaDataBuilder.java:225)
at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.setupEndpointFromAnnotations(AnnotationsMetaDataBuilder.java:174)
at org.jboss.ws.metadata.AnnotationsMetaDataBuilderJSE.buildMetaData(AnnotationsMetaDataBuilderJSE.java:82)
at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(WebServiceDeployerJSE.java:196)
at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
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 $Proxy40.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 $Proxy6.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:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Regards,
DS
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982680#3982680
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982680
19Â years, 6Â months
[Installation, Configuration & Deployment] - Dynamicly adding attributes to MBean
by bossy
Hi,
I need to use JMX for configuration purposes in my app. I have an MBean that has most of my configuration properties. These appear fine in JMX Web console, I can change their values and so on. The problem is I know that in the feature I'll need to add more properties that i'm going to use dynamically(for example adding a host name and a corresponding value). I cannot hard code these as attributes, because I don't even know how are they going to be called. I tried adding an attribute with type Map, but that makes things very messy. The implementation of the MBean I was given to use as a base is as follows:
1. I have class SomeXMBean that extends ServiceMBeanSupport
it has all the getters/setters for the attributes as well as stopService() and startService()
2. In jboss-service.xml I have a definition for this mbean. Its "xmbean-dd" attribute points to another xml file that describes the MBean with its attributes, their types etc.
3. This is all packed in a sar file.
My question is - is it possible to create an MBean for which you don't declare the attributes in advance, but create them at runtime. Also is it possible to do it using this deployment mechanism, or do I have to register and work with the MBean programatically?
Any help would be greatly appreciated.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982672#3982672
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982672
19Â years, 6Â months