RE: EJB Sharing between applications
If you search the archives you will find my writup on this. It is not possible from within an Orion J2EE container (either web or ejb). Not only that, it is not possible to call EJBs in another instance of the same application (that is, more than one other REMOTE instance - you can call ONE other remote instance using the orion specificconfiguration)from within an Orion J2EE container. This is a severe limitation and one that will need to be addressed if Orion hopes to be ejb 1.3 compliant. There is a hack that MIGHT work if there are no circular dependencies between your EARs. You can have one application be a parent of another, and a third application be the parent of the first parent. We started experimenting with this when we decieded that it was too restrictive and we went with another J2EE imlpementation. I'm hoping that Orion fixes this problem because all in all if they fix their JNDI issues (which isthe sourceof this problem)it's not a poor quality server. -Original Message-From: Jorge Jimenez C [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 05, 2002 6:58 AMTo: Orion-InterestSubject: EJB Sharing between applications Hello everyone. I'm testing orion for use in a variety of applications. Our software company have developed many J2EE components in the form of diferents applications (diferents EAR files) that interact with each other throught its EJB and JSP pages. Reading the document at http://www.orionserver.com/docs/remote-access/remote-access.xmlI see that one application can only use funcionality from only one other application (a parent application defined in server.xml). We need to use services from EJB's in many other applications. I think there must be another way to share EJB's functionality between applications (without going throught network layer, i hope). Please, any directions will be welcome Thanks in advance.
RE: Lookup EJB's in another application
It has been my experience that you CANT call to a different application UNLESS the server application is a parent of the client. In the document at the link you provided there are two setups: 1) Same application on 2 servers where the ejbs run on one but the front end runs on another, and 2) Where one application calls to a different application but in this case the two ARE related by a parent child relationship. Also, once an application is connected to using an InitialContext you can NEVER connect to another instance of that application running somewhere else. (I detailed this problem in several posts to this list a few weeks ago). For these very reasons we have decided not to use orion and are probably going to use JBoss instead. -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 10:04 AM To: Orion-Interest Subject: Re: Lookup EJB's in another application Guys, This is certainly one way to do things (nest the applications) - but there are some limitations to this method (namely it's Orion specific, and you can only have one parent app, the apps must be on the same server). For details on how to do it other ways (proper remote EJBs), see this document: http://kb.atlassian.com/content/orion/docs/remote-access/remote-access.h tml Hope this helps, Cheers, Mike Mike Cannon-Brookes [EMAIL PROTECTED] Atlassian :: www.atlassian.com Supporting YOUR world On 17/1/02 2:44 AM, Klaus Thiele ([EMAIL PROTECTED]) penned the words: server.xml: application name=ejbapp path=../applications/ejbapp.ear/ application name=webapp parent=ejbapp path=../applications/webapp.ear/ ... nothing else. webapp can use the ejbs in ejbapp as if they are in its own ear-file. hope that helps klaus Am Donnerstag, 17. Januar 2002 00:47 schrieben Sie: Hi, If you have two applications in the same orion container. One application with web components and another with just EJB's. From the application with web components, I want to lookup an EJB that is deployed in the other application - is that possible via the InitialContext or do I have to call it via an URL and getting the extra RMI call? I can get it to work using a provider URL to the other application, but using the InitialContext, the local context - it cannot find the bean, or more correct, the JNDI name could not be found. Any help is appreciated ! Thanks, Patrik __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ Sent using the Entourage X Test Drive.
RE: Distributing EJBs
I should have mentioned that I tried this; it doesn't help. Further investigation reveals that Orion seems to save the Context that is first created in a Map using the application name as a key. Closing the context after use doesn't seem to remove it from this map. If you create a new InitialContext, the RMIInitialContextFactory will look up the implementation of an RMIContext in this (hypothetical) Map using the application name. If you specify an application name in the URL and you are within an Orion container (i.e. web OR EJB) that URL must have an application name that the container recognizes; that is, it must be the same application that the container is in, or a parent. Otherwise you get a NullPointerException in the RMIInitialContextFactory. I'm not sure what the purpose of this functionality is; it doesn't really help by preventing mistakes. Thanks for the suggestion though. Jim -Original Message- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 7:43 PM To: Orion-Interest; Carroll, Jim Subject: RE: Distributing EJBs you may need to close the rmi connection before opening up another one. Do this with the context.close() method. Regards, the elephantwalker www.elephantwalker.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Carroll, Jim Sent: Wednesday, January 09, 2002 11:01 AM To: Orion-Interest Subject: RE: Distributing EJBs I should make it clear in what follows that I am trying to load balance the EJBs in an application, not the web side. I know how to set up clustering. What I can't get to work is distribution of a set of EJBs across several servers like the following: -- server1 / EJBs | server0 - | JSP/Servlet Based __| EJB Client | | | -- server2 / EJBs -Original Message- From: Carroll, Jim Sent: Wednesday, January 09, 2002 1:42 PM To: 'Orion-Interest' Subject: Distributing EJBs I have been trying to distribute the same application across several servers for the purposes of load balancing. The team at Orion seems to have purposely made this impossible. I am using the RMIInitialContextFactory from the web container (from a JSP page) in order to round robbin between two servers. The code is rather simple: Properties prop = new Properties; prop.put(java.naming.factory.initial, com.evermind.server.rmi.RMIInitialContextFactory); prop.put(java.naming.provider.url, ormi://server1/appName); ... fill in security credentials ... InitialContext ic = new IntialContext(prop); BeanHome bh = ic.lookup(EJBName); BeanRemote br = bh.create(); br.invokeMethod(); // this executes on server1 // Now try to execute it on server2 prop.put(java.naming.provider.url, ormi://server2/appName); InitialContext ic2 = new InitialContext(prop); BeanHome bh2 = ic2.lookup(EJBName); BeanRemote br2 = bh2.create(); br2.invokeMethod(); // this ALSO executes on server1 The initial url of the RMIInitialContextFactory is used UNTIL server1 fails. Then server2 will start working (again, for every call). That someone would always want the same server simply because: 1) they are withing a (web) container (I'm not sure if this works from a stand alone client or not either), and 2) the application is the same seems an absurd assumption on the part of the Orion developers. Is there a way around this? Thanks
RE: App server debugging -- HELP
I'm starting to use 'kill -3' but that again only shows the parent thread. kill -3 should dump a stack trace of all of the threads.
RE: Distributing EJBs
I should make it clear in what follows that I am trying to load balance the EJBs in an application, not the web side. I know how to set up clustering. What I can't get to work is distribution of a set of EJBs across several servers like the following: -- server1 / EJBs | server0 - | JSP/Servlet Based __| EJB Client | | | -- server2 / EJBs -Original Message- From: Carroll, Jim Sent: Wednesday, January 09, 2002 1:42 PM To: 'Orion-Interest' Subject: Distributing EJBs I have been trying to distribute the same application across several servers for the purposes of load balancing. The team at Orion seems to have purposely made this impossible. I am using the RMIInitialContextFactory from the web container (from a JSP page) in order to round robbin between two servers. The code is rather simple: Properties prop = new Properties; prop.put(java.naming.factory.initial, com.evermind.server.rmi.RMIInitialContextFactory); prop.put(java.naming.provider.url, ormi://server1/appName); ... fill in security credentials ... InitialContext ic = new IntialContext(prop); BeanHome bh = ic.lookup(EJBName); BeanRemote br = bh.create(); br.invokeMethod(); // this executes on server1 // Now try to execute it on server2 prop.put(java.naming.provider.url, ormi://server2/appName); InitialContext ic2 = new InitialContext(prop); BeanHome bh2 = ic2.lookup(EJBName); BeanRemote br2 = bh2.create(); br2.invokeMethod(); // this ALSO executes on server1 The initial url of the RMIInitialContextFactory is used UNTIL server1 fails. Then server2 will start working (again, for every call). That someone would always want the same server simply because: 1) they are withing a (web) container (I'm not sure if this works from a stand alone client or not either), and 2) the application is the same seems an absurd assumption on the part of the Orion developers. Is there a way around this? Thanks
RE: JMS hangs on TopicSession.createSubscriber
I found several references to this bug in the mailing list archives but it still seems to be a problem (in 1.5.2). The workaround suggested was to stop the TopicConnection associated with the TopicSession and then do the createSubscriber and then restart the connection but when I do that, it hangs in the TopicConnection.start() call. Does anyone have a fix or workaround for this? Thanks
JNDI and a real distributed application
I can't figure out how to get the Orion JNDI implementation to actually act like a J2EE implementation. I have resources on several machines (I have ejbs on one and jms being served by another). I have not been able to find any way to set up jndi such that an application within or outside of Orion's j2ee container can simultaneously access both. In short, I have a distributed system and I want to use jms to get messages to several instances of an application. There seems to be no way to centralize jms while running your application on multiple machines because the JNDI initial context points to an ejb container that knows nothing except it's own internal state. I thought that JNDI was supposed to be able to provide a naming service that SPANS platforms; I can't seem to get this one to. I even tried instantiating multiple InitialContexts with different PROVIDER_URLs (that doesn't work since an subsequent instantiations of an InitialContext are simply clones of the original even if you change the properties you instantiate it with). I must be missing something. Has anyone figured out how to do this? Thanks Jim
RE: How to upgrade Xalan / Xerces?
You will also need to delete the parser.jar file that comes with orion. -Original Message- From: Markus Holmberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 10:15 AM To: Orion-Interest Cc: Orion-Interest Subject: Re: How to upgrade Xalan / Xerces? Yes. Markus On Tue, Apr 03, 2001 at 03:44:32PM +0300, Peter Peltonen wrote: I want to upgrade Xalan and Xerces to newer versions that comes with JAXP found at http://java.sun.com/xml? Do I just overwrite the .jar files? Regards, Peter -- Markus Holmberg | Give me Unix or give me a typewriter. [EMAIL PROTECTED] | http://www.freebsd.org/
RE: Friendly error messages from Microsoft get in the way (was Error pages defined in web.xml not found / activated)
You can turn this off in the IE (Idiotic Explorer) advanced options. -Original Message- From: Frank Eggink [mailto:[EMAIL PROTECTED]] Sent: Monday, April 02, 2001 3:56 AM To: Orion-Interest Subject: Friendly error messages from Microsoft get in the way (was Error pages defined in web.xml not found / activated) Well ... How can you spend your weekend?!? The problem I described looks to be caused by wat's called 'friendly error messages' from the Internet Explorer. All runs fine with Netscape. Microsoft replaces standard 404 'can not find page' errors with their own page, which is considered (by them) to be more user friendly. Still I do not understand how the Explorer gets the information there is a 404 error. Could this be somewhat less wanted feature of Orion? I certainly would like to have control over this error message. FE On Friday, March 30, 2001 5:48 PM, Frank Eggink [SMTP:[EMAIL PROTECTED]] wrote: Hi, I'm having a problem. I have defined error pages in my web.xml I've defined: error-page error-code404/error-code location/errors/error404.jsp/location /error-page Now I expect to see the error page when I request a non existing page like http://localhost/my-app/non-existing-page.html, which does not happen. I'm obviously overlooking something, but what?? [When I define the error page in a jsp page with %@ errorpage=/errors/error404.jsp % it does work. So it can find the page, which gives me the impression I've setup something wrong. What?? FE Frank Eggink Swift Applications [EMAIL PROTECTED] +31 6 28847325 (voice) +31 33 4532464 (fax)