MDB with foreign JMS : WLS 9.23
For the love of _____ (fill in your own muse of desperation here), is there some categorical statement of whether WLS9.23 actually ***works*** with MDB's and foreign JMS providers? Whereever I search/find, people have trouble with this.
Some kind BEA sould - please. Please, please please : publish a canonical example of MDB with secured foreign-JNDI provided connx factory, and either a queue or a topic.
I'm beginning to wonder if this works at all.
Good morning!
Categorical Statement: WLS supports JMS spec compliant foreign providers for MDBs, bridges, resource-references, foreign providers. We also support sending a foreign providers message using a WebLogic JMS client.
For general Tibco integration questions, I recall that the Tibco docs themselves contain WebLogic integration examples. There's also some much mention of Tibco in the out-dated "Using Foreign JMS Providers with WebLogic Server" white-paper on dev2dev.
That said, there have been definitely been problems with Tibco and MQ's latest release, as they both recently released semi-non-JMS compliant clients that our wrapper code was unprepared to deal with. In short, we were caught unawares when these clients stopped supporting the 1.0.2 APIs even though 1.1 specification clearly requires both 1.1 and 1.0.2 support. Rather than ask Tibco and MQ teams to have them patch their code (an approach we've sometimes taken over the years), we chose this time to enhance our code.
I think the problems were all fixed by 9.23 - but you may want to contact customer support to see if there are any additional patches required. Alternatively, you can try use a slightly older Tibco client, as presumably their older clients are still able to interoperate with their latest server version (this approach works with MQ).
Tom
Similar Messages
-
MDB behavior with Foreign JMS Provider
I am experiencing some MDB behavior which I do not quite understand. I would appreciate
if someone could tell me what might be happening.
An application on WebLogic 8.1 SP1 (also tried it with SP2) has MDB's which listen
on a MQ Queue. If I put a large XML message on the MQ Queue (say around 600 KB),
the onMessage execution is very random, For the large messages only 1 MDB gets
invoked and the other messages just sit on the MQ Queue. Even though I have defined
an weblogic execute queue for the MDB's and they have 15 threads allocated.
The other messages get picked up after the first one gets completed. The problem
is the whole transaction (which is XA) can take a while (upto 10 minutes). This
is not intended, but for some reason it takes that long.
Also, while monitoring the MDB execute queues, I noticed that none of the threads
from that queue are performing the work and a thread dump shows that the weblogic.ejb20.internal.JMSPoller
thread has invoked the MDB and is currently waiting for the database to finish
some processing.
When the message size is smaller, the MDB's fire concurrently and are executed
on the MDB execute queue.
Thanks,
Ketan.
When we're using MDBs against a foreign JMS provider with XA, the EJB
container tries to reduce the number of threads that are blocked waiting for
a message. You should see lots of threads working when there are lots of
messages on the queue, a few threads (or only one) working when the queue is
empty or nearly so, and there should be some ramp-up and ramp-down time in
between. It sounds like the ramp-up takes longer in your case because
receiving the very first message takes a long time.
If this behavior is causing big problems for you, you might want to contact
product support and file an enhancement request.
greg
"Ketan" <[email protected]> wrote in message
news:[email protected]...
>
> Here is some more information regarding this issue.
>
> When I place sufficiently large messages (such that the parsing and
processing
> of these messages takes longer than it does for normal size messages), I
notice
> the following behavior.
>
> Lets say I put 6 large messages on the MQ Queue. The server immediately
picks
> up 1 message and starts processing it. The other 5 messages are sitting on
the
> MQ Queue, while the MDB execute queue has all 15 idle threads.
>
> After the processing of the message is done, 2 messages get picked up.
This time,
> 1 thread in the MDB execute queue gets the message and the other is
processed
> by the JMSPoller thread. After these 2 messages are processed, 3 Messages
get
> picked up and this time 2 messages are on the MDB execute queue and 1 is
processed
> by the JMSPoller.
>
> So based on this the question is ..Is this the expected behavior? I was
under
> the impression that the poller would simply dispatch messages to the
execute queue,
> and as a result, I was expecting all the messages would get picked up from
the
> MQ queue pretty fast and would not have to wait for 1 or more MDB's to
finish
> processing.
>
> I would really appreciate any suggestions anyone may have for me.
>
> Again the environment is WLS 8.1 SP2, MQ 5.3
>
> thanks,
> Ketan
-
MDB problem with Foreign JMS MQ
Hi,
I have MDB 2.1 and i am trying to deploy in weblogic 10.2 app server. Below is my ejb-jar.xml and weblogic.jar xml config. I have a foreign JMS configured and i have destination and connection factory configured too. I was able to post a message to the queue successfully, but my MDB is not getting executed I am getting below exception during the startup of application. I can see other EJBs in the JNDI but not my MDBs. Please advice and your help is very much appreciated.
Warning Message:
<Jun 1, 2010 10:24:04 AM CDT> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: IFIPNCDistributorMDB is unable to connect to the JMS destination: jms/MyQueue. The Error was:
Can not get distribute destination information. The destination JNDI name is jms/MyQueue, the provider URL is file:/C:/JNDI-Directory>
weblogic-ejb-jar.xml
<weblogic-enterprise-bean>
<ejb-name>MDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>4</max-beans-in-free-pool>
<initial-beans-in-free-pool>4</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms/IFIPNCQueue</destination-jndi-name>
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
<provider-url>file:/C:/JNDI-Directory</provider-url>
<connection-factory-jndi-name>jms/MyQCF</connection-factory-jndi-name>
</message-driven-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>MyQCF</res-ref-name>
<jndi-name>jms/MyQCF</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>MyQueue</res-ref-name>
<jndi-name>jms/MyQueue</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>MDB</jndi-name>
</weblogic-enterprise-bean>
ejb-jar.xml
<message-driven id="MDB">
<ejb-name>MDB</ejb-name>
<ejb-class>com.IFIPNCDistributorMDB</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>jms/QCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>jms/MyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
</message-driven>
Thank You,
VJCan you setup as in this example:
Foreign JMS_
<foreign-server name=”ForeignServer”>
<default-targeting-enabled>true</default-targeting-enabled>
<foreign-destination name=”A”>
<local-jndi-name>A</local-jndi-name>
<remote-jndi-name>queue/A</remote-jndi-name>
</foreign-destination>
<foreign-connection-factory name=”FConf”>
<local-jndi-name>FConf</local-jndi-name>
<remote-jndi-name>ConnectionFactory</remote-jndi-name>
<username>esbuser</username>
<password-encrypted>{3DES}90sIZwo6Llr9r73p+VXkvQ==</password-encrypted>
</foreign-connection-factory>
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
<connection-url>file:/C:/JNDI-Directory</connection-url>
</foreign-server>
weblogic-ejb-jar.xml_
<?xml version=’1.0′ encoding=’UTF-8′?>
<web:weblogic-ejb-jar xmlns:web=”http://www.bea.com/ns/weblogic/weblogic-ejb-jar”>
<web:weblogic-enterprise-bean>
<web:ejb-name>RequestEJB-2518965873970113789–2352f820.127bd3f293c.-7fdb</web:ejb-name>
<web:message-driven-descriptor>
<web:pool>
<web:max-beans-in-free-pool>1000</web:max-beans-in-free-pool>
<web:initial-beans-in-free-pool>1</web:initial-beans-in-free-pool>
</web:pool>
<web:destination-jndi-name>A</web:destination-jndi-name>
<web:connection-factory-jndi-name>FConf</web:connection-factory-jndi-name>
</web:message-driven-descriptor>
<web:transaction-descriptor>
<web:trans-timeout-seconds>600</web:trans-timeout-seconds>
</web:transaction-descriptor>
<web:resource-description>
<web:res-ref-name>jms/ConnectionFactory</web:res-ref-name>
<web:jndi-name>FConf</web:jndi-name>
</web:resource-description>
<web:resource-description>
<web:res-ref-name>jms/QueueName</web:res-ref-name>
<web:jndi-name>A</web:jndi-name>
</web:resource-description>
</web:weblogic-enterprise-bean>
</web:weblogic-ejb-jar>
Note, local JNDI names in the foreign jms server should be used for destination-jndi and conection-factory-jndi. No need to specify provider URL in deployment descriptors. Instead it is specified at the foreign jms setup.
Also you should use the same resource-reference names in both ejb-jar & weblogic-ejb-jar.xml's., In above example resource-reference section of ejb-jar should look like:
<resource-ref>
<res-ref-name>jms/ConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>jms/QueueName</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref> -
I am trying to access MQ que with Message Driven bean in weblogic 8.1.
I have defined Foreign JMS server in weblogic pointing to MQ JNDI name.
I am not sure what to define in "weblogic-ejb-jar.xml" and "ejb-jar.xml" to refer to que connection factory and que.
Error message that I am getting while deploying is as follows:
<The Message-Driven EJB: MesssageHandlerBean is unable to connect to the JMS destination: jms.MediaQueue. The Error was:
[EJB:011010]The JMS destination with the JNDI name: jms.MediaQueue could not be found. Please ensure that the JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination has been deployed.>
Looks like it weblogic is not able to identify JNDI name that I have defined in foreign server for remote que.
Please let me know how i can reference foreign JMS server JNDI names.
Thanks a bunch for help.
Please find attached configuration files.
weblogic-ejb-jar.xml
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MesssageHandlerBean</ejb-name>
<message-driven-descriptor>
<destination-jndi-name>
jms.MediaQueue
</destination-jndi-name>
<initial-context-factory>
com.sun.jndi.fscontext.RefFSContextFactory
</initial-context-factory>
<provider-url>file://localhost/d:/mqm</provider-url>
<connection-factory-jndi-name>
jms.MediaQcf
</connection-factory-jndi-name>
</message-driven-descriptor>
<jndi-name>MesssageHandlerBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<enterprise-beans>
<message-driven>
<ejb-name>MesssageHandlerBean</ejb-name>
<ejb-class>com.ejb.MesssageHandlerBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
weblogic "config.xml" for foeign JMS server.
<ForeignJMSServer ConnectionURL="file://localhost/d:/mqm" InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
JNDIProperties="" Name="MQJMS Server" Targets="cgServer">
<ForeignJMSConnectionFactory LocalJNDIName="jms.MediaQcf"
Name="MQ JMS Connection Factory" PasswordEncrypted=""
RemoteJNDIName="jms/lMediaQcf" Username=""/>
<ForeignJMSDestination LocalJNDIName="jms.MediaQueue"
Name="MQJMS Destination" RemoteJNDIName="jms/IMediaQueue"/>
</ForeignJMSServer>
Message was edited by:
[email protected]
Message was edited by:
[email protected]Thanks for going over the problem it is resolved now by changing weblogic-ejb-jar.xml. To point to weblogic initial context factory. Since weblogic has a foreign server defined so MDB is able to read from MQ que.
Thanks
Akash
<weblogic-enterprise-bean> <ejb-name>MesssageHandlerBean</ejb-name> <message-driven-descriptor> <destination-jndi-name>jms.MediaQueue</destination-jndi-name> <initial-context-factory> weblogic.jndi.WLInitialContextFactory</initial-context-factory> <provider-url>t3://localhost:7001</provider-url> <connection-factory-jndi-name>jms.MediaQcf</connection-factory-jndi-name> </message-driven-descriptor> <jndi-name>MesssageHandlerBean</jndi-name> </weblogic-enterprise-bean> -
Hi all,
Iam facing a limitation with Foreign JMS server.
We are tyring to migrate from Message Bridge to Foreign JMS server.
Our current setup is
We have 3 MQ queues which are bridged to one JMS destination(queue).The MDB is consuming messages from the weblogic queue.
If we want to replace this setup with Foreign JMS server the MDB can connect to only one MQ queue.
We want the MDB to consume messages from all the 3 queues.
How can we acheive this ?
Thanks,
RabbaniU should take my reply with a grain of salt because I'm pretty new at this stuff but I don't think it's within an MDBs design to listen to more than one queue/topic so therefore you'll have to create additional MDBs that either listen to each foreign queue individually and do whatever your single MDB is doing with the data now or create the n MDBS (where n = number of foreign queues currently bridgin to the one) that then publish to an intermediate topic which your existing MDB can listen to.
Hope this helps, figure if I'm going to be pounding the boards with questions I should try to contribute where I can ;)
And also, if you do setup the foreign JMS provider feel free to take a look at my topic and provide your experience if you think it will help :D -
Start-mdbs-with-application does not work
Hi,
We have a cluster with two managed servers and a JMS server on a migratable target on WLS 10.3.2. We have some MDBs within an EAR module deployed on the cluster. When the managed servers are restarted, WLS produces the following warning:
<The Message-Driven EJB: LogReceiver is unable to connect to the JMS destination: jms/loggingQueue. The Error was:
javax.naming.NameNotFoundException: Unable to resolve 'jms.loggingQueue'. Resolved 'jms'; remaining name 'loggingQueue'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at weblogic.jms.common.CDS$2.run(CDS.java:222)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.jms.common.CDS.getDDMembershipInformation(CDS.java:216)
at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createMDManagers(MessageDrivenBeanInfoImpl.java:1295)
at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.activate(MessageDrivenBeanInfoImpl.java:1092)
at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:1324)
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:480)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:415)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:75)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:67)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
We have configured a System module with a ConnectionFactory on a default targetting and a Queue deployed on the JMS Server. The jndi names for the ConnectionFactory and the Queue have been properly configured.
Apparently, the container tries to bind the MDBs with their relative destination, but is unable to proceed due to the cluster jndi not having been loaded yet. According to the documentation, we could manage to avoid this early binding by specifying
<wls:start-mdbs-with-application>true</wls:start-mdbs-with-application>
in weblogic-application.xml. I tried (also using false, because the documentation is not that clear in this aspect), but without any result. Is there a reason why we cannot manage to have the mdbs connecting later with their destination?
Also, we got a warning message in the deployment page, claming that the MDBs in the server that is not hosting the JMS server are not connected to their destination. They stuck on state "initializing". While, if we manually resume the connection, via console, the state turns to "Connected". Are these issues correlated somehow?
Any help will be very much appreciated.
Thanks in advance,
- Francesco.Hi Francesco,
From the link below (i.e. Oracle link for WLS-11g) it states that
“Set to false to defer message processing until after WebLogic Server opens its listen port.”
Search for: start-mdbs-with-application
Link-1 http://download.oracle.com/docs/cd/E15523_01/web.1111/e15493/summary.htm
*# Conclusion:*
This means that “false” should have resolved your issue but it is not so this might be a bug. Similar bug was seen in WLS-9.2 version which was fixed in WLS-9.2 Mp-1 version check out the link below.
Search for: CR293982 or CR299012
Link-2 http://download.oracle.com/docs/cd/E13222_01/wls/docs92/issues/known_resolved.html
However if it was fixed in WLS 9.2 Mp-1 then the same issue is most probably taken care in WLS 10.x.x version also.
*# Suggestion:*
- Try to set “start-mdbs-with-application” as “true” and check if that works for you.
This is because if you read the “Link-1″ carefully it states that “With default setting of true”, however when you check the “Default” column it shows “false”. Hence cant say which one is default. It might be document bug as well. However you have tried it so you can skip this suggestion.
*# How to solve this issue:*
1) Create a simple test case to prove that “start-mdbs-with-application” when set as “false” does not work.
2) Open a ticket with Oracle and provide all the details with the test case and let them do their job.
Hope this information helps.
Regards,
Ravish Mody -
Whitepaper on foreign JMS providers
The white paper that I posted a little while ago on integrating WLS 7.0 with
foreign JMS providers is now available on the "dev2dev" website. You can use
this link:
http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
and click on "Using foreign JMS providers with JMS".
And you can also use this:
ftp://edownload:[email protected]/pub/downloads/jmsproviders.pdf
greg
The white paper that I posted a little while ago on integrating WLS 7.0 with
foreign JMS providers is now available on the "dev2dev" website. You can use
this link:
http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
and click on "Using foreign JMS providers with JMS".
And you can also use this:
ftp://edownload:[email protected]/pub/downloads/jmsproviders.pdf
greg
-
Configuring WL JMS as a foreign JMS provider with security scope (WLS 8.1)
Hello, i have a problem accessing a queue from a foreign jms provider, if the queue has a security policy. I have the following scenario:
1) Server server1 in domain1 (WLS81) has a JMS Server with one queue queue1 with a security policy "Caller is a member of the group GROUP_QUEUE". There is also a user USER_QUEUE user defined, which belongs to the this group.
There is also a ConnectionFactory with "XA Connection Factory Enabled = true" configured.
The queue and the connection factory are visible in the jndi tree of this server.
2) Server server2 has a foreign jms server. Foreign JMSConnectionFactory and foreign JMSDestination refer to the jndi entries of server 1. For Foreign JMS Connection Factory username is set to USER_QUEUE. JNDI entries for foreign references are visible in jndi tree of this server.
I wrote a standalone client to store messages in the queue accessing server1 with USER_QUEUE sucessfully.
Now I try to deploy a MDB on server2 accessing the queue on server 1. I tried different versions of ejb-jar.xml/weblogic-ejb-jar.xml to access the queue, but with no luck.
scenario a): no security entries in both descriptors; weblogic-descr has entries <destination-jndi-name> and <connection-factory-jndi-name> pointing to the local jndi names. REsult:
<11.02.2005 19.16 Uhr CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
CancelEasyMoneyBean is unable to connect to the JMS destination: prepaid.Cancel
EasyMoneyQueue. The Error was:
[EJB:010196]'weblogic.jms.common.JMSSecurityException: Access denied to resource
: type=<jms>, application=, destinationType=queue, resource=CancelEasyMoneyQueue
, action=receive' Linked exception = 'weblogic.jms.common.JMSSecurityException:
Access denied to resource: type=<jms>, application=, destinationType=queue, reso
urce=CancelEasyMoneyQueue, action=receive'
So entering username and password for ForeignJMSConnectionFactory doesn't do the trick.
scenario b:) trying to set additional security entries in both descriptors. I added a role queueUser to my mdb and to weblogic-descr a
<security-role-assignment>
<role-name>queueUser</role-name>
<principal-name>USER_QUEUE<principal-name>
</security-role-assignment>
I added the user USER_QUEUE and the group GROUP_QUEUE to server2.
Now server 1 throws exception after redeployment on server 2:
java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE].
java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE]
at weblogic.security.service.SecurityServiceManager.seal(SecurityService
Manager.java:680)
Has anybody an idea or a pointer how to define access from a mdb to a foreign queue using security ?
Thanks in advance,
RainerHello, i have a problem accessing a queue from a foreign jms provider, if the queue has a security policy. I have the following scenario:
1) Server server1 in domain1 (WLS81) has a JMS Server with one queue queue1 with a security policy "Caller is a member of the group GROUP_QUEUE". There is also a user USER_QUEUE user defined, which belongs to the this group.
There is also a ConnectionFactory with "XA Connection Factory Enabled = true" configured.
The queue and the connection factory are visible in the jndi tree of this server.
2) Server server2 has a foreign jms server. Foreign JMSConnectionFactory and foreign JMSDestination refer to the jndi entries of server 1. For Foreign JMS Connection Factory username is set to USER_QUEUE. JNDI entries for foreign references are visible in jndi tree of this server.
I wrote a standalone client to store messages in the queue accessing server1 with USER_QUEUE sucessfully.
Now I try to deploy a MDB on server2 accessing the queue on server 1. I tried different versions of ejb-jar.xml/weblogic-ejb-jar.xml to access the queue, but with no luck.
scenario a): no security entries in both descriptors; weblogic-descr has entries <destination-jndi-name> and <connection-factory-jndi-name> pointing to the local jndi names. REsult:
<11.02.2005 19.16 Uhr CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
CancelEasyMoneyBean is unable to connect to the JMS destination: prepaid.Cancel
EasyMoneyQueue. The Error was:
[EJB:010196]'weblogic.jms.common.JMSSecurityException: Access denied to resource
: type=<jms>, application=, destinationType=queue, resource=CancelEasyMoneyQueue
, action=receive' Linked exception = 'weblogic.jms.common.JMSSecurityException:
Access denied to resource: type=<jms>, application=, destinationType=queue, reso
urce=CancelEasyMoneyQueue, action=receive'
So entering username and password for ForeignJMSConnectionFactory doesn't do the trick.
scenario b:) trying to set additional security entries in both descriptors. I added a role queueUser to my mdb and to weblogic-descr a
<security-role-assignment>
<role-name>queueUser</role-name>
<principal-name>USER_QUEUE<principal-name>
</security-role-assignment>
I added the user USER_QUEUE and the group GROUP_QUEUE to server2.
Now server 1 throws exception after redeployment on server 2:
java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE].
java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE]
at weblogic.security.service.SecurityServiceManager.seal(SecurityService
Manager.java:680)
Has anybody an idea or a pointer how to define access from a mdb to a foreign queue using security ?
Thanks in advance,
Rainer -
Using foreign JMS providers with wls
does anybody have a clou, where i can find that article, i think it's
by steve felts on using foreign JMS providers with wls? i think the
link on dev2dev is broken?
The new article is called "Using Foreign JMS Providers with WLS" and it's
here:
http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
greg
"leopld goess" <[email protected]> wrote in message
news:[email protected]..
> does anybody have a clou, where i can find that article, i think it's
> by steve felts on using foreign JMS providers with wls? i think the
> link on dev2dev is broken?
-
MDB Credential Mapper for connecting to secured foreign JMS - Need WLST
Hello All
Weblogic 10.3.0
I am in a situation where i have the MDB trying to read messages from secure foreign jms . The ejb-jar and weblogic-jar.xml has the right values like
ejb-jar.xml
==========
<assembly-descriptor>
<security-role>
<role-name>admin</role-name>
</security-role>
</assembly-descriptor>
weblogic-ejb-jar.xml
==============
<run-as-principal-name>CFAMJMS</run-as-principal-name>
<security-role-assignment>
<role-name>admin</role-name>
<principal-name>CFAMJMS</principal-name>
</security-role-assignment>
</weblogic-ejb-jar>
If i am correct , to connect to the Secured Foreign JMS Connection - There are couple of steps involved
1) To create a new security wlsuser under myrealm - called CFAMJMS
2) Each MDB deployed as part of the ear file - I need to perform the credential Mapping - Means
EJB Component Credential Mappings - create a WLS user of the name CFAMJMS and supply the Remote JMS User Name and Password .
Today , i perform the setp 2 ) using the Weblogic Admin Console . Need to automate the same using wlst script . Please helpHi,
Similar question was answered in this thread...
JMS integration with Tibco EMS via SSL
Could you please check if your TIBCO EMS is ssl enabled .Login on TIBCO EMS using putty and then type show config and check for the following parameter ssl_server_identity ,ssl_server_key . Go to the path mentioned in these two properties and see if the certificate with .pem is present there.
As you are getting following error in the log
Caused by: javax.jms.JMSSecurityException: Can not initialize SSL client: no trusted certificates are set
In TIBCO we need trusted store .pem certificate to make it ssl enabled.
Cheers,
Vlad
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
https://forums.oracle.com/forums/ann.jspa?annID=893 -
Foreign JMS vs. Remote MDB
Hi,
I have a JMS scenario that I'm hoping to get some input on. The system architecture is as follows:
One WebLogic 8.1 SP5 domain with a JMS server
One WebLogic 9.2 MP1 domain with no JMS server
We'd like to consume a JMS message that's sitting on a queue in the 8.1 domain by code running on the 9.2 domain.
Without configuring a JMS server in the 9.2 domain (which we'd like to avoid), the two obvious options are:
1. An MDB running on the 9.2 server that connects to a queue on the 8.1 server
2. An MDB running on the 9.2 server that connects to a foreign JMS server locally which in turn is linked to the 8.1's JMS server
Does anyone have any suggestions, experience from this or a similar scenario?
The main areas that I'd be interested in are:
- Inter domain compatability
- Any problems with Transactions, XA
Many thanks,
EoinHi,
I think your approach is fine - inter-version compatibility is supported for both JMS and XA. You'll need to ensure that all 9.1 and 8.1 WL domain names are unique, ditto for all 8.1 WL server names, 8.1 WL store names, plus 8.1 JMS server names (even across different domains).
"1" and "2" are essentially the same in that "Foreign JMS" is simply a mapping from the local JNDI naming service to a remote JMS service . "2" tends to be preferable as it can simplify administration once configured. For more information, see the "Integrating Remote JMS Providers" FAQ linked off of this page: "http://edocs.bea.com/wls/docs92/messaging.html".
FYI There are advantages in using 9.x and later JMS - not only does it have a broader set of features, but it also has more sophisticated message management (use the console to pause/resume dests, view individual messages, etc), and significantly higher performance. Also, 9.x MDBs do a better job of connecting to remote 9.x distributed destinations than 8.1 MDBs - as they automatically ensure that all component destinations get serviced.
Tom -
I'm getting following error in weblogic server log when starting a JMS Event generator
to a foreign JMS(MQ5.3) Queue.
<May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010096> <The Message-Driven
EJ
B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
JMSQueue. Connection failed after 2 attempts. The MDB will attempt to reconnect
every 10 seconds. This log message will repeat every 600 seconds until the condi
tion clears.>
<May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven
EJ
B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
JMSQueue. The Error was:
[EJB:010112]The Message Driven Bean 'mqQueueEventGen' is transacted, but the pro
vider defined in the EJB is not transacted. Provider should be transacted if onM
essage method in MDB is transacted.>
My WLI8.1.2 is patched with CR131686_812.zip to support event generator for foreign
JMS destinations. The foreign JMS/MQ provider is configured properly. QueueSend/Receive
were tested fine with JMS java code using local JNDI names of foreign JMS objects.
So we know that foreign Queue is active and accessiable from webLogic.
Anyone run into this? Solution?
Thanks,
ScottHi Scott,
I need a transaction from the MDB since I am not using an EJb to pursue the action.
Hence I need to retain the <trans-attribute>Required</trans-attribute> at the
MDB.
Have any answers?
Pradip
"Scott Yen" <[email protected]> wrote:
>
It's resolved.
The MDB automatically created by JMS Event Generator defaults to be deployed
with
“transacted”. That requires the foreign JMS provider to be “XA”.
The deployment descriptor is created as <domain-directory>/WLIJmsEG_<event_gen_name>.jar
e.g. C:\bea812\user_projects\domains\jmsInterop\WLIJmsEG_mqQueueEventGen.jar
Since MQ in the localhost and remote SLUDV18 are not XA-enabled, we had
to manually
change the <container-transaction> section in ejb-jar.xml:
From :
<trans-attribute>Required</trans-attribute>
To:
<trans-attribute>NotSupported</trans-attribute>
"Scott Yen" <[email protected]> wrote:
I'm getting following error in weblogic server log when starting a JMS
Event generator
to a foreign JMS(MQ5.3) Queue.
<May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010096> <The Message-Driven
EJ
B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
JMSQueue. Connection failed after 2 attempts. The MDB will attempt to
reconnect
every 10 seconds. This log message will repeat every 600 seconds until
the condi
tion clears.>
<May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven
EJ
B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
JMSQueue. The Error was:
[EJB:010112]The Message Driven Bean 'mqQueueEventGen' is transacted,
but the pro
vider defined in the EJB is not transacted. Provider should be transacted
if onM
essage method in MDB is transacted.>
My WLI8.1.2 is patched with CR131686_812.zip to support event generator
for foreign
JMS destinations. The foreign JMS/MQ provider is configured properly.
QueueSend/Receive
were tested fine with JMS java code using local JNDI names of foreign
JMS objects.
So we know that foreign Queue is active and accessiable from webLogic.
Anyone run into this? Solution?
Thanks,
Scott -
Load balancing MQ 7.0 Foreign JMS Server and Weblogic 10 MDBs?
We have the following configuration and we are trying to troubleshoot what appears to be a load balancing issue.
We have 3 Solaris servers. Each Solaris server has two Weblogic managed servers running on it. There are a total of 6 managed servers in the Weblogic cluster.
MQ Series 7.0 is also installed on each Solaris server. The MQ queue managers are in a MQ cluster. Each queue manager has the same queues defined.
We have a foreign JMS Server configured on Weblogic that has destinations and a connection factory defined. There aren't many configuration options available for the connection factory. The destinations are bound to the queues defined on MQ using the MQ bindings file.
The MQ bindings file was generated using the TRANSPORT(BIND) mechanism. Each bindings file points to the queue manager running on that machine. So the 2 managed servers running on one machine are accepting messages from the queue manager on that machine.
The MDB's listenning for messages on the MQ queues are configured as follows in the weblogic-ejb-jar.xml:
<max-beans-in-free-pool>16</max-beans-in-free-pool>
We also created a custom work manager with min threads constraint=5 and max threads constraint=16. The dispatch-policy of all the MDBs is set to the custom work manager.
The open input count on each MQ queue managers shows up as 32 which is expected.
The default load algorithm on the cluster is round-robin.
When we run a load test (injecting 40 messages per second on one MQ queue), we notice that one managed server ends up being significantly loaded than the other. Each MQ queue manager in the MQ cluster receives approximately the same number of messages in the load test. But it seems like one managed server is preferred over the other in Weblogic.
What can be done to equally balance the load among the two managed servers on each Solaris server?
Thanks for the help.Load balancing generally applies at determing how many consumer threads has to be created on each of the clustered queue instance. In that sense you have achieved perfect load balancing as your queue instances has the same no of consumer threads.
Once you have set 'x' consumer threads on a queue, it is upto messaging provider to decide which thread to deliver a particular message and you will hardly have any control over this. Since your 32 threads are listening on the same queue, MQ can select any thread for delivering the message and the behaviour could be non deterministic.
One option to change your design is to have a dispacther mdb which picks the messages off the MQ and then routes to a weblogic distributed destination and you can have your core mdb which does all processing listen to this distributed destination. You can enable load balancing when the disaptcher mdb routes the message to the distributed destination. Since dispatcher MDB is nothing more than a router, the unbalanced consumption off the MQ shouldn't seriously affect the server. -
MDB not connecting to Foreign JMS destination
I'm running WL 9.2 MP3 on Windows machine. I'm deploying a rudimentary MDB congured against as Foreign Service JMS provider against MQ V6.0 with local queue running on the same local machine.
I'm using Maven2 to build all the sub-projects - including my ejb project and enterprise application project. The EAR file deploys successfully without any errors (one minor warning about lack of explicity transactionsi in onMessage() method...). I don't see any errors but my MDB Connection Status is "disconnected" - I've enabled Debug for key sections under default and weblogic sections - still not errors of any kind but it does not connect! What can I do to find the problem?!
Here is my EJB definition:
public class AnotherBean extends GenericMessageDrivenBean implements
MessageDrivenBean, MessageListener {
private static final long serialVersionUID = 1L;
/* When the bean is activated, this method will be invoked
* @see javax.jms.MessageListener#onMessage(javax.jms.Message)
public void onMessage(Message msg) {
System.out.println("\n=========================================");
System.out.println("=> Message received!");
if (msg instanceof TextMessage) {
try {
System.out.println("=> Message: "
+ ((TextMessage) msg).getText());
} catch (JMSException e) {
e.printStackTrace();
// Place the message on to the reply queue (WLReplyQueue)
System.out.println("=========================================");
Here is my ejb-jar.xml:
<ejb-jar
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
<enterprise-beans>
<message-driven>
<ejb-name>AnotherBean</ejb-name>
<ejb-class>com.ibm.myclient.gems.ejb.AnotherBean</ejb-class>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</ejb-jar>
Here is my weblogic-ejb-jar.xml:
<weblogic-ejb-jar
xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>AnotherBean</ejb-name>
<message-driven-descriptor>
<destination-jndi-name>jms/WLReceiverQueue</destination-jndi-name>
<connection-factory-jndi-name>jms/WLReceiverQCF</connection-factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
WL JMS module is setup like this:
<weblogic-jms xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schema
Location="http://www.bea.com/ns/weblogic/920 http://www.bea.com/ns/weblogic/920.xsd">
<foreign-server name="MQTestForeignServer">
<default-targeting-enabled>true</default-targeting-enabled>
<foreign-destination name="ReceiverDetails">
<local-jndi-name>jms/WLReceiverQueue</local-jndi-name>
<remote-jndi-name>MQSenderQueue</remote-jndi-name>
</foreign-destination>
<foreign-destination name="ReplyDetails">
<local-jndi-name>jms/WLReplyQueue</local-jndi-name>
<remote-jndi-name>MQReceiverQueue</remote-jndi-name>
</foreign-destination>
<foreign-connection-factory name="ReceiverCF">
<local-jndi-name>jms/WLReceiverQCF</local-jndi-name>
<remote-jndi-name>MQSenderQCF</remote-jndi-name>
</foreign-connection-factory>
<foreign-connection-factory name="ReplyCF">
<local-jndi-name>jms/WLReplyQCF</local-jndi-name>
<remote-jndi-name>MQReceiverQCF</remote-jndi-name>
</foreign-connection-factory>
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
<connection-url>file:/ C:/JNDI-Directory</connection-url>
</foreign-server>
</weblogic-jms>Thanks for the tips - I solved the problem. I first recreated my .bindinds file making sure that both QCF objects are in there (it turned out that only ONE of them was there and not the other). Next, I also removed an extra space " " from the URL reference in the Foreign JMS service setup in the console:
was like this initially:
<connection-url>file:/ C:/JNDI-Directory</connection-url>
and I changed it to this - removing single space after first "/":
<connection-url>file:/C:/JNDI-Directory</connection-url>
Restarted the whole thing and it worked! Thanks again. -
Problem connecting weblogic OSB with IBM websphere via foreign JMS
Hi All,
I am trying to setup Foreign JMS. My configuration doesn’t work.
Could you please let me know if I am missing anything .
All my configuration details are done as specified in this link http://www.oracle.com/technology/products/integration/service-bus/docs/osb-websphere-whitepaper.pdf
Here is what I did.
In OSB sbconsole
OSB business Service ENDPoint URL jms://webspherehost:9082/sampleQueuemanager/sampleQueue
In websphere
Created a queue connection factory and a queue from the webspehere administrator console.
Modified JSMAdmin.config to enable the following…/Java/bin/JMSAdmin.config.
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JNDI-Directory
Ran JSMAdmin.bat to bind the JNDI
def qcf(sampleQueuemanager) qmanager(QMGR) HOSTNAME(webspherehost) PORT(1327) TRANSPORT(CLIENT)
def Q(sampleQueue) queue(sampleQueue) qmanager(QMGR) PERSISTENCE(PERS)
InitCtx> dis ctx
JMSADM4089 InitCtx
.bindings java.io.File
bck_.bindings java.io.File
a sampleQueuemanager com.ibm.mq.jms.MQQueueConnectionFactory
a sampleQueue com.ibm.mq.jms.MQQueue
4 Object(s)
0 Context(s)
4 Binding(s), 2 Administered
In weblogic admin console
Created foreign JMS, destination and connection factory as mentioned in the following link.
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/ConsoleHelp/taskhelp/jms_modules/foreign_servers/CreateForeignConnectionFactories.html
When I execute business service from OSB sbconsole, this is what I get.
+The invocation resulted in an error: [JMSPool:169803]JNDI lookup of the JMS connection factory sampleQueuemanager failed: javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason: HTTP/1.1 400 Bad Request]].+
Thanks
sivaLittle confusing. Are we not supposed to use osb host name and port along with foreign connection factory created in weblogic for OSB BS?.
You said: jms://webspherehost:9082/sampleQueuemanager/sampleQueue
We have to jms://osbhost:port/ForeignQueueManagerInWeblogic/ForeignQueueInWeblogic
Manoj
Maybe you are looking for
-
Upgrading to Mountain Lion and lack of support for Power PC Applications
Hi I have been reading with interest the comments and questions about this. I am a bit of a novice with pc/mac terminology so was baffled to receive the message about Power PC Applications. I merely upgraded to Lion thinking it would be great to ha
-
I had Mac OS 10.3.9 installed and updated with the latest updates. First Safari went down --could not bring in a web site to save it's life! then slowly other things seemed buggy. So I did the usual -dumped cache, history, backed up every thing. Then
-
Library can't be expanded through referencing different locations for media
Ok, Apple wants us all to be save and not to loose any of the contents we purchase through Apple TV. So it copies everything that is on your Apple TV to your iTunes library. This is a nice idea that, unfortunately, comes with a huge inconvenience: th
-
Problem reading content link from repository
Hi I stored some html link & images in the content repository.I am able to show them in my jsp page(one by one).After that if i click the any of the displayed links, i am getting following error messages.Can u help me this one ? Here i enclosed code
-
DTW error - internal error -5002 occuredApplication-defined 65171
hi trying to import orders. i have 4 in a file. 3 work fine. the 4th doesn't and gets above error. i have looked at the file column by column. all the same columns are filled in i am able to enter the order manually. this error is useless. i have no