Connecting applet with ejb ? 2004-12-20 - By ?8?
Back hi, david: following is some code clips which run on weblogic server 8.1. hope this helps! Charles
<APPLET codebase="." archive="worklist.jar,wljmsclient.jar,wlclient.jar" code="com.cit.wf.web.WorklistApplet.class" height="50", width="200"> <PARAM name="StaffId" value="<%=request.getAttribute("StaffId")%> "> <PARAM name="AcceptTaskState" value="7"> </APPLET>
WorklistApplet.Java -- ---- ---- ---- ---- ---- ---- ---- ----- public void start() { try { Context context = worklistApplet.getInitalContext(); //replace with your ejb jndi name. Object objref = context.lookup("javax.jms.TopicConnectionFactory "); topicConnectionFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(objref, TopicConnectionFactory .class); topicConnection = topicConnectionFactory.createTopicConnection(); topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); topic = (Topic) context.lookup(JNDINames.WORKLIST_NOTIFIY_TOPIC); if (topicSubsciber != null) { topicSubsciber.close(); } topicSubsciber=topicSession.createSubscriber(topic); topicSubsciber.setMessageListener(this); topicConnection.start(); System.out.print("listener started success!"); } catch (Exception ex) { topicSubsciber = null; ex.printStackTrace(); } } -- -- Original Message -- -- From: Dudi Gil To: J2EE-INTEREST@(protected) Sent: Tuesday, December 21, 2004 12:39 PM Subject: Connecting applet with ejb ?
Hellow,
Can anyone show me an example of how to connect applet with ejb ? All the JNDI procedure in particular ? If someone can show me an example of how to to it, I'll be very grateful.
THankd David =========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) .sun.com and include in the body of the message "help".
|
|