Nidhi Juneja

Greenhorn
+ Follow
since Oct 07, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nidhi Juneja

Hi All,

My application is running on Weblogic 8.1 and I am sending messages to another application on a different server which is also Weblogic 8.1.

Since both of them are on the same weblogic version, I am not using messaging bridge. Can anyone shed light on pros and cons of using a messaging bridge in this scenario. Should I be using messaging bridge?

If yes, I would appreciate if anyone can guide me what changes need to be done as far as code is concerned. I know how to configure the bridge and bridge destinations on the console but not sure what different i need to do in my MDB.

Thanks,
Nidhi
19 years ago
Hi All,

Need to have some clarification on the JMS acknowledge-mode and transactions.
In my application I have a MDB (has conatainer managed transaction )which publishes to a topic ( say TOPIC-A ).
Here is the code i am using to publish:
connection = factory.createTopicConnection();
session = ( TopicSession ) connection.createTopicSession( true, Session.AUTO_ACKNOWLEDGE );
publisher = session.createPublisher( topic );
message = session.createTextMessage();
message.setText( requestXML );

session.commit();
connection.close();
There are 2 subscribers of this topic:

1) MDB (which also has container managed transaction )
it uses following code to publish message to supplier destination queue

_connection = _factory.createQueueConnection();
session = (QueueSession) _connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
sender = session.createSender( _queue );
message = session.createTextMessage();
message.setText(messageRecd);
sender.send(message);
String messageID = message.getJMSMessageID().substring(3);

session.commit();
_connection.close();

2) JMS Subscriber uses the following code to receive the message:
_tConnection = _topicConFactory.createTopicConnection();

TopicSession tSession = _tConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicSubscriber tSubscriber = tSession.createDurableSubscriber( _topic,"gatewaySubscriber" );

tSubscriber.setMessageListener( msgLsnr );

I am using weblogic 8.1. When I look in weblogic console for the details for TOPIC-A, it increments the 'Message Pending' everytime I send a message, although i can see all the messages being consumed and none is lost. And as per BEA
Pending means the message could have been:
* sent in a transaction but not committed.
* received and not acknowledged.
* received and not committed.
* subject to a redelivery delay (as of WebLogic JMS 6.1 or later).
* subject to a delivery time (as of WebLogic JMS 6.1 or later).
Well I don't think any of the above mentioned condition is happening in my case. Can anybody shed some light on why it is happening.
Thanks,
Nidhi
20 years ago
Hi All,
Need to have some clarification on the acknowledge-mode.
In my application I have a MDB which publishes to a topic ( say TOPIC-A ).
While creating the TopicSession I pass the acknowledgement mode as Session.AUTO_ACKNOWLEDGE and I commit the session after publishing.
The MDB is container managed transaction.

There are 2 subscribers of this topic
1) MDB (which also has container managed transaction )and 2) JMS Subscriber

When I look in weblogic console for the details for TOPIC-A, it increments the 'Message Pending' everytime I send a message, although i can see all the messages being consumed and none is lost. And as per BEA
Pending means the message could have been:
* sent in a transaction but not committed.
* received and not acknowledged.
* received and not committed.
* subject to a redelivery delay (as of WebLogic JMS 6.1 or later).
* subject to a delivery time (as of WebLogic JMS 6.1 or later).

Can anybody shed some light on why it is happening.
Thanks,
Nidhi
Hi all,
In my application I have few MDBs using Queues and Topics. I also have few stateless session beans. I want to use constants ( not thru an interface or a constant class ) for the jndi names for all of them instead of actually hardcoding these names while doing the lookups in the code. I am using weblogic 8.1. Is there any way constants can be set in ejb-jar.xml or weblogic-ejb-jar.xml to achieve this.

Will appreciate any inputs.
Thanks,
Nidhi
Hi all,
Need ur inputs about using Container Managed Transaction with MDBs.

I have a MDB which uses some helper classes and a Stateless Session Bean for performing its business logic. I am using Container Managed Transaction for the MDB. Do I need to seperately specify the transaction attribute for the Stateless Session Bean this MDB uses or will it be automatically included in the MDB's transaction.
According to Ed Roman:
If you use Conatiner Managed Transaction, MDB will read off the message in the same transaction as it performs its business logic.

Also how can I test that transactions are working as expected.

Thanks,
Nidhi
Hi All,
I am using Weblogic to run my MDBs. I think the JMS ConnectionFactory and JMS Connection are already pooled and are not hard connections. Can anybody shed some light on this or correct me if I am wrong.
Thanks,
Nidhi
Hi All,

I have a class which is putting messages on the topic. I am reading this messages in the MDB. Although I can see the message being received from the class but my MDB is not reading the messages from the topic. Can anyone please help me find what i am doing wrong?
ejb-jar.xml
<ejb-name>RequestRouteFinderMDB</ejb-name>
<ejb-class>com.gs.bonding.suppliergateway.gateway.request.RequestRouteFinderMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
</message-driven-destination>
weblogic-ejb-jar.xml
<ejb-name>RequestRouteFinderMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>2</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms/client2gatewaytopic</destination-jndi-name>
<connection-factory-jndi-name>jms/sbclientsubconfactory</connection-factory-jndi-name>
</message-driven-descriptor>
JNDI name of the topic : java:/comp/env/jms/client2gatewaytopic
Snippets from the MDB
public void ejbCreate() throws CreateException {
System.out.println("Reached here..........RequestRouteFinderMDB....ejbCreate........");
try {
ctx = new InitialContext();
TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup(SUPPLIER_PUB);
TopicConnection connection = factory.createTopicConnection();
TopicSession session = (TopicSession) connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
Topic topic = (Topic) ctx.lookup(SUPPLIER_TOPIC);
TopicPublisher publisher = session.createPublisher(topic);
} catch (NamingException e) {
throw new CreateException("Naming exception" + e);
} catch (JMSException e) {
throw new CreateException("JMS exception" + e);
}
}
public void onMessage(Message msg) {
System.out.println("Reached here..........RequestRouteFinderMDB....onMessage........");
try {
String gatewayMessage = ((TextMessage) msg).getText();
String supplierMessage = getRoutingInfo(gatewayMessage);
((TextMessage) msg).setText(supplierMessage);
publisher.publish(msg);
} catch (JMSException jmsex) {
} catch (Exception ex) {
}
}

I would really appreciate if someone could shed some light on it.
Thanks,
Nidhi
Hi Guys,
I am fairly new to ejb's and have gone through the concepts once. Just wanted to know if there are any useful links where i can find practice exams just as we have for java over the net.
help!!!
Nidhi
Hello Friends,
A confusion --
I have come across two different ways of ending the jsp tags
<jsp:forward page="msg.jsp"/>
why is it not <jsp:forward page="msg.jsp">
</jsp:forward>
Is there any rule about how to end tags or either way is ok.....
Thanks,
Nidhi
Hi Guys,
I am preparing for the SCWCD and am a bit unclear about the taglib element used in the .tld is it body-content like the usual tag elements are or bodycontent all one word ....i have come across both these types so i am not really sure.
Thanks
Nidhi
Hello All...can any one give me an idea about what will be the logic behind making a mock exam style program. If I make a database of set of questions and answers and the answers type are mixed like a checkbox, radiobutton , textarea....how do I introduce this and also for a given user how is his answers stored in order to evaluate at the end
If anyone could suggest some links where i cud find such a code will be very helpful
Thanks
Nidhi
21 years ago
JSP
I am appearing for the exam tomorrow....could u please give some tips which i should keep in my mind for the same.
Thanx
The reason why one gives a compiler error while another doesnot is clear to me but can anyone help me to find a quick way of calculating the o/p of following computation:
int i = 2147483647 * 2
thanxs
Hi Dan ..thanx for the info ...i am using Windows ME and JDK 1.3