Candylips's Posts
Nairaland Forum › Candylips's Profile › Candylips's Posts
1 2 3 4 5 6 7 8 ... 573 574 575 576 577 578 579 580 581 (of 587 pages)
am on line anyone wanna chat ![]() |
No you dont need a controller servlet to do that. I am assuming that you want to use spring only for the middle-tier and DAO. so onces u have created ur DAOs and set up the required configurations in the application context. u can use it in even a normal servlet or any other web frameworks out there i,e struts, velocity etc. However, Spring also has a MVC framework called Spring MVC and configuring it is just as easy as defining the bean in the application context and then thats it. Do you want to use the full stack or u just want to use it for the DAO and middle-tier. Post your code and i can maybe take u through what is required |
nothing much just about to drift into bed |
i just dey sister. just dey while away time befor going to bed . u? |
omoge i am online lets chat ![]() |
yes i am male ![]() |
oh really. why. thats the name my ex girl used to call me |
none of the above or all of the above depending on my mood ![]() |
siddon there ![]() |
carry go ![]() |
alright then hope u have a wonderful time |
men am not gay o |
lauryn and 2fine4u Thanks for posting ur pics u girls are 3 much |
yeah sure i can take u around. |
boi ordinary girl go do u na. no try nympho o na u go run |
@lyricalgen i need a pal in london u want to hook up ![]() |
i'll post me soon ![]() |
ok just wanted to confirm. Goddluck with ur search anyways |
To work with JMS u need to set up a couple of configurations in the application context file. once u have done these u will be able to have access to the underlying messaging platform over a very simple interface am just gonna rip out the configuration in one of my code First u need to configure the jnditemplate <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial"> org.jnp.interfaces.NamingContextFactory </prop> <prop key="java.naming.provider.url"> localhost </prop> <prop key="java.naming.factory.url.pkgs"> org.jnp.interfaces:org.jboss.naming </prop> </props> </property> </bean> next u configure the queue connection factory <bean id="jmsQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate"> <ref bean="jndiTemplate"/> </property> <property name="jndiName"> <value>UIL2ConnectionFactory</value> </property> </bean> then u will need to define 2 jms destinations for sending and receiveing messages. <bean id="sendDestination" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate"> <ref bean="jndiTemplate"/> </property> <property name="jndiName"> <value>queue/RequestSendQueue</value> </property> </bean> <bean id="receiveDestination" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate"> <ref bean="jndiTemplate"/> </property> <property name="jndiName"> <value>queue/ReqeustReceiveQueue</value> </property> </bean> The queues ReqeustReceiveQueue and RequestSendQueue should be define in ur app server next u need a reference to the jms template which helps abstract the jms api from ur application <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate102"> <property name="connectionFactory"> <ref bean="jmsQueueConnectionFactory"/> </property> <property name="defaultDestination"> <ref bean="destination"/> </property> <property name="receiveTimeout"> <value>40000</value> </property> </bean> Finally in my case i have defined two beans that help me with the sending and recevieing of messages. Defining it here will give u d abiliy of using them anywhere in ur app. so u can message enable anything in ur app <bean id="jmsSender" class="org.informa.jms.JMSSender"> <property name="jmsTemplate"> <ref bean="jmsTemplate"/> </property> </bean> <bean id="jmsReceiver" class="org.informa.jms.JMSReceiver"> <property name="jmsTemplate"> <ref bean="jmsTemplate"/> </property> </bean> Once u have don these configurations to send a message in ur code is as simple as just wrting, JMSSender jmsSender = (JMSSender)appContext.getBean("jmsSender" ;jmsSender.sendMesage(); i hope these helps . let me know if u need more help |
just talk true . u are looking for a bed pal ![]() |
1 2 3 4 5 6 7 8 ... 573 574 575 576 577 578 579 580 581 (of 587 pages)



