[Messaging, JMS & JBossMQ] - question on publishing to a secure queue
by agun
How can we publish to a secure queue without setting the user,pw at the time of creating the connection? Can we specify the user/pw on the deployment descriptor of the ConnectionFactory associated with the queue? Or can we specify this on the activation spec of the queue resource?
The goal is to not write extra code to publish to a secure queue. I would still want to use the standard connFactory.createConnection() API i.e. without setting the user/pw in the code. If I want to add security, I should be able to achieve this by configuring the deployment descriptors.
For example, securing a queue and associating a user with the MDB that listens to the queue requires no coding - it is purely done by modifying the respective deployment descriptors.
Is there a similar mechanism by which we can associate a user with the ConnectionFactory that is used to create the connection to publish to the secured queue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967148#3967148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967148
19 years, 8 months
[JBossWS] - Re: JSR -181 Start with WSDL and Java
by stevenh
Alright i have been having a bit of a play with my classes as one of my web services was behaving in what can only be described as an interesting maner.
I am looking at the generated wsdl from my soap class and it works fine as per the listing below. but if i change the method name of getResult to getResult1 it seperates out the elements into two difference schemas. See below.
I would not have expected the change to the method name to have any effect on the actual wsdl ( given the name paramaters are specified). it does seem a little fragile.
@WebService(targetNamespace = "http://cs_dev.test/aua/User")
| @SOAPBinding(
| style = SOAPBinding.Style.RPC,
| use = SOAPBinding.Use.LITERAL,
| parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
|
| public class AuUserWs {
|
| private static final Logger log = Logger.getLogger(AuUserWs.class);
|
| @WebMethod(operationName = "GetAuUserRole")
| @WebResult(name = "Userrole")
| public AuUserRole getResult(
| @WebParam(name = "AuNumber") int pAuNumber,
| @WebParam(name = "RoleCode") String pRoleCode,
| @WebParam(name = "Location") String pLocation
| ) throws DataBaseException, AuaSystemException {
| return null;
| }
|
| @WebMethod(operationName = "GetAuUserRoles")
| @WebResult(name = "Userroles")
| public AuUserRole[] getResults(
| @WebParam(name = "AuNumber")int _pAuNumber
| ) throws DataBaseException, AuaSystemException {
| return null;
| }
| }
Produces
<type>
| <schema elementFormDefault='qualified' targetNamespace='http://cs_dev.test/aua/User' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://cs_dev.test/aua/User' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <complexType name='AuUserRole'>
| <sequence>
| <element name='auNumber' type='int'/>
| <element name='dateEntered' nillable='true' type='string'/>
| <element name='dateLastModified' nillable='true' type='string'/>
| <element name='delegation' nillable='true' type='string'/>
| <element name='deleted' nillable='true' type='string'/>
| <element name='disabled' nillable='true' type='string'/>
| <element name='expiryDate' nillable='true' type='string'/>
| <element name='facility' nillable='true' type='string'/>
| <element name='lastModifiedBy' nillable='true' type='string'/>
| <element name='locationCode' nillable='true' type='string'/>
| <element name='notes' nillable='true' type='string'/>
| <element name='priorityOrder' type='int'/>
| <element name='roleCode' nillable='true' type='string'/>
| <element name='roleType' nillable='true' type='string'/>
| <element name='soleSignatory' nillable='true' type='string'/>
| <element name='startDate' nillable='true' type='string'/>
| </sequence>
| </complexType>
| <complexType name='AuUserRole.Array'>
| <sequence>
| <element maxOccurs='unbounded' minOccurs='0' name='value' nillable='true' type='tns:AuUserRole'/>
| </sequence>
| </complexType>
| <complexType name='AuaSystemException'>
| <sequence/>
| </complexType>
| <complexType name='DataBaseException'>
| <sequence/>
| </complexType>
| <element name='AuaSystemException' type='tns:AuaSystemException'/>
| <element name='DataBaseException' type='tns:DataBaseException'/>
| </schema>
| </type>
but
| @WebService(targetNamespace = "http://cs_dev.test/aua/User")
| @SOAPBinding(
| style = SOAPBinding.Style.RPC,
| use = SOAPBinding.Use.LITERAL,
| parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
|
| public class AuUserWs {
|
| private static final Logger log = Logger.getLogger(AuUserWs.class);
|
| @WebMethod(operationName = "GetAuUserRole")
| @WebResult(name = "Userrole")
| public AuUserRole getResult1(
| @WebParam(name = "AuNumber") int pAuNumber,
| @WebParam(name = "RoleCode") String pRoleCode,
| @WebParam(name = "Location") String pLocation
| ) throws DataBaseException, AuaSystemException {
| return null;
| }
|
| /**
| *
| * @param _pAuNumber int
| * @return AuUserRole[]
| * @throws DataBaseException
| */
| @WebMethod(operationName = "GetAuUserRoles")
| @WebResult(name = "Userroles")
| public AuUserRole[] getResults(
| @WebParam(name = "AuNumber")int _pAuNumber
| ) throws DataBaseException, AuaSystemException {
| return null;
| }
| }
|
produces
| <types>
| <schema elementFormDefault='qualified' targetNamespace='http://dto.aua.server.chw/jaws' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns1='http://cs_dev.test/aua/User' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://dto.aua.server.chw/jaws' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <import namespace='http://cs_dev.test/aua/User'/>
| <complexType name='AuUserRole'>
| <sequence>
| <element name='auNumber' type='int'/>
| <element name='dateEntered' nillable='true' type='string'/>
| <element name='dateLastModified' nillable='true' type='string'/>
| <element name='delegation' nillable='true' type='string'/>
| <element name='deleted' nillable='true' type='string'/>
| <element name='disabled' nillable='true' type='string'/>
| <element name='expiryDate' nillable='true' type='string'/>
| <element name='facility' nillable='true' type='string'/>
| <element name='lastModifiedBy' nillable='true' type='string'/>
| <element name='locationCode' nillable='true' type='string'/>
| <element name='notes' nillable='true' type='string'/>
| <element name='priorityOrder' type='int'/>
| <element name='roleCode' nillable='true' type='string'/>
| <element name='roleType' nillable='true' type='string'/>
| <element name='soleSignatory' nillable='true' type='string'/>
| <element name='startDate' nillable='true' type='string'/>
| </sequence>
| </complexType>
| </schema>
| <schema elementFormDefault='qualified' targetNamespace='http://cs_dev.test/aua/User' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns2='http://dto.aua.server.chw/jaws' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://cs_dev.test/aua/User' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <import namespace='http://dto.aua.server.chw/jaws'/>
| <complexType name='AuUserRole'>
| <sequence>
| <element name='auNumber' type='int'/>
| <element name='dateEntered' nillable='true' type='string'/>
| <element name='dateLastModified' nillable='true' type='string'/>
| <element name='delegation' nillable='true' type='string'/>
| <element name='deleted' nillable='true' type='string'/>
| <element name='disabled' nillable='true' type='string'/>
| <element name='expiryDate' nillable='true' type='string'/>
| <element name='facility' nillable='true' type='string'/>
| <element name='lastModifiedBy' nillable='true' type='string'/>
| <element name='locationCode' nillable='true' type='string'/>
| <element name='notes' nillable='true' type='string'/>
| <element name='priorityOrder' type='int'/>
| <element name='roleCode' nillable='true' type='string'/>
| <element name='roleType' nillable='true' type='string'/>
| <element name='soleSignatory' nillable='true' type='string'/>
| <element name='startDate' nillable='true' type='string'/>
| </sequence>
| </complexType>
| <complexType name='AuUserRole.Array'>
| <sequence>
| <element maxOccurs='unbounded' minOccurs='0' name='value' nillable='true' type='ns2:AuUserRole'/>
| </sequence>
| </complexType>
| <complexType name='AuaSystemException'>
| <sequence/>
| </complexType>
| <complexType name='DataBaseException'>
| <sequence/>
| </complexType>
| <element name='AuaSystemException' type='tns:AuaSystemException'/>
| <element name='DataBaseException' type='tns:DataBaseException'/>
| </schema>
| </types>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967145#3967145
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967145
19 years, 8 months
[JBossCache] - problem caching synchronizedList object
by emailmsgbox
Hi,
here's the deal
I have a data object that contains a synchronizedList
I run it with jdk1.5, JBoss 4.0.4p1, cache 1.4sp1, annotation 1.5 and javassist 3.3
for example
| ..
| private List <String> playList = Collections.synchronizedList((new ArrayList <String>()));
| ..
|
the result is
| at java.lang.Thread.run(Unknown Source)
| Caused by: javax.ejb.EJBException: java.lang.RuntimeException: java.lang.ClassFormatError: Failed to load dyn class: AOPClassPr
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| ....
| ....
| at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:168)
| ... 28 more
| Caused by: java.lang.RuntimeException: java.lang.ClassFormatError: Failed to load dyn class: AOPClassProxy$0
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:174)
| ....
| ....
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ... 41 more
| Caused by: java.lang.ClassFormatError: Failed to load dyn class: AOPClassProxy$0
| at org.jboss.aop.deployment.JBossClassPool.toClass(JBossClassPool.java:111)
| at javassist.ClassPool.toClass(ClassPool.java:804)
| at javassist.CtClass.toClass(CtClass.java:1037)
| at org.jboss.aop.proxy.ClassProxyFactory.generateProxy(ClassProxyFactory.java:309)
| ......
| ......at org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:148)
| at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:213)
| at org.jboss.cache.aop.TreeCacheAopDelegate._regularPutObject(TreeCacheAopDelegate.java:468)
| at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:206)
| at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:731)
| at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:446)
| at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:423)
| 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)
| ....
| ... 48 more
| Caused by: javassist.CannotCompileException: no public constructor in java.util.Collections$SynchronizedRandomAccessList
| at javassist.CtNewClass.inheritAllConstructors(CtNewClass.java:102)
| at javassist.CtNewClass.toBytecode(CtNewClass.java:63)
| at javassist.CtClass.toBytecode(CtClass.java:1181)
| at org.jboss.aop.deployment.JBossClassPool.toClass(JBossClassPool.java:93)
| ... 84 more
|
|
ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967144#3967144
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967144
19 years, 8 months
[Messaging, JMS & JBossMQ] - Re: Memory leak
by jozerskiy
Nirav...
I am new to jboss. Our application has a memory leak on the similar issue. some UIL2 threads keep multiplying about every minute. An example of such thread follows on the bottom of my message.
My question is this: Where do i change the connection factory type to "java:/ConnectionFactory"? I searched all of my jboss config files for "RMIConnectionFactory" and did not fing any references.
We are using jboss version 4.0.1
If you can offer any advice, it would be really appreciated.
thanks
julia
************************************************
Name: UIL2(SocketManager.MsgPool@f34a08 client=192.168.30.237:8093)#1
State: TIMED_WAITING on EDU.oswego.cs.dl.util.concurrent.LinkedNode@eaabad
Total blocked: 0 Total waited: 2
Stack trace:
java.lang.Object.wait(Native Method)
EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:353)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:723)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:747)
java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967143#3967143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967143
19 years, 8 months