[JNDI and Naming] New message: "jndi.properties vs bindings-jboss-beans.xml"
by jsingh jsingh
User development,
A new message was posted in the thread "jndi.properties vs bindings-jboss-beans.xml":
http://community.jboss.org/message/528333#528333
Author : jsingh jsingh
Profile : http://community.jboss.org/people/jagdeep
Message:
--------------------------------------------------------------
Hi All,
I am porting an application which uses RMI into JBoss 5.1.0.
I have code in the application which uses the "org.jnp.interfaces.NamingContextFactory" implementation of the Context for RMI connection.
Since I am using a port different than :1099, I edit the "bindings-jboss-beans.xml" file's Naming Service port to my custom port, and the communication works fine.
I was wondering if it's possible to *not* edit the bindings-jboss-beans.xml but edit the jndi.properties file as follows (assuming localhost as my url for now):
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:<my port number>
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
When I try this, JBoss throws the following exception (below).
My questions were:
1) Am I doing something wrong in the jndi.props file? Do I need to make it part of the class path?
2) Does JBoss look at bindings-jboss-beans.xml before it looks at jndi.properties?
I have made sure :<my port number> is not in use.
2010-02-24 17:18:23,228 WARN [org.jnp.server.NamingBeanImpl] (main) Context.PROVIDER_URL in server jndi.properties, url=localhost:<my port number>
.......
2010-02-24 17:19:09,400 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.jmx:alias=jmx/rmi/RMIAdaptor state=Create mode=Manual requiredState=Installed
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:<my port number> and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:<my port number> [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:<my port number> [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.util.naming.Util.createLinkRef(Util.java:275)
at org.jboss.util.naming.Util.createLinkRef(Util.java:253)
at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)
at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528333#528333
15 years, 10 months
[JBoss Messaging Development] New message: "Problem integrating Weblogic 8.1 JMS with Jboss 5.1"
by rajsoni
User development,
A new message was posted in the thread "Problem integrating Weblogic 8.1 JMS with Jboss 5.1":
http://community.jboss.org/message/528327#528327
Author : rajsoni
Profile : http://community.jboss.org/people/rajsoni
Message:
--------------------------------------------------------------
Hello Everyone,
Am trying to set up Weblogic8.1 as the JMS provider for Jboss 5.1.
Based on my findings and understanding of the changes needed to achieve this,I'have made the following changes :
*jms-ds.xml:*
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.mq:service=JMSProviderLoader,name=WLJMSProvider">
<attribute name="ProviderName">WLJMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<attribute name="QueueFactoryRef">weblogicjms</attribute>
<attribute name="TopicFactoryRef">weblogicjms</attribute>
</mbean>
<no-tx-connection-factory>
<jndi-name>WLJMS</jndi-name>
<rar-name>jms-ra.rar</rar-name>
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
<config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property>
<config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/WLJMSProvider</config-property>
<max-pool-size>20</max-pool-size>
</no-tx-connection-factory>
*jboss-service.xml:*
<mbean code="org.jboss.naming.ExternalContext"
name="DefaultDomain:service=ExternalContext,jndiName=weblogicjms">
<attribute name="JndiName">weblogicjms</attribute>
<attribute name="Properties">
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://remotehost:7001
java.naming.security.authentication=none
</attribute>
<attribute name="InitialContext">javax.naming.InitialContext</attribute>
</mbean>
Also added the weblogic.jar in the default/server/lib folder in Jboss.When I start Jboss after making these changes I see that the Jboss server is able to bind to the queue on remote server.
However,for the MDB,which is deployed on the Jboss server I see the following error while activation:
16:32:41,661 INFO [JmsActivation] Attempting to reconnect mailto:org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7fd7c1(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@dee999 destination=java:WLJMS/QUEUE.MARKET destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
16:32:41,662 ERROR [JmsActivation] Unable to reconnect mailto:org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7fd7c1(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@dee999 destination=java:WLJMS/QUEUE.MARKET destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
*javax.naming.NameNotFoundException: DefaultJMSProvider not bound*
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at org.jboss.util.naming.Util.lookup(Util.java:222)
at org.jboss.util.naming.Util.lookup(Util.java:182)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupJMSProviderAdapter(JmsActivation.java:397)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:346)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Here's how the jboss.xml looks like for the MDB causing the problem while activation:
*********************************************************************************************************************************************************
<?xml version="1.0"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>ProcessMDB</ejb-name>
<destination-jndi-name>java:WLJMS/QUEUE.MARKET</destination-jndi-name>
<local-jndi-name>local/ProcessMDB</local-jndi-name>
<configuration-name>WeblogicRemoteMessageDrivenBean</configuration-name>
</message-driven>
</enterprise-beans>
<invoker-proxy-bindings>
<invoker-proxy-binding>
<name>wl-mdb-invoker</name>
<invoker-mbean>default</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
<proxy-factory-config>
<JMSProviderAdapterJNDI>java:/WLJMS</JMSProviderAdapterJNDI>
<ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
<CreateJBossMQDestination>false</CreateJBossMQDestination>
<!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
<MinimumSize>1</MinimumSize>
<MaximumSize>15</MaximumSize>
<KeepAliveMillis>30000</KeepAliveMillis>
<MaxMessages>1</MaxMessages>
<MDBConfig>
<ReconnectIntervalSec>10</ReconnectIntervalSec>
<DLQConfig>
<DestinationQueue>queue/DLQ</DestinationQueue>
<MaxTimesRedelivered>10</MaxTimesRedelivered>
<TimeToLive>0</TimeToLive>
</DLQConfig>
</MDBConfig>
</proxy-factory-config>
</invoker-proxy-binding>
</invoker-proxy-bindings>
<container-configurations>
<container-configuration>
<container-name>WeblogicRemoteMessageDrivenBean</container-name>
<call-logging>false</call-logging>
<invoker-proxy-binding-name>wl-mdb-invoker</invoker-proxy-binding-name>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor</interceptor>
<!-- CMT -->
<interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor>org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
<!-- BMT -->
<interceptor>org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.MessageDrivenTxInterceptorBM</interceptor>
<interceptor>org.jboss.ejb.plugins.CallValidationInerceptor</interceptor>
<interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
</container-interceptors>
<instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
<instance-cache></instance-cache>
<persistence-manager></persistence-manager>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
</container-pool-conf>
</container-configuration>
</container-configurations>
Am not sure why it's trying to bind to the Default JMSprovider still instead of the WLJMSProvider that I have set up for this...
Have tried other options as well like making the changes for invokder binding in the standard-jboss.xml as well but havent found
the solution yet...
Can anyone help me with this issue?
thanks for your help in advance!!!
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528327#528327
15 years, 10 months
[jBPM] New message: "Re: How to handle rollback due to runtime errors"
by Ronald van Kuijk
User development,
A new message was posted in the thread "How to handle rollback due to runtime errors":
http://community.jboss.org/message/528314#528314
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
I understand your usecase, functionality wise. On the other hand, I'm almost 100% sure that the separate WS-hell will not become realy major in complex B2B things. Other protocols are better suited for that
If we would provide something 'simple' for that, people most likely want more, but.... BPMN has an explicit ERROR event, not sure how that is to be used (see the specs for that http://www.omg.org/spec/BPMN/2.0/) and when in jBPM will have support for it.
Regarding transaction-rollback, intercepting those in a process somewhere when things happen low level and acting on it is (I think, am not into that low level stuff) rather difficult. Otoh, jBPM can already be used with some interceptors, so maybe you can do something on that level.
Personally, I've never really missed it (just did not use basic webservices )
Ronald
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528314#528314
15 years, 10 months
[JBoss Web Services] New message: "Client says MTOM policy not supported"
by Martin Sarabura
User development,
A new message was posted in the thread "Client says MTOM policy not supported":
http://community.jboss.org/message/528313#528313
Author : Martin Sarabura
Profile : http://community.jboss.org/people/steeqs4
Message:
--------------------------------------------------------------
I've deployed some ws client code to JBoss 5.1 and get the error "Policy not supported! #wsmtom_policy" when creating the service instance.
The stack trace to the point where the error occurs is here:
PolicyDeployer.getDomainDeployerInstance(String) line: 245
PolicyDeployer.deployAssertionClientSide(PrimitiveAssertion, ExtensibleMetaData) line: 232
PolicyDeployer.deployClientSide(Policy, ExtensibleMetaData) line: 169
PolicyMetaDataBuilder.deployPolicyClientSide(Policy, PolicyScopeLevel, ExtensibleMetaData, PolicyDeployer) line: 307
PolicyMetaDataBuilder.deployPolicy(Policy, PolicyScopeLevel, ExtensibleMetaData) line: 274
PolicyMetaDataBuilder.processPolicies(List<WSDLExtensibilityElement>, PolicyScopeLevel, PolicyRegistry, ExtensibleMetaData) line: 233
PolicyMetaDataBuilder.processPolicyExtensions(EndpointMetaData, WSDLDefinitions) line: 190
JAXWSClientMetaDataBuilder.buildMetaData(QName, URL, UnifiedVirtualFile) line: 93
ServiceDelegateImpl.<init>(URL, QName, Class) line: 146
ServiceDelegateImpl.<init>(URL, QName, Class, WebServiceFeature[]) line: 117
ProviderImpl.createServiceDelegate(URL, QName, Class, WebServiceFeature...) line: 111
ProviderImpl.createServiceDelegate(URL, QName, Class) line: 104
Service.<init>(URL, QName) line: 56
Service.create(URL, QName) line: 680
Attachments.getIntegrity(AttachmentInfo, Credentials) line: 121
where in the method Attachments.getIntegrity() my code looks like this:
URL wsurl = new URL(protocol, part1.getHost(),
port, "/webservices/2009/Integrity?wsdl");
QName svcName = new QName("http://webservice.mks.com/2009/Integrity",
"Integrity_2009Service");
Service service = Service.create(wsurl, svcName);
In PolicyDeployer.getDomainDeployerInstance() there are four entries in the domainDeployerMap:
http://docs.oasis-open.org/ws-rx/wsrmp/200702
http://schemas.xmlsoap.org/ws/2005/02/rm/policy
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd
http://www.w3.org/2006/05/addressing/wsdl
and the policy I am looking up is this:
http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization
Any thoughts as to what is going wrong? I am stumped. Thanks!
The wsdl is included below...
<definitions name="Integrity_2009Service"
targetNamespace="http://webservice.mks.com/2009/Integrity"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://webservice.mks.com/2009/Integrity/schema"
xmlns:ns2="http://webservice.mks.com/2009/Integrity/fault"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://webservice.mks.com/2009/Integrity"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns3="http://www.w3.org/2005/05/xmlmime">
<wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..." wsu:Id="wsmtom_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/>
</wsp:Policy>
<types>
***** schema stuff here...
</types>
<message name="...">
***** various messages here
</message>
<portType name="Integrity_2009">
***** various operations here
</portType>
<binding name="Integrity_2009Binding" type="tns:Integrity_2009">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#wsmtom_policy" required="true"/>
<operation name="...">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="MKSException">
<soap:fault name="MKSException" use="literal"/>
</fault>
</operation>
</binding>
<service name="Integrity_2009Service">
<port binding="tns:Integrity_2009Binding" name="Integrity_2009Port">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528313#528313
15 years, 10 months