MDB Help needed.......Plzzzzzzzzzzzz help me
I am working on a message driven bean (MDB).
Purpose of bean-- This bean is going to read messages from a JMS topic that is a database topic and through it into JMS Queue.
Both the topic and Queue are in same database.I am working on oracle application server with J developer IDE
I have written code that is reading from the topic i am successful in doing so but the problem is putting message from Bean to the Queue. Messages are not going into Queue.I can see the message in my server logs taht Bean class is reading from Topic but unable to put it into Queue.
I have provided the details of topic in ejb-jar.xml and orion-ejb.xml
Below is the my code for Bean Class.
public class CustomReadAIAErrorTopicMDB implements javax.ejb.MessageDrivenBean,
javax.jms.MessageListener {
private transient MessageDrivenContext mdbCtx = null;
public CustomReadAIAErrorTopicMDB() {
public void setMessageDrivenContext(MessageDrivenContext mdc) {
this.mdbCtx = mdc;
public void ejbCreate() throws Exception {
public void ejbRemove() {
public void onMessage(Message msg) {
TextMessage textMsg = null;
try {
/* This message was created as a JMS BytesMessage. */
if (msg instanceof TextMessage) {
textMsg = (TextMessage)msg;
String text = textMsg.getText();
System.out.println("Message received=" + text);
InitialContext jndiContext;
jndiContext = new InitialContext();
QueueConnectionFactory factory;
factory = (QueueConnectionFactory)jndiContext.lookup("aiaErrorQueue/AIATCF");
Queue queue;
// queue = (Queue)jndiContext.lookup("java:comp/resource/aiaRP/AIA_CUSTOM_ERROR_Q");
queue = (Queue)jndiContext.lookup("AIAOJMS/Queue/jms/queue/AIA_CUSTOM_ERROR_Q");
QueueConnection connect;
connect = factory.createQueueConnection();
QueueSession session;
session = connect.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueSender sender;
sender = session.createSender(queue);
TextMessage message;
message = session.createTextMessage();
message.setText(text);
System.out.println("This mesage is from CustomMDB: " + message.getText());
sender.send(message);
connect.close();
session.close();
} catch (Exception e) {
//throw new RuntimeException("onMessage throws exception");
e.printStackTrace();
--------------------------------ejb-jar.xml-----------------------------------------------
<enterprise-beans>
<message-driven>
<description>Message Driven Bean</description>
<display-name>CustomReadAIAErrorTopicMDB</display-name>
<ejb-name>CustomReadAIAErrorTopicMDB</ejb-name>
<ejb-class>mdb.CustomReadAIAErrorTopicMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>ConnectionFactoryJndiName</activation-config-property-name>
<activation-config-property-value>aiaErrorTopic/AIATCF</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>DestinationName</activation-config-property-name>
<activation-config-property-value>AIAOJMS/Topics/jms/topic/AIA_ERROR_TOPIC</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>DestinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Topic</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>messageSelector</activation-config-property-name>
<activation-config-property-value></activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
<enterprise-beans>
------------------------------------------------------------ orion-ejb-jar.xml----------------------------------------
<enterprise-beans>
<message-driven-deployment name="CustomReadAIAErrorTopicMDB"
resource-adapter="AIAOJMS">
<config-property>
<config-property-name>DestinationType</config-property-name>
<config-property-value>javax.jms.Topic</config-property-value>
</config-property>
<config-property>
<config-property-name>DestinationName</config-property-name>
<config-property-value>java:comp/resource/aiaRP/Topics/AIA_ERROR_TOPIC</config-property-value>
</config-property>
<config-property>
<config-property-name>messageSelector</config-property-name>
<config-property-value></config-property-value>
</config-property>
<config-property>
<config-property-name>ConnectionFactoryJndiName</config-property-name>
<config-property-value>aiaErrorTopic/AIATCF</config-property-value>
</config-property>
<config-property>
<config-property-name>SubscriptionDurability</config-property-name>
<config-property-value>Durable</config-property-value>
</config-property>
<config-property>
<config-property-name>ClientID</config-property-name>
<config-property-value>aia</config-property-value>
</config-property>
<config-property>
<config-property-name>SubscriptionName</config-property-name>
<config-property-value>aia</config-property-value>
</config-property>
</message-driven-deployment>
</enterprise-beans>
Any help appreciated
Thanks in advance
I worked some time back, using OC4J, and Oracle AQ.
i created a AQJMS Adapter using OC4J console, and wrote an AQ Message Sender for sending messages.
you can below the code snippet:
InitialContext ctx = new InitialContext();*
queueConnectionFactory = (QueueConnectionFactory)ctx.lookup("AQJmsAdapter/MyQCF");*
sendQueue = (Queue)ctx.lookup("AQJmsAdapter/AutoWrap/Queues/LOCAL_Q");*
queueConnection = queueConnectionFactory.createQueueConnection();*
queueSession = queueConnection.createQueueSession(false, 0);*
queueConnection.start();*
queueSender = queueSession.createSender(sendQueue);*
TextMessage TextMsg = queueSession.createTextMessage("***"));*
queueSender.send(lTextMsg);*
Code looks similar to the code you wrote, but there might be some jar missing.
Also, is your Queue Connection factory and Queue bind to the jndi name.
What exception you are getting.
Edited by: shekup on Mar 1, 2010 8:01 AM
Edited by: shekup on Mar 1, 2010 8:02 AM
Similar Messages
-
MDB help with regards to naming of topic?
I am preparing for SCBCD and the EJB3.0 book from oreilly fails to mention how to configure a MDB to listen to a specific topic?
Lets say messages are being sent to topic "myTopic" how sould I configure a MDB bean to lsiten for that topic?
Many thanks
Yuccagimbal2 wrote:
It doesn't?
http://oreilly.com/catalog/entjbeans3/chapter/ch13.html
No. I seem to be looking at the actual book here and the link you posted does not cover the crux of my issue which is:
"How do you configure the MDB to listen to a specific topic?"
The actual book (Have it in front of me) on page 268 of the 5th edition only defines the activationConfig attribute of the @MessageDriven() annotaion as follows:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Que"),
@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "MesaageFormat='version3.4'"}),
@ActivationConfig(propertyName = "acknowledgeMode", propertyValue = "Auto-Acknowledge"))Ok so we have a MDB that listens to messages from a QUE but which QUE? all Que's?
I also found this in EJB 3 in Action book:
@MessageDriven(
name="ShippingRequestProcessor",
activationConfig = {
@ActivationConfigProperty(
propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(
propertyName="connectionFactoryJndiName",
propertyValue="jms/QueueConnectionFactory"
@ActivationConfigProperty(
propertyName="destinationName",
propertyValue="jms/ShippingRequestQueue")
)Here they use destinationName hich I think is what I am looking for but unsure on how this maps in xml? Jboss uses destination but shoudl it not be destination-name?
Edited by: Yucca on Oct 16, 2009 8:03 AM -
No response from ejb group, try if i have any luck here. Thanks in advance for
any suggestion.
>Hi,
>
>I have a couple MDBs that need the producer pool and other resources
>that are
>initialized in a startup servlet, though I put the web app that the servelet
>in
>as the first module in the app, the servlet finish the loading still
>after the
>other ejbs, so the MDB starts processing the acumulated message, of cource
>it
>can't. how can I make sure the MDB starts receiving message after the
>app fully
>started?
>
>Similiarly, when the server is shuting down, the app is unloaded, but
>the server
>still accepting request, the ejbs, MDBs still there, of cource the MDBs
>can't
>use the producer pool anymore.
>
>How can I deal with the two gaps?
"Jen" <[email protected]> wrote:
>
Hi,
I have a couple MDBs that need the producer pool and other resources
that are
initialized in a startup servlet, though I put the web app that the servelet
in
as the first module in the app, the servlet finish the loading still
after the
other ejbs, so the MDB starts processing the acumulated message, of cource
it
can't. how can I make sure the MDB starts receiving message after the
app fully
started?
Similiarly, when the server is shuting down, the app is unloaded, but
the server
still accepting request, the ejbs, MDBs still there, of cource the MDBs
can't
use the producer pool anymore.
How can I deal with the two gaps? -
Load balancing and clustered MDBs using a Queue
With the following advice/information from
http://e-docs.bea.com/wls/docs61/faq/jms.html#252978,
"One customer had an example where topic MDBs are needed in which there will
be multiple implementations of the MDBs listening on the same topic. In
other words, more than one MDB with a different implementation may be
subscribing to the same topic. The client has no advanced way of knowing how
many different kinds of MDBs may be listening on the same topic, but it is
possible for there to be more than one listener, therefore topics, not
queues. For each kind of MDB listening on the topic, the message is
delivered exactly once (i.e., the message will be delivered exactly once to
an instance in each named MDB pool listening on the topic)."
If I have a set of MDB's scraping Messages from the JMS Queue, what is the
load-balancing behavior?
1) Consider a lightly-loaded system, where each MDB has sufficient time to
process the message before the next one shows up in the queue. Will the same
MDB get all the messages?
2) Consider a heavily-loaded system, where each MDB has insufficient time to
process the message before the next one shows up in the queue. How would you
characterize the de facto load-balancing behavior? least-loaded?
Have you tried the SAP WebDispatcher. This should acomplish what you want.
http://help.sap.com/saphelp_nw04/helpdata/en/42/5cfd3b0e59774ee10000000a114084/frameset.htm -
How to make dynamic provider-url for MDB.
Hi,
My application has an MDB that need to bind to a remote queue. The .bindigs file is created and put in a specified location. Is there any way I can specify a dynamic value for this location in the <provider-url> tag in my weblogic-ejb.xml file. This is because, in our UNIX test and prod servers, the location of the .bindings file different from what I have on my local box. I have tried like this, but it did not work.
<provider-url>file:/%DOMAIN_DIR%/config/<provider-url>
We always have a 'config' directory under the domain and if the domain name changes in different environments, i don't have to make any changes to my descriptor file.
Thanks,
RajeevI met a similar problem when I used the foreign JMS server. I configured the foreign server via console. I tried to subscribe a remote topic which was maintained by another WebLogic JMS server. When I built my MDB, I got the following exception. The remote JMS server name could not be resolved. Any suggection is appreciated.
<Sep 19, 2005 6:11:56 PM EDT> <Warning> <EJB> <BEA-010061> <The Message-Driven E
JB: SIGNIT is unable to connect to the JMS destination: jms/DCGSCatalogTopic. Th
e Error was:
[EJB:010196]'weblogic.jms.common.JMSException: Error creating session' Linked ex
ception = 'weblogic.jms.dispatcher.DispatcherException: could not find JMS Serve
r riicServer'
weblogic.jms.common.JMSException: Error creating session
at weblogic.jms.frontend.FESession.setUpBackEndSession(FESession.java:79
8)
at weblogic.jms.frontend.FESession.consumerCreate(FESession.java:1038)
at weblogic.jms.frontend.FESession.invoke(FESession.java:2552)
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
a:643)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.ja
va:179)
at weblogic.jms.client.JMSSession.consumerCreate(JMSSession.java:1860)
at weblogic.jms.client.JMSSession.createConsumer(JMSSession.java:1691)
at weblogic.jms.client.JMSSession.createSubscriber(JMSSession.java:1422)
at weblogic.ejb20.internal.JMSConnectionPoller.setUpTopicSessions(JMSCon
nectionPoller.java:1582)
at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSCo
nnectionPoller.java:2009)
at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectio
nPoller.java:1180)
at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling
(JMSConnectionPoller.java:846)
at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.start(MessageDr
ivenBeanPoolInfoImpl.java:234)
at weblogic.ejb20.deployer.EJBDeployer.deployMessageDrivenBeans(EJBDeplo
yer.java:1660)
at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:1488)
at weblogic.ejb20.deployer.EJBModule.start(EJBModule.java:689)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer
.java:2127)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
ner.java:2168)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
activateContainer(SlaveDeployer.java:2503)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(
SlaveDeployer.java:2421)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeplo
yer.java:2138)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(S
laveDeployer.java:2237)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDepl
oyer.java:2132)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
laveDeployer.java:2384)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
veDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
oyer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
loyer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
dler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: weblogic.jms.dispatcher.DispatcherException: could not find JMS Serve
r riicServer
at weblogic.jms.dispatcher.DispatcherManager.dispatcherCreate(Dispatcher
Manager.java:330)
at weblogic.jms.dispatcher.DispatcherManager.dispatcherFindOrCreate(Disp
atcherManager.java:380)
at weblogic.jms.frontend.FESession.setUpBackEndSession(FESession.java:79
6)
... 29 more
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.jms.S
:riicServer' Resolved weblogic.jms; remaining name 'S:riicServer'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:897)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
a:230)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
ava:154)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:18
8)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
6)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
6)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
ava:256)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at weblogic.jms.dispatcher.DispatcherManager.dispatcherCreate(Dispatcher
Manager.java:314)
... 31 more
>
<Sep 19, 2005 6:12:06 PM EDT> <Warning> <EJB> <BEA-010096> <The Message-Driven E
JB: SIGNIT is unable to connect to the JMS destination: jms/DCGSCatalogTopic. Co
nnection failed after 2 attempts. The MDB will attempt to reconnect every 10 sec
onds. This log message will repeat every 600 seconds until the condition clears.
>
<Sep 19, 2005 6:12:06 PM EDT> <Warning> <EJB> <BEA-010061> <The Message-Driven E
JB: SIGNIT is unable to connect to the JMS destination: jms/DCGSCatalogTopic. Th
e Error was:
[EJB:010196]'weblogic.jms.common.JMSException: Error creating session' Linked ex
ception = 'weblogic.jms.dispatcher.DispatcherException: could not find JMS Serve
r riicServer'
weblogic.jms.common.JMSException: Error creating session
at weblogic.jms.frontend.FESession.setUpBackEndSession(FESession.java:79
8)
at weblogic.jms.frontend.FESession.consumerCreate(FESession.java:1038)
at weblogic.jms.frontend.FESession.invoke(FESession.java:2552)
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
a:643)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.ja
va:179)
at weblogic.jms.client.JMSSession.consumerCreate(JMSSession.java:1860)
at weblogic.jms.client.JMSSession.createConsumer(JMSSession.java:1691)
at weblogic.jms.client.JMSSession.createSubscriber(JMSSession.java:1422)
at weblogic.ejb20.internal.JMSConnectionPoller.setUpTopicSessions(JMSCon
nectionPoller.java:1582)
at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSCo
nnectionPoller.java:2009)
at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectio
nPoller.java:1180)
at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoll
er.java:978)
at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.j
ava:243)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
at weblogic.time.common.internal.ScheduledTrigger.executeLocally(Schedul
edTrigger.java:229)
at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigg
er.java:223)
at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:5
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: weblogic.jms.dispatcher.DispatcherException: could not find JMS Serve
r riicServer
at weblogic.jms.dispatcher.DispatcherManager.dispatcherCreate(Dispatcher
Manager.java:330)
at weblogic.jms.dispatcher.DispatcherManager.dispatcherFindOrCreate(Disp
atcherManager.java:380)
at weblogic.jms.frontend.FESession.setUpBackEndSession(FESession.java:79
6)
... 19 more
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.jms.S
:riicServer' Resolved weblogic.jms; remaining name 'S:riicServer'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:897)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
a:230)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
ava:154)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:18
8)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
6)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
6)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
ava:256)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at weblogic.jms.dispatcher.DispatcherManager.dispatcherCreate(Dispatcher
Manager.java:314)
... 21 more
> -
i've been trying to look for codes on how to access the Access 2007 database (.accdb).
i've done a previous JSP app with Access database, but it is of a lower version (.mdb).
i need something like the following, but for the 2007 version. is it just a matter of changing the extension for both statements, or is there more to it?
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String DBQ = request.getRealPath("sales.mdb");
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" + DBQ + ";DriverID=22;READONLY=true";thanks.<%@page import="java.sql.*" %>
<table boder="1">
<%
Statement statement;
Connection conn;
String url = "jdbc:mysql://localhost/dbName";
String user = "username";
String pass = "password";
try {
class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection(url, user, pass);
statement = conn.createStatement();
String query = "SELECT images FROM database";
ResultSet results = statement.executeQuery(query);
while(results.next()) {
%>
<tr>
<td><img src="<%= results.getString("images") %>"></td>
</tr>
<% } %>
</table>The while loop will loop through your result set and print the table row for each image it finds in the query.
Hope this helps,
Jon -
Write a string to a v_path pointer
Hi,
Could anybody show me how to write a string to a v_path pointer of a vnode?
Below is what I want to do:
> 00000300245f53c0::print vnode_t v_path
v_path = 0x300128e5aa0 "/opt/bns/k2/V6.0/script"
> 0x300128e5aa0/W "new_path_name"
mdb: failed to dereference symbol: unknown symbol name
mdb: failed to write "new_path_name": failed to evaluate command
But it gave me error message.
Please help.
Thanks
AlexThere is no write string in mdb so need to do it char by char using ascii codes.
0x300123e8a80::print vnode_t v_path
v_path = 0x30007e56d68 "/usr/bin/vi"
0x30007e56d68,0t11/B
0x30007e56d68: 2f 75 73 72 2f 62 69 6e 2f 76 69
0x30007e56d68/v 2f 65 74 63
0x30007e56d68: 0x2f = 0x2f
0x30007e56d69: 0x75 = 0x65
0x30007e56d6a: 0x73 = 0x74
0x30007e56d6b: 0x72 = 0x63
0x300123e8a80::print vnode_t v_path
v_path = 0x30007e56d68 "/etc/bin/vi"
No idea why you would want too.
Edited by: .robv. on 10-Nov-2009 13:41 -
Messages from topic to multiple consumers are not ordered the same way
Hi,
We have a distributed topic. The message producer is a multi-threaded/connection producer (OSB in our case).
On the other side of the DT there are single connection consumers.
Our problem is that the consumers sometimes recieve the messages in different order:
Consumer A recieves message N and then N+1 (correct behaviour).
Consumer B recieves message N+1 and then N (correct behaviour).
This does not happen all the time. Most of the time the order is correct (99.9..%).
We also noticed that the message timestamp for message N and N+1 is the same.
This creates a problem for our system since both consumers must get the messages in the same order.
We cannot use UOO.
Any idea if this is a correct behavior for DT?
Any idea how to make the messages get to all consumers in the same order without using UOO?
Thanks,Hi,
Hmm. You may have run into some new Bug given since "message timestamp for message N and N+1 is the same". First, let's dot our I's and cross our Ts to make sure that the system is setup in a way that will give you good ordering in the first place:
- Always use the same producer instance for each sequential send, and ensure that the producer's connection factory has "load balance" set to false. Note that OSB may be using a pool of producers implicitly for your sending app underneath-the-covers, which could lead to out-of-order, as different producers can load balance to different servers in your cluster. (I'm not sure how to check for this - if you provide a code snippet, I may be able to tell if this is happening.)
- Ensure that you only ever have a single thread processing the subscription - if you're using MDBs to receive from the subscription, then you need to ensure the MDB is setup to only startup a single thread (use a thread pool of size and/or set max-beans-in-free-pool to one)
- To account for out-of-order after app message processing failures (redelivery) with async consumers or MDBs, you need to (A) never configure redelivery delays, and (B) ensure the connection factory Maximum Messages setting is tuned down to 1 (it's default is 10).
I don't know how to do the above with OSB, which tends to layer it's own configuration on top of WL JMS configuration.
Assuming that you've assured all of the above, then you may have run into some sort of bug and I recommend filing a request with Oracle Support. In the mean-time, you might want to explore alternatives:
- Are you certain that you can't use UOO? It would be interesting to know why. This is a widely used feature (even by OSB itself), and it may be that you can enable it without any code change, plus, even if a code change is required, such changes tend to be isolated and small. In your use case, it looks like you may be able to configure a default UOO on the distributed topic itself (http://docs.oracle.com/cd/E11035_01/wls100/wlsmbeanref/core/index.html) - no code change needed - so that every destination member of your distributed destination will simply ensure that each new message is given the same UOO (a UOO that's particular to that member). OSB may provide some equivalent knob. Alternatively, you can code up your app so that each of your producers sets a useful UOO on each message.
- I assume you're using a replicated distributed topic (RDT). If there actually is a bug, then it would likely have something to do with the RDT's internal forwarders. If your consumers are MDBs or the SOA RA Adapter, then a simple alternative may be to use a Partitioned Distributed Topic (PDT) instead -- PDTs have no forwarders, and the MDB and the SOA RA Adapter can work with them transparently. If your consumers are neither of these, then working with a PDT will likely require that you use extensions (an advanced path that you may not want to take the time to follow).
Tom -
JDBC Adapter can be used for sender / receiver for MS Access ?
Hi Experts
I want to communicate with MS Access by using JDBC sender and receiver
adapter ? How to set up ?
Links/screen shots/etc..........
Adv thanx
regards
rakeshHi Rakesh ,
>>>> Why the driver is : jdbc:odbc:Driver={Microsoft Access Driver
(*.mdb)};DBQ=//xiserver/xitemp/db/TestDB.mdb ?
if your test data base file is TestDB.mdb you need to give the absolute path of the file to get access to JDBC adapter set so you can replace the file path with the corresponding path on your test system .
Please place the data base file in a directory where the XI system has share access.
Regards,
Nanda -
What's new in Weblogic 8.1 using MQ
We will use MQseries 5.3 as are Queuing-system and Weblogic Server 8.1
as our appication server.
We don't have to use transactions in our messages.
I've the following questions.
In weblogic documentation Using Foreign JMS Providers with Weblogic
Server from May 2002 is written For Weblogic 7.
What are the differences with 8 and is there a document written for
version 8.
Must we still write a startup class?
I'll hope someone can give more info about the new features of
WebLogic 8 for using Foreign JMS Providers and the differences with
Weblogic Server 7.
greetings,
Andre Torensma
Developer
Friesland Bank
The document is still valid. That is, you can do what the document says and
they'll still work. However, there are a few new features:
-- "Foreign JMS Server" pages in the console (and config MBeans) let you set
up JNDI "symbolic links" between objects in the WLS JNDI name space and your
own JNDI provider, like the one you use for MQ. This may make it easier to
set up MQ in many cases.
-- The EJB "resource-reference" feature, which you use to bind a JMS
ConnectionFactory into an EJB or servlet's private JNDI tree, wraps the JMS
objects so that it can provide automatic transaction enlistment and pooling.
This means it's a lot easier to send an MQ message from inside an EJB or
servlet. There's a section on "Using JMS with EJBs and Servlets" in the JMS
programming guide that explains how to use this.
-- The startup class that people used in the past was one possible way to
create an MQ connection factory and use it inside WLS. In 7.0, you had the
option of setting up a JNDI provider (like the "filesystem" provider) and
storing your MQ JMS objects in there using the IBM "jmsadmin" tool. The
white paper describes this. You can still do this in 8.1. The difference is
that once you do that, you can use the "Foreign JMS Provider" support so
that you don't have to copy the information about that JNDI provider into
every EJB and MDB that needs to talk to MQ.
greg
"Andre Torensma" <[email protected]> wrote in message
news:[email protected]...
> We will use MQseries 5.3 as are Queuing-system and Weblogic Server 8.1
> as our appication server.
> We don't have to use transactions in our messages.
>
> I've the following questions.
> In weblogic documentation Using Foreign JMS Providers with Weblogic
> Server from May 2002 is written For Weblogic 7.
> What are the differences with 8 and is there a document written for
> version 8.
>
> Must we still write a startup class?
>
> I'll hope someone can give more info about the new features of
> WebLogic 8 for using Foreign JMS Providers and the differences with
> Weblogic Server 7.
>
> greetings,
>
> Andre Torensma
> Developer
> Friesland Bank
-
Send msg to MessageDrivenBean multithreading?
how can i send 5000 msg to a MDB by mutithreading??!!
is it possible to set them in a second by managing multithreading?
or it doesnt have to do with multithreaded client and it has to do with the container or MDB?
if it is possible with multithreading send a simple sample else guide me what can i do?Hi,
First of all. One thing you should be clear is that if you want to run an MDB you need to send messages to the configured destinations. In general the messages are processed in the order in which it arrives to the queue.
For your question it looks like you want a pool of MDB instances running on the server and parallely process them on the server.
Then you may send n (n=5000) messages sequentially to the JMS Destination using some client program and then with the following <pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>in the deployment descriptor for the ejb you can achive parallel processing. -
Weblogic work manager - Control min./max. threads & fair share
I have an application which is running on Weblogic 10.3.2. I need to be able to control the number of threads the server assigns to this application. The application has 3 MDBs and for each of these MDBs, we need to assign a weight so that that the available threads are distributed among the 3 MDBs according to the weight.
After going through the Weblogic documentation, it looks like I could create 3 work managers with the min. threads, max. threads and fair share. These work managers could be assigned to each of the MDBs. But, this does not control the total number of threads the server assigns to the application.
Question:
Is there a way we can create a work manager with the min. threads and max. threads and assign it to the whole application? This could be used to control the min./max. threads assigned to the application. Then we could define 3 work managers with the fair share and assign them to the individual MDBs.Hi ,
You can create a work manager with min. threads and max. threads constraints defined. Check this:
http://www.oracle.com/technetwork/articles/entarch/workload-management3-087769.html
Thanks,
Sharmela -
Help needed on MDB listening on an AQ
We have a MDB which is listening on an AQ in a database. Here is the issue, we need to restart the container (MDB) everyday otherwise after a while, the MDB would not get the message that has been sent to AQ. We thought there is JDBC connection timeout issue, however, we don't know how to setup datasource so that it would not timout. Or may it be connection timeout issue on database side?
Please help.message from q1and q2 needs to be correlated. if MsgID is the key for correlation then create correlation element in the correlation editor. u will have two recv steps in bpm with correlation condition activated. so when a message q1 comes to bpm it will be in wait step until relevant message is arrived from q2. when the correlation condition is satisfied the processing happens. having split mapping u can process the messages and send as idocs to r3. this way is async.
to make it sync (to get the respone from the r3) have one recv step after the send step that would expect a message from r3 on the status. following a send step that sends the response to jms.Thsi requires activating client proxy in r3 that would send the status of the idoc to xi once posted.
or check this link for appl response handleing
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
Edited by: Prabhu S on Jan 8, 2008 4:16 PM -
Need help scripting a DW form to dump into a MDB
I have been tasked with building a form which will dump into
an Access MDB table. That done, I do not see in DW how to cause the
action. Although I have created the Submit button and there is an
action associated with that button type, nothing happens when the
form is filled out. So I am missing an important
link....Help!you need to submit it to another file which in turn will
insert the information on the fold field using SQL. for example...
INSERT INTO contact
VALUES FORM.Firstname, FORM.LastName, FORM.Phone
I don't know what programming code you are using (Coldfusion,
PHP, ASP ..etc).
Here's more information.
http://www.w3schools.com/sql/sql_insert.asp -
Need to consume 10,00,00 msg with the help of mdb configured in Websphere6
Hi ,
Using jdk1.4 and websphere6.0 .My requirement is to consume 10,00,00 messages produced by a java client of a mdb and do the processing as per my project requirement which includes call to 3 mdb and 3 slsb bean in a row one after another which is finally parsed by a java class and finally inserted into database as transaction.
the structure is something like this :
client.java
{ count = 0;
while (count <10,00,00)
{ msg="sasdfdfdsfdf";
sendMessage(msg)---->assume this method writes the message to ABCQ }
ABCMDBBean listen to ABCQ --->on arrival of msg it calls to anothere SLSB bean which do some stuff and write msg to some other XYZQ and so on...finally data is updated into Database.
In current context at most 10 message is consumed and then the entire flow is stucked.I need to process 10,00,00 msg in 1hr. for performence test.Any help would be really appreciated.10.000 messages an hour is nothing, if you have a correctly coded solution on reasonably powerful hardware.
If however your message queue starts blocking after only 10 messages, there's something seriously wrong with your code. And it's not the code you posted (which won't put any serious load on the server as it doesn't necessarilly launch multiple messages into the system without waiting for them to be processed, therefore isn't a valid test at all).
Maybe you are looking for
-
Compare two pdfs in livecycle designer
Does anyone know how to compare 2 pdfs in livecycle. So basically what I want is highlight the differences between 2 pdfs. If anyone has any idea it will be really helpful. Thanks.
-
Departments in a new page _ FR Report
Hi All, We have got 100 departments in the Cube. We need to generate a report where each department will come in a new page. In rows we have account(Suppress missing),we have only ne column budget...........we need to generate a report with budget of
-
Does anyone know of somewhere I can create a photobook on an iPad please?
Does anyone know of somewhere I can create a photobook on an iPad please
-
Stock Transfer between Store (IS-RETAIL)
Hi, I want to transfer the article from one store to another store which is belong to same company code in IS-RETAIL. So what is the procedure and configuration to do. In retail senario store is having only customer master.How the supply store is tre
-
What is Pushdown Optimization in informatica
Hey Satish, Adding to Soundarya, you can do Pushdown optimization at source end also. What I've seen the real time projects is Push down optimization is more useful in Re-engineering projects/Performace Tuning projects. That means as the existing lo