Well you can use spring to configure the queues and in that way you can have comunications whit the server
i make something like that whit WAS i have 2 queues and i meke the conections throw jndi and when i run my app in devmode i use i connection standalone and it works very well this is my appcontext.xml <?xml version=*"1.0"* encoding=*"UTF-8"*?> <beans xmlns=*"http://www.springframework.org/schema/beans" * xmlns:xsi=*"http://www.w3.org/2001/XMLSchema-instance" * xsi:schemaLocation=*"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"*> <bean id=*"mq.client" * class=*"com.hildebrando.mq.adapters.standalone.impl.MQStandaloneAdapter" * init-method=*"initialize"* abstract=*"true"* destroy-method=*"finalize"*> <property name=*"channel"* value=*"CAPITALES.CHANNEL"* /> <property name=*"queueManager"* value=*"NBC.QUEUE.MANAGER"* /> <property name=*"host"* value=*"10.30.0.18"* /> <property name=*"port"* value=*"1414"* /> <property name=*"timeout"* value=*"30"* /> </bean> <!-- *Cliente* *de* *escritura* *al* MQ --> <bean id=*"writer.adapter.engine"* parent=*"mq.client"*> <property name=*"destinationName"* value=*"QUEUE.REQUEST.ENGINE"* /> <property name=*"replyDestinationName"* value=*"QUEUE.RESPONSE.ENGINE"* /> <property name=*"queue"* value=*"true"* /> </bean> <!-- *Cliente* *de* *Lectura* *al* MQ --> <bean id=*"reader.adapter.engine"* parent=*"mq.client"*> <property name=*"destinationName"* value=*"QUEUE.RESPONSE.ENGINE"* /> <property name=*"queue"* value=*"true"* /> <property name=*"filterName"* value=*"JMSCorrelationID"* /> </bean> </beans> ----this is my interface--- * public* *interface* IEngineService { *public* String xxxx(String msg); } and the implementacion * public* *class* EngineServiceImpl *implements* IEngineService { *private* IWMQAdapter writerAdapter; *private* IWMQAdapter readerAdapter; *public* *void* setWriterAdapter(IWMQAdapter writerAdapter) { *this*.writerAdapter = writerAdapter; } *public* *void* setReaderAdapter(IWMQAdapter readerAdapter) { *this*.readerAdapter = readerAdapter; } @Override *public* String xxxx(String msg) { Map<String, Object> property = MessageHeaderBuilder .*fillHeader*(MessageHeaderBuilder.*ALTA_ORDEN*); writerAdapter.setProperty(property); String messageId = writerAdapter.sendSync(msg); String resultado = readerAdapter.receiveSync(messageId); *try* { JsonErrors errores = JsonConverter.*fromJson*(resultado, JsonErrors.*class*); *if* (errores.getErrors().size() != 0) { resultado = "No se proceso la orden. " + "Error: " + errores.getErrors().get(0).getMessage(); } *else* { resultado = ""; } } *catch* (IOException e) { e.printStackTrace(); } System.*out*.println("%%%%%%%%%%%%%%%%%%%%%%%%%Resultado%%%%%%%%%%%%%%%%" + resultado); *return* resultado; } i hope this help you 2010/8/5 lam <[email protected]> > I need to fill a queue on the server. > I wanted to do it in two ways, 1) what I asked about > 2) have the main start the server and fill the queue from that > instance(I don't know how to do this -- working on it) > What should I do?? > > I am calling the devMode.main from a main class, not launching as > normal. The queue-filling class is in the main. > This is what I meant by the same JVM. > > Thank you > > On Aug 5, 12:05 pm, lam <[email protected]> wrote: > > How would I do it if I was running on a different server, Jetty or > > Tomcat? > > Thank you for answering > > > > On Aug 5, 11:18 am, Shawn Brown <[email protected]> wrote: > > > > > > I need to get and instance of the servlet specified in web.xml. I > have > > > > a main running in the same JVM as the servlet. > > > > > I think you need to understand GAE. I don't think you know what JVM > > > you are running in GAE and that it can be killed at any time and that > > > what your client sends may be handled by any JVM. See if java.rmi is > > > supported in GAE whitelisted classes if you want to try. > > > > > GAE instances come and GAE instances go. Even sessions get persisted > > > to BigTable (the database) for this reason. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
