Re: Please Unsubscribe Me
remove me
RE: Message Driven Beans
Implementing a Message-Driven Bean in Orion. (Tested with orion 1.5.4) 1.) == The MDB code - LogBean package mycode.ejb.mdb; import javax.ejb.*; import javax.jms.*; public class LogBean implements MessageDrivenBean, MessageListener { protected MessageDrivenContext ctx; public void setMessageDrivenContext(MessageDrivenContext ctx) { this.ctx = ctx; } public void ejbCreate() { System.out.println("ejbCreate()"); } public void onMessage(Message msg) { TextMessage tm = (TextMessage) msg; try { String text = tm.getText(); System.out.println("Received new message : " + text); } catch(JMSException e) { e.printStackTrace(); } } public void ejbRemove() { System.out.println("ejbRemove()"); } } 2.) == The deployment descriptor (ejb.jar) http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd";> Test Message Bean A test of message beans Log mycode.ejb.mdb.LogBean Container javax.jms.Queue 3.) == Activate (uncomment) jms in server.xml 4.) == Update jms.xml to include the queue Test queue for MDB LogBean 5.) == Update web.xml to include the resource references to jms factory and queue jms/theQueueConnectionFactory javax.jms.QueueConnectionFactory Container jms/theLog javax.jms.Queue Container 6.) == Send a message to the jms queue from application code (jsp in this case) <%@ page import="javax.naming.*" %> <%@ page import="javax.jms.*" %> <% try { Context context = new InitialContext(); QueueConnectionFactory factory = (QueueConnectionFactory)context.lookup("java:comp/env/jms/theQueueConnectionFactory"); QueueConnection connection = factory.createQueueConnection(); Queue queue = (Queue)context.lookup("java:comp/env/jms/theLog"); connection.start(); QueueSession sess = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE); QueueSender sender = sess.createSender(queue); int delivery_mode = DeliveryMode.PERSISTENT; TextMessage message = sess.createTextMessage("well hello there..."); sender.send(message, delivery_mode, 1, 0); sess.close(); connection.close(); } catch(JMSException e) { System.err.println("JMS Communication error: " + e.getMessage()); } catch(NamingException e) { System.err.println("Naming Error looking up objects: " + e.getMessage()); } %> Asp Services - Test Done. 7.) == Done. Note: LogBean example was taken from "Mastering Enterprise Beans II (draft)" from theServerSide.com -Original Message- From: Michael Maurer [mailto:[EMAIL PROTECTED]] Sent: 29 April 2002 01:20 PM To: Orion-Interest Subject: Message Driven Beans I am trying to deploy a message driven bean on the Oracle9iAS (9.0.3.0.0) Are there some good examples where all necessary settings are described? (Starting from jms.xml to orion-ejb-jar.xml!) Or can anybody help me out with some important hints ? Regards Michael
Re: JMS and load balancing
Hi there is a nice documentaion for this at this link http://www.orionserver.com/docs/http-clustering.html hope this will help you, Kumar - Original Message - From: Jorge Jimenez C To: Orion-Interest Sent: Monday, April 29, 2002 6:40 PM Subject: JMS and load balancing Hi. If someone knows a tutorial that cover this topic, please send me a link. It is posible to configure load balancing over JMS and two app. servers ? Each server must point to a diferent queue or it is a shared one ? What happen if one server crashes with the messages that were not processed ? It is posible for the other server to process these messages ? Thanks in advance. JJ
Please Unsubscribe me!!!!
Please Unsubscribe me
Re: CMP entity bean deployment compilation errors
A follow-up to this issue, which I feel is resolved. I tried 1.5.4 and then encountered the following compilation errors: CodeListsEBLocalHome_EntityHomeWrapper10.java:156: Exception java.rmi.RemoteException must be c aught, or it must be declared in the throws clause of this method. EvermindEntityContext finderContext = this.getContextInstance(thread); Which I then saw in another message here. I did some more investigation and found that the inclusion of the and elements as well as the and elements in my ejb-jar.xml was causing the original compilation errors. I then commented out either the / or the / and the deployment/compilation of generated classes worked. Seems you can possibly only use one of the pair. This is okay for me as I normally use the session bean as a facade pattern , so I should be fine just using the / pair. Scott Scott Gaetjen wrote: > I've created a CMP entity bean based on some examples I've seen and am > encountering some compilation errors on the generated wrapper classes at > deployment time. Its seems the getter/setter methods and the remove > method are not recognized or available in the generated wrapper > classes. I've look at various mailing lists and the bug database and > have not seen any similar problem. I've tried changing the use of Long > to "long" primitives and making the fields wholly lower case but have > not had any luck with that. If anyone has seen these errors before or > can give me any pointers on possible problem areas I would greatly > appreciate the help: > > There errors are as such: > > Auto-deploying leaders-ejb.jar (No previous deployment found)... > CodeListsEBRemote_EntityBeanWrapper2.java:281: Method __REMOTE__remove() > not found in class CodeListsEBRemote_EntityBeanWrapper2. > trail.__REMOTE__remove(); > ^ > CodeListsEBRemote_EntityBeanWrapper2.java:571: Method > __REMOTE__getName() not found in class > CodeListsEBRemote_EntityBeanWrapper2. > return trail.__REMOTE__getName(); > ^ > > CodeListsEBRemote_EntityBeanWrapper2.java:809: Method > __REMOTE__setName(java.lang.String) not found in class > CodeListsEBRemote_EntityBeanWrapper2.trail.__REMOTE__setName(argument0); > >^ > > Regards, > Scott > > > * My bean looks like: > > public abstract class CodeListsEB implements EntityBean > > public abstract Long getId() ; > public abstract void setId(Long id) ; > public abstract String getName() ; > public abstract void setName(String name) ; > > > * My remote is like: > > public interface CodeListsEBRemote extends EJBObject > ... > public Long getId() throws RemoteException; > public void setId(Long id) throws RemoteException; > public String getName() throws RemoteException; > public void setName(String name) throws RemoteException; > > > * My ejb-jar is like: > > Entity EJB providing CRUD transactions for the > LEADERS CODE_LISTS table > CodeListsEB > CodeListsEB > leader.ejb.entity.CodeListsEBHome > leader.ejb.entity.CodeListsEBRemote > > leader.ejb.entity.CodeListsEBLocalHome > leader.ejb.entity.CodeListsEBLocal > leader.ejb.entity.CodeListsEB > Container > CodeLists > 2.x > leader.ejb.entity.EntityPK > False > > id > name > ... > > > > > > findByName > > java.lang.String > > > SELECT DISTINCT OBJECT(o) FROM CodeLists AS o > WHERE o.name = ?1 > > > jdbc/MedicalDS > javax.sql.DataSource > Container > > > > > * My orion-ejb-jar is like: > > > > location="leaders/CodeListsEB" table="CODE_LISTS" > data-source="jdbc/MedicalDS"> > > > > persistence-name="ID"/> > > > > > > ... begin:vcard n:Gaetjen;Scott tel;cell:703.728.1301 tel;fax:540.882.4233 tel;work:540.882.4233 x-mozilla-html:FALSE url:http://www.solutionsauthority.com org:President - Solutions Authority, LLC adr:;;38607 Millstone Drive;Purcellville;VA;20132;USA version:2.1 email;internet:[EMAIL PROTECTED] title:540.882.4233 (office) - 703.728.1301 (mobile) end:vcard
Please Unsubscribe Me
Please Unsubscribe me
ThanksMSN Photos is the easiest way to share and print your photos: Click Here
Please Unsubscribe me
begin:vcard n:Fryjoff;Chet x-mozilla-html:FALSE adr:;; version:2.1 email;internet:[EMAIL PROTECTED] fn:Chet Fryjoff end:vcard
Please Unsubscribe me!!!!
Please Unsubscribe me Get your FREE download of MSN Explorer at http://explorer.msn.com.
CMP entity bean deployment compilation errors
I've created a CMP entity bean based on some examples I've seen and am encountering some compilation errors on the generated wrapper classes at deployment time. Its seems the getter/setter methods and the remove method are not recognized or available in the generated wrapper classes. I've look at various mailing lists and the bug database and have not seen any similar problem. I've tried changing the use of Long to "long" primitives and making the fields wholly lower case but have not had any luck with that. If anyone has seen these errors before or can give me any pointers on possible problem areas I would greatly appreciate the help: There errors are as such: Auto-deploying leaders-ejb.jar (No previous deployment found)... CodeListsEBRemote_EntityBeanWrapper2.java:281: Method __REMOTE__remove() not found in class CodeListsEBRemote_EntityBeanWrapper2. trail.__REMOTE__remove(); ^ CodeListsEBRemote_EntityBeanWrapper2.java:571: Method __REMOTE__getName() not found in class CodeListsEBRemote_EntityBeanWrapper2. return trail.__REMOTE__getName(); ^ CodeListsEBRemote_EntityBeanWrapper2.java:809: Method __REMOTE__setName(java.lang.String) not found in class CodeListsEBRemote_EntityBeanWrapper2.trail.__REMOTE__setName(argument0); ^ Regards, Scott * My bean looks like: public abstract class CodeListsEB implements EntityBean public abstract Long getId() ; public abstract void setId(Long id) ; public abstract String getName() ; public abstract void setName(String name) ; * My remote is like: public interface CodeListsEBRemote extends EJBObject ... public Long getId() throws RemoteException; public void setId(Long id) throws RemoteException; public String getName() throws RemoteException; public void setName(String name) throws RemoteException; * My ejb-jar is like: Entity EJB providing CRUD transactions for the LEADERS CODE_LISTS table CodeListsEB CodeListsEB leader.ejb.entity.CodeListsEBHome leader.ejb.entity.CodeListsEBRemote leader.ejb.entity.CodeListsEBLocalHome leader.ejb.entity.CodeListsEBLocal leader.ejb.entity.CodeListsEB Container CodeLists 2.x leader.ejb.entity.EntityPK False id name ... findByName java.lang.String SELECT DISTINCT OBJECT(o) FROM CodeLists AS o WHERE o.name = ?1 jdbc/MedicalDS javax.sql.DataSource Container * My orion-ejb-jar is like: ... begin:vcard n:Gaetjen;Scott tel;cell:703.728.1301 tel;fax:540.882.4233 tel;work:540.882.4233 x-mozilla-html:FALSE url:http://www.solutionsauthority.com org:President - Solutions Authority, LLC adr:;;38607 Millstone Drive;Purcellville;VA;20132;USA version:2.1 email;internet:[EMAIL PROTECTED] title:540.882.4233 (office) - 703.728.1301 (mobile) end:vcard
Please Unsubscribe me!!!!
Please Unsubscribe me
RE: XSL and Sitemesh on Orion
Dearest elephantwalker and other dearest friends, I have a doubt in this xsl rendering. I used xalan and xerces parser which orion uses for xml to html rendering. I used my own xsl servlet to port my code to any application server which is not having an xsl servlet. But I am ending up in one trouble. Transformation is working fine. But if I need to output as xml, I will use response.setContentType("text/xml"); this works fine in servlets. But when I use the same in jsps in an ear file, this donot happen. Can we change the content type of jsp's? thanks, Prasanth. >From: "The elephantwalker" <[EMAIL PROTECTED]> >Reply-To: Orion-Interest <[EMAIL PROTECTED]> >To: Orion-Interest <[EMAIL PROTECTED]> >Subject: RE: XSL and Sitemesh on Orion >Date: Mon, 22 Apr 2002 20:19:27 -0700 > >retry ... >-Original Message- >From: The elephantwalker [mailto:[EMAIL PROTECTED]] >Sent: Monday, April 22, 2002 8:59 AM >To: Orion-Interest; [EMAIL PROTECTED] >Subject: RE: XSL and Sitemesh on Orion > > >Dear Peter, > >Theres a bug in sitemesh so that only jsp files work. I believe that xsl >would have the same limitation. I reported this on sourceforge. There's an >easy fix to this: > >http://sourceforge.net/tracker/index.php?func=detail&aid=534456&group_id=989 >0&atid=109890 > >and > >http://sourceforge.net/tracker/index.php?func=detail&aid=534772&group_id=989 >0&atid=109890 > >Of course you will need to make the changes in the sitemesh code, and >re-build it, but that's a snap. I would attach the fix on elephantwalker, >but I am unclear about the Opensymphony license...any way the links above >give the exact changes necessary to make this work. > >Regards, > >the elephantwalker >www.elephantwalker.com > > > > > >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]]On Behalf Of Peter Beck >Sent: Monday, April 22, 2002 5:11 AM >To: Orion-Interest >Subject: XSL and Sitemesh on Orion > > >I am using OpenSymphony Sitemesh on Orion Application Server 1.5.4. > >The Orion XSL servlet (default config in global-web-application.xml) >is used to transform XML files to HTML. >The transformation works fine, but the transformed HTML is no longer >passed to the sitemesh filter and is displayed without layout. > >What can I do to make this work? >Does anybody have a hint, please? > >Peter > >-- >Peter Beck, JOANNEUM RESEARCH Forschungsges.m.b.H. >[EMAIL PROTECTED] > > > > s _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
How do i get off this list?
I've tried the form at orionserver.com to no avail ... mark __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
JMS and load balancing
Hi. If someone knows a tutorial that cover this topic, please send me a link. It is posible to configure load balancing over JMS and two app. servers ? Each server must point to a diferent queue or it is a shared one ? What happen if one server crashes with the messages that were not processed ? It is posible for the other server to process these messages ? Thanks in advance. JJ
Re: Re: how to shutdown orion app server?
Hi. Again. Now. The code seems correct. Except, the url, that MAY require to be of the type: ormi://localhost/Your_App_Name. If you have deployed your beans in an application, and NOT in the default APP, you HAVE to use the url with the app_name at the end. in config/server.xml in properties: java.naming.provider.url=ormi://your.host.your.domain/Your_App_Name or java.naming.provider.url=ormi://localhost/Your_App_Name << FOR LINUX MAINLY! in java code: p.put(Context.PROVIDER_URL, "ormi://localhost/Your_App_Name"); Then you will find your ejbs. I would sincerly offer you to look-up the name of the bean without any prefixes. It is hard to move to other app server sometimes. In your case if you have no ejb-link, ejb-ref and so on stuff, just look-up OrgOrganizations: ctx.lookup("OrgOrganizations"); Also let's note, that if you use the java:comp/* context it may not port well on different servers. Lachezar. P.S. Give it a try and write again. but i can't look up my ejb,how to config it. thanks Hi. Make sure you remove the 'deactivated="false"' for admin in config/principals.xml Lachezar. Hi, I writed one EJB and deployed it successful on Orion 1.5.4. But i get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory"); p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791"); p.put(Context.SECURITY_PRINCIPAL, "admin"); p.put(Context.SECURITY_CREDENTIALS, "123");try { Context ctx = new InitialContext(p); OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations"); Organizations remote = (Organizations)home.create(); } catch (Exception ex) { ex.printStackTrace(); } help me! = = = = = = = = = = = = = = = = = = = = = = ÖÂÀñ£¡ Liu Bin [EMAIL PROTECTED]¡¡2002-04-29
Message Driven Beans
I am trying to deploy a message driven bean on the Oracle9iAS (9.0.3.0.0) Are there some good examples where all necessary settings are described? (Starting from jms.xml to orion-ejb-jar.xml!) Or can anybody help me out with some important hints ? Regards Michael
Re: Re: how to shutdown orion app server?
but i can't look up my ejb,how to config it. thanks Hi. Make sure you remove the 'deactivated="false"' for admin in config/principals.xml Lachezar. Hi, I writed one EJB and deployed it successful on Orion 1.5.4. But i get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory"); p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791"); p.put(Context.SECURITY_PRINCIPAL, "admin"); p.put(Context.SECURITY_CREDENTIALS, "123");try { Context ctx = new InitialContext(p); OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations"); Organizations remote = (Organizations)home.create(); } catch (Exception ex) { ex.printStackTrace(); } help me! = = = = = = = = = = = = = = = = = = = = = = ÖÂÀñ£¡ Liu Bin [EMAIL PROTECTED]¡¡2002-04-29 FOX.GIF Description: GIF image
Re: how to shutdown orion app server?
That command seems to hang on linux 2.4.x / 1.3.1 as soon as you've deployed something. It works great on win2k, though, so I suspect the linux JVM. Under linux, I usually have to CTRL-C or kill the process. - Renaud - Original Message - From: "Jesper Rasmussen" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Monday, April 29, 2002 7:22 AM Subject: SV: how to shutdown orion app server? java -jar admin.jar ormi://localhost admin 1234 -shutdown where admin is username and 1234 is password For more info: java -jar admin.jar ormi://localhost admin 1234 -help -Oprindelig meddelelse- Fra: gusl [mailto:[EMAIL PROTECTED]] Sendt: 28. april 2002 05:26 Til: Orion-Interest Emne: how to shutdown orion app server? Hi all, I want to know how to shutdown orion app server ??? Use kill ???(under linux)
Re: how to shutdown orion app server?
Hi Liu, Did you run orion -install when you installed orion (or changed admin password in principals.xml)? This username/password should correspond with the username/password from the jndi.properties file of the client application Mark On Sun, 2002-04-28 at 13:02, Liu Bin wrote: > Hi, > I writed one EJB and deployed it successful on Orion 1.5.4. But i get the Exception when i test it used one client application: > javax.naming.AuthenticationException: Invalid username/password for default (admin) > at com.evermind._dn._mu(.:2173) > at com.evermind._dn._mu(.:2009) > at com.evermind._dn._es(.:1590) > at com.evermind._bp._es(.:357) > at com.evermind.server.rmi.RMIContext.lookup(.:106) > at javax.naming.InitialContext.lookup(InitialContext.java:347) > at ejbtest.Test1.main(Test1.java:24) > code: > Properties p = new Properties(); > p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory"); > p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791"); > p.put(Context.SECURITY_PRINCIPAL, "admin"); > p.put(Context.SECURITY_CREDENTIALS, "123"); > > try { >Context ctx = new InitialContext(p); >OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations"); >Organizations remote = (Organizations)home.create(); > } catch (Exception ex) { >ex.printStackTrace(); > } > help me! -- --o-o-- Mark Kettner http://www.fredhopper.com Amsterdam, The Netherlands Phone: +31 20 3206203 Mobile: +31 620 609 817 fax:+31 20 8848747 E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]