saakshi jain

Greenhorn
+ Follow
since Sep 26, 2011
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 saakshi jain

Hi,

I have:

1) 3 controllers (child controllers). The success view is redirected on to the parent controller url.
2) 3 form views (each one associated with each child controller).
3) 1 parent controller
4) 1 Parent form

the parent form is formed by the 3 child forms as below:

<form id="1" method="get" action="url of first form">
</form>

<form id="2" method="get" action="url of second form">
</form>

<form id="3" method="get" action="url of third form">
</form>


The problem is though i do nt get any errors, the parent form does not get populated with the child forms.

Can anyone please let me know what's wrong in here.

Thanks in advance!!!

12 years ago
Hi ,

Is there a way in spring wherein we can read the fields of a bean from the DB table and create a complete bean class - with getters and setters on server startup???

I require this to make my application completely configurable...as in if I have to add a new field in future , all I would require would be adding a field in the db and the bean setters and getters would be available to me.

Thanks
12 years ago
Hi All,


I have a scenario wherein with the following details:

I have a form that contains fields like firstname,middle name,lastname,dob,pin,address for Client 1.

Now this form has to cater more than one client . The problem statement is - different clients may require different number of fields to be displayed on front end. For eg: a 2nd client would want - Country field instead of pin, would not require address on the form.

Now when i submit the form , currently i have a constant query which takes values of - firstname,middle name,lastname,dob,pin,address and inserts it into database for Client 1. I want to develop a query in a way that it is created at runtime and inserts only the values that come from the form into the database..

I hope my problem is clear. Can anyone help???
Hi,

While sending email messages through JMS, is it necessary to always put your messages in a session (while sending and receving both). What if I simply save the message xml in a string variable and pass it to send().


Thanks
Saakshi
12 years ago
Hey...thanks for your reply...Is there any documentation on this..as in it would helpful in undersanding what all changs we required in case we move from MQ to any othr provider
12 years ago
I am working on a Spring application where we have implemented code to send messages through IBM MQ.

Now we have been advised not to directly use MQ APIs directly and instead use JMS.

The steps i followed :

1) created a JNDI name to connect to the Message queue configured as:

<bean id="emailQueueDestination" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
<property name="jndiName" value="<<JNDI name of Queue" >>/>

2) I need a connecton factory object to connect to the JMS Provider and I have configured it as :

<bean id="emailQueueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">

<property name="queueManager" value="" />
<property name="hostName" value="" />
<property name="channel" value="" />
<property name="port" value="1414" />
</bean>
</bean>

Further I have injected the above 2 beans in JMSTemplate class:

<bean id="emailQueueTemplate" class="org.springframework.jms.core.JmsTemplate" lazy-init="true">
<property name="connectionFactory" ref="emailQueueConnectionFactory" />
<property name="defaultDestination" ref="emailQueueDestination" />
</bean>

Now since my purpose is to remove dependency on MQ APIs..Do you think the configuration above(especially for connection factory ) looks good???

Please can anyone help here???
12 years ago
In context of WAS, what is the difference between application bounce and jvm bounce.

In case we only want to reload the data at server startup , whch one should we go for.
12 years ago
Hey.. Thanks Mark...I tried with what you suggetsed .. and it worked fine for me...
12 years ago
Hi,

I am trying to implement JMS in my spring application. I have defined the JNDI name + queue name in applicationContext.xml as follows:

<bean id="emailQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
<property name="jndiName" value="java:comp/env/jms/<<Name of JNDI of connection factory>>" />
</bean>

<bean id="emailQueueDestination" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
<property name="jndiName" value="java:comp/env/jms/<<JNDI name of queue>>" />
</bean>

<bean id="emailQueueTemplate" class="org.springframework.jms.core.JmsTemplate" lazy-init="true">
<property name="connectionFactory" ref="emailQueueConnectionFactory" />
<property name="defaultDestination" ref="emailQueueDestination" />
</bean>

<bean id="emailSender" class="<<Package>>.EmailSender" lazy-init="true">
<property name="jmsTemplate">
<ref bean="emailQueueTemplate" />
</property>
</bean>

Now my controller makes a call to the emailSender bean using the following code:

ApplicationContext context = new ClassPathXmlApplicationContext("/applicationContext.xml");
EmailSender sender =(EmailSender)context.getBean("emailSender");

The exception I get is: Error 404: Request processing failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

I am loading the applicationContext.xml at serevr start-up still my code is not able to locate this file.

Can anyone please help.??
12 years ago