[JBoss Messaging] - Re: Problem with user authorization using JBM Bridge configu
by armsargis
One note also if I create EllipseRequests queue locally using following config:
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=EllipseRequests"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="SecurityConfig">
| <security>
| <role name="seamusers" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
|
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=EllipseCallbacks"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="SecurityConfig">
| <security>
| <role name="seamusers" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
|
I have not authorization problem but it forward messages to locally created queue, not to remote one.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224409#4224409
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224409
17 years
[JBoss Messaging] - Problem with user authorization using JBM Bridge configuatio
by armsargis
Hi all I am trying to configure JBM Bridge here is my test configuration:
jms-ds.xml:
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
| <attribute name="ProviderName">DefaultJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
| <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
| <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
| </mbean>
|
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.messaging:service=JMSProviderLoader,name=SOClassRemoteJMSProvider">
| <attribute name="ProviderName">SOClassRemoteJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <!-- The combined connection factory -->
| <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=192.168.100.78:1099
| </attribute>
| </mbean>
|
*-bridge-service
<?xml version="1.0" encoding="UTF-8"?>
| <server>
|
| <mbean code="org.jboss.jms.server.bridge.BridgeService"
| name="jboss.jms:service=Bridge,name=SOClassBridge" xmbean-dd="xmdesc/Bridge-xmbean.xml">
| <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
| <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=SOClassRemoteJMSProvider</depends>
| <depends>jboss.messaging.destination:service=Queue,name=SOClassCallbacks</depends>
| <attribute name="SourceDestinationLookup">/queue/SOClassCallbacks</attribute>
| <attribute name="TargetDestinationLookup">/queue/EllipseRequests</attribute>
| <attribute name="SourceUsername">ellipse</attribute>
| <attribute name="SourcePassword">ellipse123</attribute>
| <attribute name="TargetUsername">soclass</attribute>
| <attribute name="TargetPassword">soclass123</attribute>
| <!-- Optional: The Quality Of Service mode to use, one of:
| QOS_AT_MOST_ONCE = 0;
| QOS_DUPLICATES_OK = 1;
| QOS_ONCE_AND_ONLY_ONCE = 2;-->
| <attribute name="QualityOfServiceMode">0</attribute>
| <!--
| <attribute name="Selector">specify-jms-selector-here</attribute>
| -->
| <attribute name="MaxBatchSize">5</attribute>
| <attribute name="MaxBatchTime">-1</attribute>
| <!--
| <attribute name="SubName">mysub</attribute>
| -->
| <!--
| <attribute name="ClientID">myClientID</attribute>
| -->
| <attribute name="FailureRetryInterval">5000</attribute>
| <attribute name="MaxRetries">-1</attribute>
| <attribute name="AddMessageIDInHeader">false</attribute>
| </mbean>
|
| </server>
according my configs I want automatically forward messages from JMSProvider:/queue/SOClassCallbacks to SOClassRemoteJMSProvider:/queue/EllipseRequests.
But I have problem with authorization, here is outputs with trace log level from JMSProvider:
16:50:38,446 TRACE [SecurityAspect] checking access permissions to JBossQueue[EllipseRequests]
| 16:50:38,446 DEBUG [JBossASSecurityMetadataStore] No SecurityMetadadata was available for EllipseRequests, using default security config
| 16:50:38,446 TRACE [SecurityMetadata] Adding role: Role {name=guest;read=true;write=true;create=true}
| 16:50:38,446 TRACE [JBossASSecurityMetadataStore] authenticating user soclass
| 16:50:38,447 TRACE [JBossASSecurityMetadataStore] authorizing user soclass for role(s) [guest]
| 16:50:38,447 TRACE [JBossASSecurityMetadataStore] user soclass is NOT authorized
| 16:50:38,447 WARN [Bridge] jboss.jms:name=SOClassBridge,service=Bridge Failed to send + acknowledge batch, closing JMS objects
| javax.jms.JMSSecurityException: User: soclass is not authorized to write to destination EllipseRequests
| at org.jboss.jms.server.container.SecurityAspect.check(SecurityAspect.java:312)
| at org.jboss.jms.server.container.SecurityAspect.handleSendTransaction(SecurityAspect.java:190)
| 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:597)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)
| at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:82)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
| at org.jboss.remoting.Client.invoke(Client.java:1708)
| at org.jboss.remoting.Client.invoke(Client.java:612)
| at org.jboss.remoting.Client.invoke(Client.java:600)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:221)
|
|
as I noticed JBM trying to authorize remote soclass user using local Security configs. Can you provide any info why its like this? Please note my remote configs is ok I tested it with JMS client application and I am able to read and write ti this queue
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224395#4224395
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224395
17 years
[Performance Tuning] - Re: when does java release commited memory back to the OS
by PeterJ
Using the default collectors (CMS and G1 are different), GC does not take place until there is no room in the eden space (within the young generation) to allocate an object. The first thing the JVM does is determine if it needs to collect the old generation before it collects the young generation. The way the Sun JVM does this is it assumes the worst-case scenario that all objects currently occupying the young generation will survive the collection, and thus if the size of the young generation is less than the available space in the old generation, it collects the old generation first, and then the young generation (thus resulting in a full collection).
Example using your settings and assuming the JVM starts with the min heap size. You are starting with:
young gen: 125MB, old gen: 25MB
Hmm, that is not good - the first collection might result in a full collection but the old gen is empty. My bet is that the heap will immediately be resized, so let's pick a better heap size, say 300MB, then we have:
young gen: 125MB, old gen: 175MB
Let's say that for the first minor collection 60MB of objects are placed into the old gen (usually not likely, but after several collections you could have that much space used). So now you have only 115MB of free space left in the old gen. The next collection will be a full collection (125MB young gen > 115MB free old gen). Now let's assume the JVM does not adjust the heap size any more, and that there is always around 60MB of objects occupying the old gen. The result: every collection is a full collection.
Now, if the JVM resizes the heap up to the 600MB max, you are in better shape. Then you have:
young gen: 125MB, old gen: 475MB
Not until the old gen contains > 350MB of objects would the JVM do a major collection. Of course, if your working set size is > 350MB then you will find yourself in the same boat again - major collection each time.
Now in the above I have not taken the size of the survivor spaces into account, nor any fine tuning the that JVM does with heap sizing during each collection, or advances in newer JVMs (an early version of JDK5 was the last one I checked this on). You can easily monitor the exact behavior by turning on one of the GC statistics options.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224392#4224392
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224392
17 years
[JNDI/Naming/Network] - Re: ClassCastException with JBoss 5.0.0 GA and higher
by krum
So thanks, it's ok! i can get my ejb, but now i have this exception:
Exception in thread "main" javax.ejb.EJBException: java.lang.IllegalArgumentException: Wrong target. class thales_isr.bean.MissionBean for public thales_isr.pojo.mission.Mission thales_isr.bean.MissionBean.get(java.lang.String)
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:659)
| at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
| Caused by: java.lang.IllegalArgumentException: Wrong target. class thales_isr.bean.MissionBean for public thales_isr.pojo.mission.Mission thales_isr.bean.MissionBean.get(java.lang.String)
| at org.jboss.aop.joinpoint.MethodInvocation.handleErrors(MethodInvocation.java:151)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:126)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
| at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
| at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
| at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
| at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_16785420.invoke(InvocationContextInterceptor_z_fillMethod_16785420.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
| at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_16785420.invoke(InvocationContextInterceptor_z_setup_16785420.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:60)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:659)
| at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:206)
| at org.jboss.remoting.Client.invoke(Client.java:1708)
| at org.jboss.remoting.Client.invoke(Client.java:612)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
| at $Proxy3.invoke(Unknown Source)
| at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
| at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
| at $Proxy2.remove(Unknown Source)
| at thales_isr.test.Main.main(Main.java:495)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
| at $Proxy3.invoke(Unknown Source)
| at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
| at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
| at $Proxy2.remove(Unknown Source)
| at thales_isr.test.Main.main(Main.java:495)
|
but it works with JBoss 4.2.2 GA... so i don't understand...
can you help me again?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224391#4224391
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224391
17 years