Questions about JNDI Initial context
Hi, I already saw a lot of questions/answers about that in the mailing archive but none of them really answered the question so I'd like to evaluate the web-tier of Orion using an existing EJB application running on weblogic 6.0, I already did the same thing with Tomcat and in that particular case the only thing I had to do was to add the following parameters when I started the Tomcat servlet engine. -Djava.naming.factory.initial="weblogic.jndi.WLInitialContextFactory" -Djava.naming.provider.url="t3://localhost:7001" and it worked fine. So my question is, will it work the same way if I add those parameters when I'llstart the Orion server ? I read a lot of stuff about jndi.properties file and I'm still not convinced about the utility of this file and also where to place it. I do not have a lot of time to test that for the moment, but I'm sure I'll have to do it in the future so I'd like to get already an answer. Thanks for your help, Thierry Thierry CoolsSenior Java Developer S1 Brussels Kleine Kloosterstraat, 23 1932 st. Stevens-Woluwe Belgium Tel : +32 2 200 43 82 Email : [EMAIL PROTECTED]
AW: Accessing Orion as EJB Server
I was not clear enough, I have not got problems with accessing my EJBs from a servlet within the SAME J2EE application, i.e. when the servlet and EJB is deployed in the same .EAR file. I have problems with accessing EJBs remotely from a remote Servlet client! Please see my first mail below and help me with this! Thanks, Tibor Hegyi webmiles AG Ridlerstr. 31b 80339 M|nchen Tel. 089/ 12469-309 Fax 089/ 12469 - 222 e-mail: [EMAIL PROTECTED] -Urspr|ngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Fyffe Carl Gesendet: Freitag, 23. Februar 2001 20:59 An: Orion-Interest Betreff: RE: Accessing Orion as EJB Server Tibor, I suggest you check out http://www.jollem.com They have two orion primers that are very helpful in understanding the relationships between ejb, servlets, jsps and how orion implements them. Specifically for your question please check out the Orion Primer(http://www.jollem.com/orion-primer/). This will give you an example of how to do an EJB with a servlet and what is required to make it all work. Carl -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tibor Hegyi Sent: Friday, February 23, 2001 2:33 AM To: Orion-Interest Subject: Accessing Orion as EJB Server Hi Guys, Well, the topic was touched a couple of times but I could not figure the answer out from teh archive, so please be patient! I want to access my EJBs deployed in Orion remotely from a Servlet deployed in Tomcat. I know that I must set up jndi properties (URL, principal, password, InitialContextFactory). Two questions I have: 1. What reference should I use in the ctx.lookup method call in the Servlet? "java:comp/env/ejb/EJBName" or "com.somepackage.EJBRemoteInterface"? 2. What files do I need on the client (servlet) side in order to compile and run my servlet? Only the Home and Remote interfaces or some helper classes too? How can I generate the helper classes with Orion? Please help with these above! Best regards and keep on! The list is nice! Tibor
SV: Orion taken over
Title: SV: Orion taken over The source of all that was a 'quip' (a joke) on Bugzilla, nearly a year ago. Funny how these things gets a life of their own :) WR -Ursprungligt meddelande- Från: Ray Harrison [mailto:[EMAIL PROTECTED]] Skickat: den 27 februari 2001 08:36 Till: Orion-Interest Ämne: Re: Orion taken over Where did you hear it? --- John Miller [EMAIL PROTECTED] wrote: Have heard that Orion has been bought by someone. Is that true? Is so by who? Johnny BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit http://www.iii.co.uk/isa for a choice of 400+ funds, market leading discounts and access to expert advice. FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa Terms and Conditions apply and are available online. Issued by Interactive Investor Trading Limited, regulated by the SFA. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
JNDI Initial context questions
Hi, I already saw a lot of questions/answers about that in the mailing archive but none of them really answered the question so I'd like to evaluate the web-tier of Orion using an existing EJB application running on weblogic 6.0, I already did the same thing with Tomcat and in that particular case the only thing I had to do was to add the following parameters when I started the Tomcat servlet engine. -Djava.naming.factory.initial="weblogic.jndi.WLInitialContextFactory" -Djava.naming.provider.url="t3://localhost:7001" and it worked fine. So my question is, will it work the same way if I add those parameters when I'llstart the Orion server ? I read a lot of stuff about jndi.properties file and I'm still not convinced about the utility of this file and also where to place it. I do not have a lot of time to test that for the moment, but I'm sure I'll have to do it in the future so I'd like to get already an answer. Thanks for your help, Thierry Thierry CoolsSenior Java Developer S1 Brussels Kleine Kloosterstraat, 23 1932 st. Stevens-Woluwe Belgium Tel : +32 2 200 43 82 Email : [EMAIL PROTECTED]
Remote JMS access
Title: Remote JMS access I have a remote JMS client which publishes to a subscriber. The subscriber is on the same box as orion - no problem. The publisher is remote. Everything in the remote client works if the classpath includes orion.jar. I don't want to copy this around. I have put the jms.jar (sun version) and jndi.jar (orion version) in the classpath but I just get NoClassDefFoundError for javax/jms/JMSException every time. What have I missed? My jms.xml and jndi.properties files all point to the correct hosts. Matt Simmerson IT Consultant smart421 - Smart solutions for the 21st century http://www.smart421.com Wap Site: wap.smart421.com Tel: 01473 408720 Fax: 01473 408753 Mob: 07759 258083 email: [EMAIL PROTECTED] Information contained in this e-mail and any attachments is confidential and intended for the use of the addressee only. Dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you have received this transmission in error, please advise the originator by reply e-mail and delete it. Thank you.
EJB values into xml attributes (a little off topic, I know)
PROBLEM I have a question regarding taking properties from an EJB and generating XML output. To explain, here is an example of my problem: poem title = "%= myPoem.getTitle()" %= myPoem.getContents() % /poem Because title is an XML attribute I think special characters like '' needs to be escaped with amp; and the like. How does one handle this in a nice way? BACKGROUND I can think of at least two solutions, but I was hoping someone could suggest a better one: 1: One could make sure to always store all content in the database as escaped content. This means that the title of myPoem could be stored as "Strength amp; Honour" instead of "Strength Honour". 2: One could require all get/set-methods to transform unescaped content to escaped content and vise-versa. 3: One could use a utility class with a static method: poem title = "%= Converter.convert(myPoem.getTitle()) %" . I know all this could work, but still I think it involves a programming overhead which I would like to avoid if possible. - Especially because I have found out I do not need to do any conversion for content which is not used in an attribute, e.g. myPoem.getContents() works fine no matter what it contains.
RE: Orion as a Win2000 service ?
In the archive I've found the following: From:Larry Velez [EMAIL PROTECTED] Subject: Orion as a Win2000 service I am running Orion as a service using the following RunSvcExe script: Note that jvmi.exe (http://www.kcmultimedia.com/jvmi/) is necessary because of a bug (or feature) in Win32 Java that does not allow you to log out of the machine while Orion is running. This defeats the whole purpose of running Orion as a service. ### # This script runs OrionServer as a service # JAVA_HOME=d:\jre\1.3 ORION_HOME=d:\orion # set up java run-time stuff exe=$JAVA_HOME$\bin\hotspot\jvmi.exe # RunExeSvc variables debug=false# if true, RunExeSvc will show internal status home=$ORION_HOME$ # the starting dir of the service # Running as an http server. cmdline=$exe$ (YOUR ORION COMMAND LINE HERE) ## My question is that how can it work? It seems that JVMI does not support .JAR files(?). I've created a .Cmd file (not sure about those scripts, but should do the same): REM ### REM # This script runs OrionServer as a service REM # SET JAVA_HOME=c:\jdk1.3 SET ORION_HOME=c:\orion REM # set up java run-time stuff SET exe=%JAVA_HOME%\jre\bin\hotspot\jvmi.exe REM # RunExeSvc variables SET debug=true# if true, RunExeSvc will show internal status SET home=%ORION_HOME% # the starting dir of the service REM # Running as an http server. REM cmdline=$exe$ (YOUR ORION COMMAND LINE HERE) %exe% -jar orion.jar But it does not work: C:\orionREM ### C:\orionREM # This script runs OrionServer as a service C:\orionREM # C:\orionSET JAVA_HOME=c:\jdk1.3 C:\orionSET ORION_HOME=c:\orion C:\orionREM # set up java run-time stuff C:\orionSET exe=c:\jdk1.3\jre\bin\hotspot\jvmi.exe C:\orionREM # RunExeSvc variables C:\orionSET debug=true# if true, RunExeSvc will show internal status C:\orionSET home=c:\orion # the starting dir of the service C:\orionREM # Running as an http server. C:\orionREM cmdline=$exe$ (YOUR ORION COMMAND LINE HERE) C:\orionc:\jdk1.3\jre\bin\hotspot\jvmi.exe -jar orion.jar jvmi.exe 1.1 - (C)2000 by Bill Giel/KCMDG Java 1.3 VM Invoker (which traps LOGOFF events) ** * Evaluation Version - for licensing information * * contact [EMAIL PROTECTED] * ** Cannot find main class. Any ideas? (Maybe the problem is trivial...) Thank you in advance, Adam
message javax.transaction.RollbackException
Hi, How to get the original Exception that have generate a rollback in a Statefull SessionBean "bean-managed transaction" ? I've a SessionBean that do: try { UserTransaction tx = ...; tx.begin(); ... set on an Entity BMP that generate SQLException in later call to ejbStore. tx.commit(); } catch (javax.transaction.RollbackException ex) { println("RollbackException: " + ex.getMessage()); } . I can see that next to the transaction commit: 1. orion call ejbStore() 2. ejbStore() try to update the data base = SQLException with message = throw EJBException that wrap the SQLException... 3. my SSB catch javax.transaction.RollbackException 4. BUT this Exception doesn't contain any message ! Is it conforme to the spec?? If yes, how to get a message from the exception that generate the rollback ??? Thank's for help.
RE: I switch from X to Orion because:
I switched because: 1. Bluestone's Total-e-Server will cost you over $100,000.00. And that is an iteration based license.After so many app server iterations (oh yeah, they don't tell you what an iteration is...), it's time to buy more iterations (HP now owns this company). 2. Tomcat does not support EJB, even if it did, getting Tomcat Apache working together is sometimes a hair-pulling experience. 3. All of the horror stories from developers claiming that iPlanet is VERY buggy. 4. Because Websphere / Weblogic is too expensive for some customers. 5. Because Unify is rumored to be on unstable financial ground (even though eWave is only $595/cpu). 6. Because Orion was easy to install, easy to deploy, and easy to maintain. Granted that we DO NOT use entity beans. We only use stateless session beans. EJB is still too immature to be using entity beans, if you don't believe me, look at the majority of the posts on this mailing list. They mostly deal with entity bean problems!! That's my personal opinionplease be gentle with the entity-flame-emails :) Regards, Tom Pridham -Original Message-From: Vaskin Kissoyan [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 27, 2001 2:05 PMTo: Orion-InterestSubject: I switch from X to Orion because: Please fill in the blank as you see fit.
orion.jar needed for JNDI-lookup??
Hi everybody, we are running a Swing-application accessing via HTTP/RMI to an EJB-server. To do the JNDI-lookup class "com.evermind.server.ApplicationClientInitialContextFactory" is used as describes in the orion-doc. The problem: this class is located in orion.jar (2.sthg MB), which is after my understanding the main-lib of the whole orion-server. Consequences: 1) we don't want to ship this lib to the client (system uses Java-Webstart to download all classes and libraries needed, even if Webstart only updates classes which are changing this is way too much download for "some JNDI-lookup") 2) how can this conform to the licence-model of Orion when you have to ship the application-server to the client (for each client-installation, which in this scenario comes up to several hundred) If I should have missed sthg. in the doc, sorry for this. If not: how to deal with that since this a pro/con-decision for our customer using Orion. Thanks Cheers, Stefan Wendel, [EMAIL PROTECTED]
RE: Good tutorial
Time to clarify my remarks. I agree with all you said, and I met for J2EE deployment purposes. Thanks for pointing out that we have apples and oranges here. -Original Message- From: Ernst de Haan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 6:25 PM To: Orion-Interest Subject: Re: Good tutorial Hey, While the Sun tools may be easier to use in the general case of deploying a J2EE application, Ant is a *generic* and extendible build tool, that can be used to perform from the simplest (copy, move, rename, delete files, compile, execute) to the most advanced (deploying complete J2EE applications, performing unit tests, translating source code to formatted HTML, checking Javadoc comments for completeness, etc.) And all of that in a platform-independant manner :) So IMHO comparing deploytool with Ant is a bit odd. -- Ernst Kemp Randy-W18971 wrote: This is a nice tutorial at www.4degreez.com and now that I am used to ant, the sun tools are much easier. And I, for one, and all for making my life easier.
RE: Orion as a Win2000 service ?
I have to reply to my own question, since I got a quick response from the author of JVMI. The solution is to put orion.jar to classpath and invoke the main class: c:\jdk1.3\jre\bin\hotspot\jvmi.exe -cp orion.jar com.evermind.server.ApplicationServer It's seems to be working. Sorry if it was obvious, Adam
Re: orion.jar needed for JNDI-lookup??
Hi Stefan, we are running a Swing-application accessing via HTTP/RMI to an EJB-server. To do the JNDI-lookup class "com.evermind.server.ApplicationClientInitialContextFactory" is used as describes in the orion-doc. Do you *need* to downcast to ApplicationClientInitialContextFactory, or can you perhaps use a superclass (InitialContextFactory) ? If so, then you only need the JNDI libraries. -- Ernst
Database schema type mappings
If you look at the database schema in "orion/config/database-schemas/hypersonic.xml" it looks as if it is mapping between the primitive java type "int" and the corresponding database type "int": type-mapping type="int" name="int" /. In my EJBs my primary keys and other attributes are of type Integer. Since there is no mapping for class Integer one could think that Integers would be mapped to VARBINARY. Luckily my integers are mapped to the database type "int", but this makes me ask two questions: 1. Why is Integers automatically converted to int by Orion - and is this a standard EJB convention? 2. Would it be legal to have a primary key of the primitive type "int" instead of Integer? Yours Randahl
Re: Classpath
Title: RE: Classpath Thanks a lot! Luis Javier Hi, It seems to me that if you start orion like "java -jar orion.jar" there is a problem with setting the classpath. I start orion like this : set SERVER_PATH=.;%JDBC_PATH%;%OTHER_PATHS% java -classpath "%SERVER_PATH%" com.evermind.server.ApplicationServer My %SERVER_PATH% has all external jars i use. Bye, Eyal Litman Kamoon software
Re: EJB values into xml attributes (a little off topic, I know)
You can use title as element not as attribut in your XML document. Then you can to use CDATA. Everything inside a CDATA section is ignored by the parser. poem title ![CDATA[ everything you want.. ]] /title /poem BaV RFI PROBLEM RFI I have a question regarding taking properties from an EJB and generating XML RFI output. To explain, here is an example of my problem: RFI poem title = "%= myPoem.getTitle()" %= myPoem.getContents() % RFI /poem RFI Because title is an XML attribute I think special characters like '' needs RFI to be escaped with amp; and the like. How does one handle this in a nice RFI way? ---R--E--K--L--A--M--A- Szukasz wiedzy? 85 tysiecy uaktualnianych ciagle hasel. Encyklopedia Internautica: http://encyklopedia.interia.pl/
Re: Form based authentication problem
FYII came up with something that makes it work. I edited the MainServlet.java file and added a doPost method that just calls the doGet method already implemented.This makes perfect sense except that it worked as it was on the Sun Reference Implemetation, JBoss/Tomcat, Weblogic5.1, and Weblogic6.0. Jonathan - Original Message - From: Jonathan James To: Orion-Interest Sent: Tuesday, February 27, 2001 10:49 AM Subject: Form based authentication problem I'm trying to get the Java Petstore 1.1.1 (the new one) working with Orion. I've read some previous posts and the docs and everything is working except that on my login.jsp I have to use form action="j_security_check" method=GET instead of form action="j_security_check" method=POST as it is supposed to be. This ends up putting the password in the URL. Why doesn't POST work with with j_security_check? Thanks Jonathan
RE: Orion as a Win2000 service ?
In our production environment (win2000), we are using JNT to run Orion as a service: http://www.eworksmart.com/jnt/ Works great. One bug is when you issue a stop command, the stop dialog hangs halfway through, but the service is stopped. Can't beat the price, free!!! -Original Message- From: Toth [@HOTMAIL], Adam (E-mail) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 8:19 AM To: Orion-Interest Subject: RE: Orion as a Win2000 service ? In the archive I've found the following: From:Larry Velez [EMAIL PROTECTED] Subject: Orion as a Win2000 service I am running Orion as a service using the following RunSvcExe script: Note that jvmi.exe (http://www.kcmultimedia.com/jvmi/) is necessary because of a bug (or feature) in Win32 Java that does not allow you to log out of the machine while Orion is running. This defeats the whole purpose of running Orion as a service. ### # This script runs OrionServer as a service # JAVA_HOME=d:\jre\1.3 ORION_HOME=d:\orion # set up java run-time stuff exe=$JAVA_HOME$\bin\hotspot\jvmi.exe # RunExeSvc variables debug=false# if true, RunExeSvc will show internal status home=$ORION_HOME$ # the starting dir of the service # Running as an http server. cmdline=$exe$ (YOUR ORION COMMAND LINE HERE) ## My question is that how can it work? It seems that JVMI does not support .JAR files(?). I've created a .Cmd file (not sure about those scripts, but should do the same): REM ### REM # This script runs OrionServer as a service REM # SET JAVA_HOME=c:\jdk1.3 SET ORION_HOME=c:\orion REM # set up java run-time stuff SET exe=%JAVA_HOME%\jre\bin\hotspot\jvmi.exe REM # RunExeSvc variables SET debug=true# if true, RunExeSvc will show internal status SET home=%ORION_HOME% # the starting dir of the service REM # Running as an http server. REM cmdline=$exe$ (YOUR ORION COMMAND LINE HERE) %exe% -jar orion.jar But it does not work: C:\orionREM ### C:\orionREM # This script runs OrionServer as a service C:\orionREM # C:\orionSET JAVA_HOME=c:\jdk1.3 C:\orionSET ORION_HOME=c:\orion C:\orionREM # set up java run-time stuff C:\orionSET exe=c:\jdk1.3\jre\bin\hotspot\jvmi.exe C:\orionREM # RunExeSvc variables C:\orionSET debug=true# if true, RunExeSvc will show internal status C:\orionSET home=c:\orion # the starting dir of the service C:\orionREM # Running as an http server. C:\orionREM cmdline=$exe$ (YOUR ORION COMMAND LINE HERE) C:\orionc:\jdk1.3\jre\bin\hotspot\jvmi.exe -jar orion.jar jvmi.exe 1.1 - (C)2000 by Bill Giel/KCMDG Java 1.3 VM Invoker (which traps LOGOFF events) ** * Evaluation Version - for licensing information * * contact [EMAIL PROTECTED] * ** Cannot find main class. Any ideas? (Maybe the problem is trivial...) Thank you in advance, Adam
RE: CMP 2.0
Title: RE: CMP 2.0 I've been out for a few days, so it this has been answered, sorry for the repost. This sounds like you didn't set the transactional behavior in ejb-jar.xml as required. There is no default behavior in the spec so it is up to the container to decide what the default behavior is. I know in Weblogic, transactions default to supports (I think). In any event, the entities are not stored in the database unless you mark them as required. Orion may be doing the same thing. -tim -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 5:29 AM To: Orion-Interest Subject: CMP 2.0 Would somebody please confirm that they have been able to use CMP 2.0 relationships on Orion, that they have seen them get stored in the database AND brought back into main memory correctly after a restart of the server. When I create a relationship it works fine until I restart - I simply can't make Orion restore my relationships from the keys it stores in the database. If I try the getX() / method of a cmr property it works - but after a restart it returns null. R.
RE: I switch from X to Orion because:
Just a comment onTomcat. I agree that Orion is a great product, and Tomcat has a funky protocol arrangement with Apache, but that will get better. Right now, Tomcat is integrated with Jboss, and there is talk of putting Apache into the equation. Openejb is also stated to be integrated with Apache and Tomcat. Resin is great for integration with Apache and Resin EJB will become part of that equation. If had a wish list, I like to see the potential to integrate Orion with Apache (through Orion software). -Original Message-From: Thomas Pridham [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 28, 2001 7:41 AMTo: Orion-InterestSubject: RE: I switch from X to Orion because: I switched because: 1. Bluestone's Total-e-Server will cost you over $100,000.00. And that is an iteration based license.After so many app server iterations (oh yeah, they don't tell you what an iteration is...), it's time to buy more iterations (HP now owns this company). 2. Tomcat does not support EJB, even if it did, getting Tomcat Apache working together is sometimes a hair-pulling experience. 3. All of the horror stories from developers claiming that iPlanet is VERY buggy. 4. Because Websphere / Weblogic is too expensive for some customers. 5. Because Unify is rumored to be on unstable financial ground (even though eWave is only $595/cpu). 6. Because Orion was easy to install, easy to deploy, and easy to maintain. Granted that we DO NOT use entity beans. We only use stateless session beans. EJB is still too immature to be using entity beans, if you don't believe me, look at the majority of the posts on this mailing list. They mostly deal with entity bean problems!! That's my personal opinionplease be gentle with the entity-flame-emails :) Regards, Tom Pridham -Original Message-From: Vaskin Kissoyan [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 27, 2001 2:05 PMTo: Orion-InterestSubject: I switch from X to Orion because: Please fill in the blank as you see fit.
RE: simple JSP bug with switch
Title: RE: simple JSP bug with switch OK, this seems reasonable. My worry was in transitioning from other engines one of my first experiences was coming up against something simple that wouldn't compile properly in Orion. My first thought was uh oh, how many more inconsistencies am I going to run into?. So you can understand my concern. thanks! adam -Original Message- From: Tim Endres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 8:56 PM To: Orion-Interest Subject: RE: simple JSP bug with switch It appears to me that Sun's RI is recognizing the obvious - that statements can not appear between switch and case, nor between break and case. Unless the spec specifically addresses this, it seems that Orion is doing the correct thing, and Sun is providing a nicety that lulls one into writing bad JSP code. tim. Sorry if I didn't quite get your point. It's odd though. The spec VERY specifically says that whitespace must be preserved (JSP 1.1 spec, section 2.1.6), so it seems to me that what Orion is doing is correct, even if it seems inconvenient. If I write: % out.print(one); % % out.print(two); % then my reading of the spec says that I must get the two words printed on different lines (which I believe Orion would do), whereas you seem to be saying that Sun's RI would print onetwo. Or is Sun's RI somehow clever enough to know the difference between my sample and yours? That would take some clever examination of what's in the scriptlets, I would think. Nick Newman At 04:58 PM 2/27/01 -0500, you wrote: OK, thanks, I understand that (which is how I fixed the code). However, I believe this isn't the proper behaviour for JSP. Orion should eat that newline. This is how other JSP engines behave, including Sun's reference engine. It shouldn't break the java code by inserting an erroneous println... or am I smoking crack? adam -Original Message- From: Nick Newman [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 11:40 AM To: Orion-Interest Subject: Re: simple JSP bug with switch Hi Adam, I don't think this is a bug, although I agree the messages are confusing. Set the development=true flag in the orion-web.xml and you get the reason explained more fully. Basically what you have written in the broken version produces code like this: switch(1){ // write a new line (but can't be reached!) case 1: // write newline, One, newline break; // write a new line (but can't be reached!) default: // write newline, Default, newline break; // write a new line (but can't be reached!) } and the compiler complains (correctly) that some of the copde can't be reached. Nick Newman At 08:11 PM 2/26/01 -0500, you wrote: Forgive me if this is a known bug, but I didn't see it in the FAQ or anywhere on orionsupport.com. I am using Orion 1.4.7 and I have tried having Orion use Jikes 1.12 as well as all three of the 1.30 JDKs {Sun,IBM,Blackdown}. This is all running on RedHat 7.0 Linux 2.4.2. fixed version (but I shouldn't have to do this...): % switch(1) { case 1: % One % break; default: % Default % break; } % broken version: % switch(1) { % % case 1: % One % break; % % default: % Default % break; % % } % Gives the following error (this is the Blackdown error, but they're all similar) 500 Internal Server Error Error parsing JSP page /jsp/test.jsp Syntax error in source /jsp/test.jsp.java:29: 'case', 'default' or '}' expected (JSP page line 3) if(__coreOut == out) __coreOut.write(__staticContent, 0, 1); ^ /jsp/test.jsp.java:29: 'case', 'default' or '}' expected (JSP page line 3) if(__coreOut == out) __coreOut.write(__staticContent, 0, 1); ^ /jsp/test.jsp.java:30: 'case', 'default' or '}' expected (JSP page line 3) else com.evermind.server.http.EvermindJSPWriter.writeBytes(out, __staticContent, 0, 1, null); ^ /jsp/test.jsp.java:35: 'case', 'default' or '}' expected (JSP page line 4) if(__coreOut == out) __coreOut.write(__staticContent, 1, 5); ^ /jsp/test.jsp.java:36: 'case', 'default' or '}' expected (JSP page line 4) else com.evermind.server.http.EvermindJSPWriter.writeBytes(out, __staticContent, 1, 5, null); ^ /jsp/test.jsp.java:38: 'case', 'default' or '}' expected (JSP page line 4) break; ^ /jsp/test.jsp.java:41: 'case', 'default' or '}' expected (JSP page line 6) if(__coreOut == out) __coreOut.write(__staticContent, 6, 1); ^ /jsp/test.jsp.java:42: 'case', 'default' or '}' expected (JSP page line 6) else com.evermind.server.http.EvermindJSPWriter.writeBytes(out, __staticContent, 6, 1, null); ^ /jsp/test.jsp.java:47: 'case', 'default' or '}' expected (JSP page line 7) if(__coreOut == out) __coreOut.write(__staticContent, 7, 9); ^ /jsp/test.jsp.java:48: 'case', 'default' or
RE: Multiple CPUs
Is there an Orion option something like the -multiVM startup option in j2ee RI ? --peter
RE: Form based authentication problem
Post works for me in my test code what error do you get? --peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jonathan James Sent: Tuesday, February 27, 2001 9:50 AM To: Orion-Interest Subject: Form based authentication problem I'm trying to get the Java Petstore 1.1.1 (the new one) working with Orion. I've read some previous posts and the docs and everything is working except that on my login.jsp I have to use form action=j_security_check method=GET instead of form action=j_security_check method=POST as it is supposed to be. This ends up putting the password in the URL. Why doesn't POST work with with j_security_check? Thanks Jonathan
RE: problem in accessing ejb from a bean in web-inf/classes direc tory .
These should be in the WEB-INF directory. If you have your application packaged as WAR file it should have a folder called WEB-INF. Your web.xml file should be there. If you're running your code using orion's default web app, you'll find the file under orion/default-web-app/WEB-INF. In your web.xml file the ejb references should be defined like so: ejb-ref ejb-ref-nameejb/EDMSessionBean/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeCore.BusinessObjects.EDMSession.EDMSessionHome/home remoteCore.BusinessObjects.EDMSession.EDMSessionRemote/remote ejb-linkTheEDMSessionBean/ejb-link /ejb-ref With this definition my code would then expect to find the bean under java:comp/env/ejb/EDMSessionBean In you orion-web.xml, which should reside in you application-deployments directory, you need to link the bean like this: ejb-ref-mapping name="ejb/EDMSessionBean" location="TheEDMSessionBean" / In this case location="TheEDMSessionBean" is the location specified in your ejb-jar. Hope this helps. Andre -Original Message- From: Prabahkar Subramaniam [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 9:18 AM To: 'Andre Vanha' Subject: RE: problem in accessing ejb from a bean in web-inf/classes direc tory . Where can I find the web.xml and orion-web.xml files?. Prabahkar -Original Message- From: Andre Vanha [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 5:42 PM To: Orion-Interest Subject: RE: problem in accessing ejb from a bean in web-inf/classes direc tory . Did you define the ejb-refs in your web.xml and link them correctly in orion-web.xml? It works fine for me. Andre -Original Message- From: Prabahkar Subramaniam [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 2:14 PM To: Orion-Interest Subject: RE: problem in accessing ejb from a bean in web-inf/classes direc tory . I tried the following 2 ways and get the same error: Object hdrObj = cntx.lookup("java:comp/env/B2BOrderHeader"); headerHome = (B2BOrderHeaderHome) and headerHome = (B2BOrderHeaderHome)cntx.lookup("B2BOrderHeader"); error: javax.naming.NameNotFoundException: B2BOrderHeader not found at com.evermind.server.rmi.RMIContext.lookup(JAX) at com.evermind.server.hl.f3(JAX) at com.evermind.server.hl.lookup(JAX) at javax.naming.InitialContext.lookup(Unknown Source) at replacement.OrderBeanWrapper.loadOrder(OrderBeanWrapper.java:142) at __jspPage1_replacement_loadorder_jsp._jspService(__jspPage1_replacement_load order_jsp.java:44) at com.orionserver.http.OrionHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.xa(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at com.evermind.server.http.d3.so(JAX) at com.evermind.server.http.d3.sm(JAX) at com.evermind.server.http.ef.su(JAX) at com.evermind.server.http.ef.dn(JAX) at com.evermind.util.f.run(JAX) The line 142 is: headerHome = (B2BOrderHeaderHome) cntx.lookup("B2BOrderHeader"); Thanks in advance for your help Prabahkar -Original Message- From: Rafael Alvarez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 10:59 AM To: Orion-Interest Subject: Re: problem in accessing ejb from a bean in web-inf/classes directory . Hello Prabahkar, Monday, February 26, 2001, 7:38:40 PM, you wrote: Try using Object hdrObj = cntx.lookup("B2BOrderHeader"); I think I remember vagely a thread in this list about java:comp/, but that was 3000 messages ago :). Anyway, this works fine for me. -- Best regards, Rafaelmailto:[EMAIL PROTECTED]
RE: JAXP
The other day, somebody posted a well written document on Java2 class loaders. I wish I had the url to the document, but I can't find it. The gist of the document was this: All class loaders within a jvm form a hierarchy with the boot class loader being at the root. No matter which class loader in this hierarchy is utilized, it's job is to always delegate to it's parent class loader before attempting to load anything on it's own. In this case I belive orion's application class loaders will still be children of orion's class loader, so classes defined at the class path level (using orion.jar's classpath manifest attribute) will be used. Even if you create a lib entry to jaxp in server.xml or orion-application.xml the jxap that ships with orion will be used. Andre -Original Message- From: Conrad Chan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 4:25 PM To: Orion-Interest Subject: RE: JAXP Have you try to package your version of JAXP files inside your application archive (ear, war)? This idea comes from the fact that every class is identified not only its class name but also which class loader it is loaded from. Since Orion supports dynamic loading of application files, it should be using a custom classloader for every application. Hence, by theory, you should be able to use a different JAXP than the one Orion uses. Of course it depends on exactly how Orion implements this. If Orion looks for classes from the default classloader first, it is still not going to work. But I think it does worth a try. Hope this help Conrad -Original Message- From: Richard Doust [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 4:31 PM To: Orion-Interest Subject: JAXP I have been working on this problem all day. I have posted once before and no one responded. I will try again. I'm no Java expert and this is just my ignorance, but can anyone tell me if I'm correct in my assumptions on this. I am trying to develop server side code that runs under Orion that uses the JAXP code that Sun has recently released. There are different versions of parser.jar, xalan.jar and jaxp.jar distributed with Orion. Older ones. I have tried replacing the older ones with the newer ones because my code requires the newer ones and I guess that my code will be running in the same image as Orion. Orion fails to start due to an exception while trying to parse its configuration files. Putting the old .jar files back, it works again. So, now it occurs to me that I'm basically stuck running with whatever version of support code the tools I'm using are dependent on. If I'm right, that means I can't use the latest version of JAXP until Orion does? Is that right? Anyone? Thanks, Rich
Re: simple JSP bug with switch
Title: Re: simple JSP bug with switch OK, this seems reasonable. My worry was in transitioning from other engines one of my first experiences was coming up against something simple that wouldn't compile properly in Orion. My first thought was uh oh, how many more inconsistencies am I going to run into?. So you can understand my concern. thanks! adam -Original Message- From: Tim Endres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 8:56 PM To: Orion-Interest Subject: RE: simple JSP bug with switch It appears to me that Sun's RI is recognizing the obvious - that statements can not appear between switch and case, nor between break and case. Unless the spec specifically addresses this, it seems that Orion is doing the correct thing, and Sun is providing a nicety that lulls one into writing bad JSP code. tim. Sorry if I didn't quite get your point. It's odd though. The spec VERY specifically says that whitespace must be preserved (JSP 1.1 spec, section 2.1.6), so it seems to me that what Orion is doing is correct, even if it seems inconvenient. If I write: % out.print(one); % % out.print(two); % then my reading of the spec says that I must get the two words printed on different lines (which I believe Orion would do), whereas you seem to be saying that Sun's RI would print onetwo. Or is Sun's RI somehow clever enough to know the difference between my sample and yours? That would take some clever examination of what's in the scriptlets, I would think. Nick Newman At 04:58 PM 2/27/01 -0500, you wrote: OK, thanks, I understand that (which is how I fixed the code). However, I believe this isn't the proper behaviour for JSP. Orion should eat that newline. This is how other JSP engines behave, including Sun's reference engine. It shouldn't break the java code by inserting an erroneous println... or am I smoking crack? adam -Original Message- From: Nick Newman [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 11:40 AM To: Orion-Interest Subject: Re: simple JSP bug with switch Hi Adam, I don't think this is a bug, although I agree the messages are confusing. Set the development=true flag in the orion-web.xml and you get the reason explained more fully. Basically what you have written in the broken version produces code like this: switch(1){ // write a new line (but can't be reached!) case 1: // write newline, One, newline break; // write a new line (but can't be reached!) default: // write newline, Default, newline break; // write a new line (but can't be reached!) } and the compiler complains (correctly) that some of the copde can't be reached. Nick Newman At 08:11 PM 2/26/01 -0500, you wrote: Forgive me if this is a known bug, but I didn't see it in the FAQ or anywhere on orionsupport.com. I am using Orion 1.4.7 and I have tried having Orion use Jikes 1.12 as well as all three of the 1.30 JDKs {Sun,IBM,Blackdown}. This is all running on RedHat 7.0 Linux 2.4.2. fixed version (but I shouldn't have to do this...): % switch(1) { case 1: % One % break; default: % Default % break; } % broken version: % switch(1) { % % case 1: % One % break; % % default: % Default % break; % % } % Gives the following error (this is the Blackdown error, but they're all similar) 500 Internal Server Error Error parsing JSP page /jsp/test.jsp Syntax error in source /jsp/test.jsp.java:29: 'case', 'default' or '}' expected (JSP page line 3) if(__coreOut == out) __coreOut.write(__staticContent, 0, 1); ^ /jsp/test.jsp.java:29: 'case', 'default' or '}' expected (JSP page line 3) if(__coreOut == out) __coreOut.write(__staticContent, 0, 1); ^ /jsp/test.jsp.java:30: 'case', 'default' or '}' expected (JSP page line 3) else com.evermind.server.http.EvermindJSPWriter.writeBytes(out, __staticContent, 0, 1, null); ^ /jsp/test.jsp.java:35: 'case', 'default' or '}' expected (JSP page line 4) if(__coreOut == out) __coreOut.write(__staticContent, 1, 5); ^ /jsp/test.jsp.java:36: 'case', 'default' or '}' expected (JSP page line 4) else com.evermind.server.http.EvermindJSPWriter.writeBytes(out, __staticContent, 1, 5, null); ^ /jsp/test.jsp.java:38: 'case', 'default' or '}' expected (JSP page line 4) break; ^ /jsp/test.jsp.java:41: 'case', 'default' or '}' expected (JSP page line 6) if(__coreOut == out) __coreOut.write(__staticContent, 6, 1); ^ /jsp/test.jsp.java:42: 'case', 'default' or '}' expected (JSP page line 6) else com.evermind.server.http.EvermindJSPWriter.writeBytes(out, __staticContent, 6, 1, null); ^ /jsp/test.jsp.java:47: 'case', 'default' or '}' expected (JSP page line 7) if(__coreOut == out) __coreOut.write(__staticContent, 7, 9); ^ /jsp/test.jsp.java:48: 'case', 'default' or
In Orion, are tag handler instances reused or reinstantiated?
We are trying to figure out if tag handler objects are re-used, or instantiated-and-destroyed at every request. This is obviously important for performance reasons. There is conflicting information in JSP spec and on JGuru (see references below). So maybe it's an implementation-specific issue. Which brings me to the question: What does Orion do with tag handler instances? Reuse or reinstantiate them? JSP spec 1.1, paragraph 5.4.7: At execution time the implementation of a JSP page will use an available Tag instance with the appropriate prefix and name that is not being used, initialize it, and then follow the protocol described below. Afterwards, it will release the instance and make it available for further use. This approach reduces the number of instances that are needed at a time. http://www.jguru.com/jguru/faq/view.jsp?EID=337618 Question We want to make sure that our JSP development efforts are thread-safe. Is it possible that two threads will access one instance of a JSP custom tag handler concurrently? No it is not possible. There is a defined lifecycle of a custom tag, and during this lifecycle, that instance of the tag will only get called once. Hopefully in newer implementations of JSP engines, the actual tag object will not get reinstantiated each time (as this negatively affects performance), but at least during it's use, it will be thread safe. -- Bart Blacha, Software Developer NetPerceptions Inc. (512) 349-5622 [EMAIL PROTECTED]
Re: orion.jar needed for JNDI-lookup??
Hi Ernst, there is no superclass since InitialContextFactory is an interface which is implemented by ApplicationClientInitialContextFactory directly (so every vendor provides his own InitialContextFactoryClass...) It should work like this: when the class is needed it should be loaded by the class loader over the net (this is a basic principle of JNDI: load the "driver" which is needed for current application, if not already installed on the client). To be more specific with my error: I get an error from the java.net.URLClassLoader which says he(she...?) can't find the specific class (ClassNotFoundException). Did I miss some setup somewhere ... ? Greetings, Stefan - Original Message - From: "Ernst de Haan" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 3:54 PM Subject: Re: orion.jar needed for JNDI-lookup?? Hi Stefan, we are running a Swing-application accessing via HTTP/RMI to an EJB-server. To do the JNDI-lookup class "com.evermind.server.ApplicationClientInitialContextFactory" is used as describes in the orion-doc. Do you *need* to downcast to ApplicationClientInitialContextFactory, or can you perhaps use a superclass (InitialContextFactory) ? If so, then you only need the JNDI libraries. -- Ernst
mail.jar POP3
Hello, I'm trying to add POP3 functionality to my application on orion. Unfortunately, the mail.jar that ships with orion does not include the POP3 provider. Does anyone know how I can enable the POP3 provider from Sun without replacing, or otherwise having to modify the existing mail.jar? Thanks, Andre Machines should work. People should think. -- IBM motto
recreate tables for a cmp
All, I have a cmp that has been deployed and has created tables for itself. Now, I'd like to migrate to a different schema/db. Changing the schema connect string info in data-sources.xml to point at a different db, and restarting orion does not by itself trigger recreation of the entitybean tables. Any use of the bean causes the following error: javax.ejb.CreateException: Error creating EntityBean: ORA-00942: table or view does not exist It seems that if you change some of the info in orion-ejb-jar.xml (a cmp-field-mapping-name), the tables will be recreated the next time orion is started. I was wondering if anyone knows of a easier way to signal orion to recreate db tables for an cmp bean? TIA. John Hogan _ Get your free E-mail at http://www.ireland.com
RE: Database schema type mappings
Randahl, We use the primitive long for all of our primary keys for a couple of reasons: * primary keys can't be null so there isn't a need for Long (or Integer) * long's are always 4 bytes no matter what the CPU (32bit vs 64bit), which is currently not a problem but could be when Itanium platforms come out. int's depend on the CPU's native integer type which happens to be 32bits on ix86 architectures. Michael Third Chief Software Architect parts.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Randahl Fink Isaksen Sent: Wednesday, February 28, 2001 10:02 AM To: Orion-Interest Subject: Database schema type mappings If you look at the database schema in "orion/config/database-schemas/hypersonic.xml" it looks as if it is mapping between the primitive java type "int" and the corresponding database type "int": type-mapping type="int" name="int" /. In my EJBs my primary keys and other attributes are of type Integer. Since there is no mapping for class Integer one could think that Integers would be mapped to VARBINARY. Luckily my integers are mapped to the database type "int", but this makes me ask two questions: 1. Why is Integers automatically converted to int by Orion - and is this a standard EJB convention? 2. Would it be legal to have a primary key of the primitive type "int" instead of Integer? Yours Randahl
RE: Servlet Cache - How do I purge it
$orion\application-deployments\YOUREAR\YOURWAR\persistance kill every file, the orion will recompile HTH, JP -Original Message- From: Paul G. Markovich [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2001 11:07 PM To: Orion-Interest Subject: Servlet Cache - How do I purge it Hi, I am using servlets in the orion default web app. My dir: Orion/defaul-web-app/Web-inf/classes/(and then my files) I have the output of my compiler set to the same directory. I start orion like: java -jar orion.jar and I stop orion with a ctrl C I have reloaded my class files and I can't ever get the new files to load. I am working on NT4, jdk1.3, orion 1.4.5 Should I start stop differently??? Is there a physical location and file that I can delete that is storing this information??? Help, Paul
Re: Classpath
Hi, It seems to me that if you start orion like "java -jar orion.jar" there is a problem with setting the classpath. the problem is that the Java documentation explicitly says that if the jar invocation mechanism is used, the classpath is taken from the manifest file inside the jar, and all other classpath sources are ignored.
Re: I switch from X to Orion because:
2. Tomcat does not support EJB, even if it did, getting Tomcat Apache working together is sometimes a hair-pulling experience. now what exactly was your problem there? I just installed tomcat under apache on my new Linux box, and had no problems at all - just followed the instructions. And deploying an app is not more than copying the .war into the webapps directory...
signoff EJB-INTEREST
signoff EJB-INTEREST
RE: I switch from X to Orion because:
Tomcat does not support EJB... the original author of the message meant Tomcat JBoss... And that integration is pure hell... Of course, you can download the already integrated version, but you'd be getting an old JBoss and an old Tomcat... The main problem with Tomcat and JBoss is also their virtue. Since everything is so modular, it also means that there are a lot of components, some of which have conflicts among eath other Among other things, JBoss is not compliant to any spec, as simple things like java:/comp/env namespace are plainly not supported by their jndi impl, cmp (jaws) support is very poor and does not really scale well to more than a couple kids playing "deploy" on 3 machines... JBoss also has many problems deploying j2ee "ear" (Enterprise Archives) ... Although Orion is small, it's self-contained and requires very little work to get everything running. flame-warning I respect the authors of JBoss as they have done a great job, but you really can't compare... it's a orange vs. apples comparison. As for Tomcat, it gives a bad name to server-java altogether... and as for Apache Server, well, what can I say, a simple "java" appserver such as Orion beats its performance by leaps... Most of the ASF is trying to stay compatible with dead things (jdk 1.1), which makes their software suffer a great deal. For example, they dislike the use of the Collections API, try to solve everyone's problems for everyone, and in the way bloat their products unnecessarily... And repeatedly "break" the rules... (How crazy is it creating threads inside the web container [Cocoon2] when the specs specifically say that it should not be done) ... An example of this is Jakarta-Struts... Sure it's great... but why then did Rickard Oberg (one of the technical leads in JBoss) create WebWork? ... Struts is just too damned bloated... same happens with most of Apache's offerings. It's rather sad, as most of those problems could easily be solved... Sometimes people on the list say things like "I can't get Cocoon to work under Orion", "I can't get XXX Apache product to work under Orion"... well now you know why :) haha ... Most of these problems are classloader issues which would break anyways, but since Tomcat has an arcane single classloader architecture, they'd never notice... /flame-warning -Original Message- From: Christian Sell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 3:01 PM To: Orion-Interest Subject: Re: I switch from X to Orion because: 2. Tomcat does not support EJB, even if it did, getting Tomcat Apache working together is sometimes a hair-pulling experience. now what exactly was your problem there? I just installed tomcat under apache on my new Linux box, and had no problems at all - just followed the instructions. And deploying an app is not more than copying the .war into the webapps directory...
Re: orion.jar needed for JNDI-lookup??
Ok, there is no superclass since InitialContextFactory is an interface which is implemented by ApplicationClientInitialContextFactory directly (so every vendor provides his own InitialContextFactoryClass...) Can you show that part of your code? Perhaps you can do smthng like this: // Perhaps this one is read from a configuration somehow String factoryClassName = "com.evermind.server.ApplicationClientInitialContextFactory"; InitialContextFactory factory; try { Class c = Class.forName(factoryClassName); } catch (Throwable t) { System.err.println("Unable to load initial context factory " + factoryClassName "."); t.printStackTrace(); } It should work like this: when the class is needed it should be loaded by the class loader over the net (this is a basic principle of JNDI: load the "driver" which is needed for current application, if not already installed on the client). Well, perhaps you're referencing the driver from your code, and perhaps you should try loading the class explicitly with the Class.forName() call? HTH, just my $ 0.02. -- Ernst To be more specific with my error: I get an error from the java.net.URLClassLoader which says he(she...?) can't find the specific class (ClassNotFoundException). Did I miss some setup somewhere ... ? Greetings, Stefan - Original Message - From: "Ernst de Haan" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 3:54 PM Subject: Re: orion.jar needed for JNDI-lookup?? Hi Stefan, we are running a Swing-application accessing via HTTP/RMI to an EJB-server. To do the JNDI-lookup class "com.evermind.server.ApplicationClientInitialContextFactory" is used as describes in the orion-doc. Do you *need* to downcast to ApplicationClientInitialContextFactory, or can you perhaps use a superclass (InitialContextFactory) ? If so, then you only need the JNDI libraries. -- Ernst
Servlet Filters
Hi, We're currently trying to move our web site from running IIS to hopefully Orion and we've come across something in the servlet container that we're hoping someone has seen or dealt with themselves before. We want to use a servlet filter to intercept *all* requests that come into the web server. Is this possible? It seems to work for all files when I put the URL filter as "/" or "/*". But we're also looking to be notified when a directory resource is requested. An example of this might be a url that looks like so: "http://www.somecompany.com/test". Test is not a virtual directory nor is it a directory under our site root. We forward these directory requests to a JSP that then produces the appropriate output for this directory on the fly. Has anyone tried this? Or is there another way to filter HTTP requests in the Orion web server? Thanks! -Mike
Connecting to LDAP from Orion
Hi all, Today I tried to connect to a LDAP server so I tried some things for a while, but no luck... Has anyone done this before? Do you know of some docs/tuts from which I can learn how to do this? thanks! franklin
Orion with tomcat!!!
Hello. I know it has been mentioned in serveral times. However, I could not make Orion as EJB server work with Apache Tomcat. A servlet is placed to access ejb at tomcat's WEB-INF/classes directory, along with application-client.xml under META-INF directory. The servlet looks as follows: import java.io.IOException; import java.util.Date; import java.util.*; import java.util.Properties; import javax.naming.*; import javax.servlet.*; import javax.servlet.http.*; import javax.rmi.PortableRemoteObject; import hello.ejb.Hello; import hello.ejb.HelloHome; public class HelloServlet extends HttpServlet { // constructor public HelloServlet() { super(); trace("init"); } // A reference to the remote `Hello' object protected Hello _hello; // Initializes this servlet public void init(ServletConfig config) throws ServletException { super.init(config); trace("init"); Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory"); env.put("java.naming.provider.url", "ormi://localhost:800/hello-planet"); env.put("java.naming.security.principal", "admin"); env.put("java.naming.security.credentials", "admin"); // Get the initial JNDI context using our settings Context initial; try { initial = new InitialContext(env); } catch (Throwable exception) { throw new ServletException( "Unable to get initial JNDI context: " + exception.toString()); } // Get a reference to the Hello home interface HelloHome helloHome; try { Object objref = initial.lookup("ejb/Hello"); helloHome = (HelloHome)PortableRemoteObject.narrow(objref, HelloHome.class); } catch (Throwable exception) { throw new ServletException( "Unable to get home interface: " + exception.toString()); } // Get a reference to a Hello instance try { _hello = helloHome.create(); } catch (Throwable exception) { throw new ServletException( "Unable to create Hello instance: " + exception.toString()); } // Insanity check: Make sure we have a valid reference if (_hello == null) { throw new ServletException( "Unable to create Hello instance, create() returned null"); } } // Handles the HTTP GET request public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { trace("doGet"); ServletOutputStream out = response.getOutputStream(); response.setContentType("text/html"); // Get the answer from the bean String answer; try { answer = _hello.sayHello(); } catch (Throwable exception) { out.println("HTMLBODY bgcolor=\"#FF\""); out.println("Time stamp: " + new Date().toString()); out.println("BRHello type: " + _hello.getClass().getName()); out.println("Error calling the Hello bean"); out.println(exception.toString()); out.println("/BODY"); out.println("/HTML"); return; } out.println("HTMLBODY bgcolor=\"#FF\""); out.println("Time stamp: " + new Date().toString()); out.println("BRHello type: " + _hello.getClass().getName()); out.println("BRAnswer: " + answer); out.println("/BODY"); out.println("/HTML"); } // Displays a trace message to System.out private void trace(String methodName) { System.out.print(methodName); System.out.println("() called"); } } However, when I call this servlet from Apache, it complains as follows: javax.servlet.ServletException: Unable to get initial JNDI context: javax.naming.NamingException: Error reading application-client descriptor: Error communicating with server: Lookup error: java.net.ConnectException: Connection refused; nested exception is: java.net.ConnectException: Connection refused; nested exception is: javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused; nested exception is: java.net.ConnectException: Connection refused at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(Compiled Code) at HelloServlet.init(Compiled Code) at org.apache.tomcat.core.ServletWrapper.doInit(Compiled Code) at org.apache.tomcat.core.Handler.init(Compiled Code) at org.apache.tomcat.core.ServletWrapper.init(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at
Re: mail.jar POP3
If you upgrade the mail.jar to JavaMail 1.2, the POP3 provider is included. Replacing mail.jar is most likely your easiest route. Otherwise, you have to deal with the javamail.providers file, which will almost certainly require that you modify mail.jar's version of that file. tim. Hello, I'm trying to add POP3 functionality to my application on orion. Unfortunately, the mail.jar that ships with orion does not include the POP3 provider. Does anyone know how I can enable the POP3 provider from Sun without replacing, or otherwise having to modify the existing mail.jar? Thanks, Andre Machines should work. People should think. -- IBM motto
Re: Connecting to LDAP from Orion
Go to http://java.sun.com/products/jndi/ and download the LDAP service provider. This will give you the JNDI SPI you need to access LDAP. As for docs/tutorials, I can not help you there. tim. Hi all, Today I tried to connect to a LDAP server so I tried some things for a while, but no luck... Has anyone done this before? Do you know of some docs/tuts from which I can learn how to do this? thanks! franklin
login security include file
I'm trying to do a response.sendRedirect() from an include file jsp:include and wanted to avoid doing a directive.include (preparser), I keep getting "Response has already been committed, be sure not to write to the OutputStream or to trigger a commit due to any other action before calling this method." I have been very careful as to put this include at the very top of the file, and to specify autoFlush=false and flush=false on the include tag. Again, the intention of this include file would be to be place at the top of the jsp file to secure it by redirecting to a login page if credentials in a session based UserBean do not allow access to the page for some reason. -Vaskin
RE: I switch from X to Orion because:
Just a few comments...not angry comments. :-) As a committer on an Apache project, let me just say that decisions to support JDK 1.1, on a per-project basis, are not about supporting "dead things". We have, in fact, people who _must_ use JDK 1.1 (probably more than you might think). As another example, we are a J2EE shop; but just recently we had a (big) requirement to support ISAM data. That's ancient, too, but I'll bet there's more ISAM data out there than there is relational data. Would you personally turn up your nose at supporting ISAM? Well, maybe you would. I dunno. I haven't used Struts myself, but since you mention it, I'd guess you'd have to ask Rickard himself why he decided to write his own framework. With all due respect to him, the primary reason, 9 times out of 10, that people write their own code is because as an industry we are damned terrible at re-use. There are a whole bunch of bad reasons why this is so - laziness, arrogance, reluctance to share the limelight, etc etc. Only rarely do you find that somebody wrote code because they conducted a thorough search and couldn't find anything that could even be modified. I'm personally pretty hot about this topic because there is a huge amount of wasted time due to this. Frameworks are a particularly bad offender - everybody and his brother wants to write their own framework. As far as bloat, well, that's in the eye of the beholder. If a product provides 100 features, but any given user only needs 25 of them, but nearly all of the features are useful to someone, it's "bloat" to almost everyone, but also useful to almost everyone. It's only bad bloat if the extra features get in your way, though, when you want to use your subset. I question whether this happens that often. But most of your comments are pretty general, so who knows exactly what you were talking about. Are Apache products perfect? No, not by a long shot. Are they as bad as you make them out to be? No, not by a long shot. Regards, Arved Sandstrom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Victor A. Salaman Sent: Wednesday, February 28, 2001 4:20 PM To: Orion-Interest Subject: RE: I switch from X to Orion because: Tomcat does not support EJB... the original author of the message meant Tomcat JBoss... And that integration is pure hell... Of course, you can download the already integrated version, but you'd be getting an old JBoss and an old Tomcat... The main problem with Tomcat and JBoss is also their virtue. Since everything is so modular, it also means that there are a lot of components, some of which have conflicts among eath other Among other things, JBoss is not compliant to any spec, as simple things like java:/comp/env namespace are plainly not supported by their jndi impl, cmp (jaws) support is very poor and does not really scale well to more than a couple kids playing "deploy" on 3 machines... JBoss also has many problems deploying j2ee "ear" (Enterprise Archives) ... Although Orion is small, it's self-contained and requires very little work to get everything running. flame-warning I respect the authors of JBoss as they have done a great job, but you really can't compare... it's a orange vs. apples comparison. As for Tomcat, it gives a bad name to server-java altogether... and as for Apache Server, well, what can I say, a simple "java" appserver such as Orion beats its performance by leaps... Most of the ASF is trying to stay compatible with dead things (jdk 1.1), which makes their software suffer a great deal. For example, they dislike the use of the Collections API, try to solve everyone's problems for everyone, and in the way bloat their products unnecessarily... And repeatedly "break" the rules... (How crazy is it creating threads inside the web container [Cocoon2] when the specs specifically say that it should not be done) ... An example of this is Jakarta-Struts... Sure it's great... but why then did Rickard Oberg (one of the technical leads in JBoss) create WebWork? ... Struts is just too damned bloated... same happens with most of Apache's offerings. It's rather sad, as most of those problems could easily be solved... Sometimes people on the list say things like "I can't get Cocoon to work under Orion", "I can't get XXX Apache product to work under Orion"... well now you know why :) haha ... Most of these problems are classloader issues which would break anyways, but since Tomcat has an arcane single classloader architecture, they'd never notice... /flame-warning -Original Message- From: Christian Sell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 3:01 PM To: Orion-Interest Subject: Re: I switch from X to Orion because: 2. Tomcat does not support EJB, even if it did, getting Tomcat Apache working together is sometimes a hair-pulling experience. now what exactly was your problem there? I just installed tomcat under apache on my new Linux box, and had no problems at
Orion with tomcat!!!
Hello. I know it has been mentioned in serveral times. However, I could not make Orion as EJB server work with Apache Tomcat. A servlet is placed to access ejb at tomcat's WEB-INF/classes directory, along with application-client.xml under META-INF directory. The servlet looks as follows: import java.io.IOException; import java.util.Date; import java.util.*; import java.util.Properties; import javax.naming.*; import javax.servlet.*; import javax.servlet.http.*; import javax.rmi.PortableRemoteObject; import hello.ejb.Hello; import hello.ejb.HelloHome; public class HelloServlet extends HttpServlet { // constructor public HelloServlet() { super(); trace("init"); } // A reference to the remote `Hello' object protected Hello _hello; // Initializes this servlet public void init(ServletConfig config) throws ServletException { super.init(config); trace("init"); Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory"); env.put("java.naming.provider.url", "ormi://localhost:800/hello-planet"); env.put("java.naming.security.principal", "admin"); env.put("java.naming.security.credentials", "admin"); // Get the initial JNDI context using our settings Context initial; try { initial = new InitialContext(env); } catch (Throwable exception) { throw new ServletException( "Unable to get initial JNDI context: " + exception.toString()); } // Get a reference to the Hello home interface HelloHome helloHome; try { Object objref = initial.lookup("ejb/Hello"); helloHome = (HelloHome)PortableRemoteObject.narrow(objref, HelloHome.class); } catch (Throwable exception) { throw new ServletException( "Unable to get home interface: " + exception.toString()); } // Get a reference to a Hello instance try { _hello = helloHome.create(); } catch (Throwable exception) { throw new ServletException( "Unable to create Hello instance: " + exception.toString()); } // Insanity check: Make sure we have a valid reference if (_hello == null) { throw new ServletException( "Unable to create Hello instance, create() returned null"); } } // Handles the HTTP GET request public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { trace("doGet"); ServletOutputStream out = response.getOutputStream(); response.setContentType("text/html"); // Get the answer from the bean String answer; try { answer = _hello.sayHello(); } catch (Throwable exception) { out.println("HTMLBODY bgcolor=\"#FF\""); out.println("Time stamp: " + new Date().toString()); out.println("BRHello type: " + _hello.getClass().getName()); out.println("Error calling the Hello bean"); out.println(exception.toString()); out.println("/BODY"); out.println("/HTML"); return; } out.println("HTMLBODY bgcolor=\"#FF\""); out.println("Time stamp: " + new Date().toString()); out.println("BRHello type: " + _hello.getClass().getName()); out.println("BRAnswer: " + answer); out.println("/BODY"); out.println("/HTML"); } // Displays a trace message to System.out private void trace(String methodName) { System.out.print(methodName); System.out.println("() called"); } } However, when I call this servlet from Apache, it complains as follows: javax.servlet.ServletException: Unable to get initial JNDI context: javax.naming.NamingException: Error reading application-client descriptor: Error communicating with server: Lookup error: java.net.ConnectException: Connection refused; nested exception is: java.net.ConnectException: Connection refused; nested exception is: javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused; nested exception is: java.net.ConnectException: Connection refused at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(Compiled Code) at HelloServlet.init(Compiled Code) at org.apache.tomcat.core.ServletWrapper.doInit(Compiled Code) at org.apache.tomcat.core.Handler.init(Compiled Code) at org.apache.tomcat.core.ServletWrapper.init(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at
RE: Servlet Filters
We want to use a servlet filter to intercept *all* requests that come into the web server. Is this possible? It seems to work for all files when I put the URL filter as "/" or "/*". But we're also looking to be notified when a directory resource is requested. An example of this might be a url that looks like so: "http://www.somecompany.com/test". Test is not a virtual directory nor is it a directory under our site root. We forward these directory requests to a JSP that then produces the appropriate output for this directory on the fly. Has anyone tried this? Or is there another way to filter HTTP requests in the Orion web server? Given that you seem to have worked out how to intercept /*, intercepting /test/* is a simple extension of that. Presumably you have something like this in your web.xml servlet-mapping servlet-nameWhereStuffGoesByDefault/servlet-name url-pattern/*/url-pattern /servlet-mapping So for /test/* you'd have servlet-mapping servlet-nameTestServlet/servlet-name url-pattern/test/*/url-pattern /servlet-mapping The problem is working out which order they're considered. I imagine it's probably the order they're specified, so you'd want the test one listed first in your web.xml. I'm assuming that by intercepting all requests you want everything (except test/*) to go to a particular servlet. If you just mean intercept and feed back whatever resource they asked for, then all you need is the second code snippet in your web.xml Trond.
Re: orion.jar needed for JNDI-lookup??
Stefan, Are you sure about the InitialContext class being loaded over the network? I have never heard of that before, and was not aware that JNDI supported this feature. Can you point to any documentation of the feature? I have always understood that the JNDI properties pointed to the class to be used, and that the class had to be accessible via the ClasPath. thanks, tim. Hi Ernst, there is no superclass since InitialContextFactory is an interface which is implemented by ApplicationClientInitialContextFactory directly (so every vendor provides his own InitialContextFactoryClass...) It should work like this: when the class is needed it should be loaded by the class loader over the net (this is a basic principle of JNDI: load the "driver" which is needed for current application, if not already installed on the client). To be more specific with my error: I get an error from the java.net.URLClassLoader which says he(she...?) can't find the specific class (ClassNotFoundException). Did I miss some setup somewhere ... ? Greetings, Stefan - Original Message - From: "Ernst de Haan" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 3:54 PM Subject: Re: orion.jar needed for JNDI-lookup?? Hi Stefan, we are running a Swing-application accessing via HTTP/RMI to an EJB-server. To do the JNDI-lookup class "com.evermind.server.ApplicationClientInitialContextFactory" is used as describes in the orion-doc. Do you *need* to downcast to ApplicationClientInitialContextFactory, or can you perhaps use a superclass (InitialContextFactory) ? If so, then you only need the JNDI libraries. -- Ernst
Re: multiple apps
thanks for the response. i'm more of a java programmer than a web site administrator so i'm a bit in the dark here. does that mean that i need two network cards in my machine if i want to use 2 appname-web-site.xml files? you suggest changing the host attribute from [ALL], what should i change it to? the larger picture is that we're trying to find the best way to set up orion so we can run duplicate copies of an application, one for each time a person calls us, gives us their credit card number, and says "i'd like to lease your browser based software" we want to be able to: - run multiple apps per machine, and - run an app across multiple machine where a customer puts heavy load on the system. thanks, greg. - Original Message - From: Michael Bosch To: Orion-Interest Sent: Wednesday, February 28, 2001 5:04 PM Subject: Re: multiple apps Having just gone through learning all the configuration details recently the thing that pops out in my mind is whether or not you changed the host attribute in your web-site element of the copy1-web-site.xml and copy2-web-site.xml files so that they're different? It'd make sense that one would run and the other doesn't when they're both activated if this were the case. If they're both set to [ALL] then the first one would probably override the 2nd. -Mike - Original Message - From: Greg Matthews To: Orion-Interest Sent: Tuesday, February 27, 2001 5:27 PM Subject: multiple apps Dear all, I'm having some trouble getting multiple copies of an app to run where i use different appname-web-site.xml files. Idon't have a problem where i configure all the information within server.xml and default-web-site.xml, but i want to use different web-site.xml files so that i can do clustering. Ido the following: 1. copy/paste the application within \orion\applications. e.g. \orion\applications\copy1 \orion\applications\copy2 2. create 2 web-site.xml files e.g. \orion\config\copy1-web-site.xml \orion\config\copy2-web-site.xml 3. put a reference to the web-site files in server.xml web-site path="./copy1-web-site.xml" /web-site path="./copy2-web-site.xml" / 4. put a reference to the 2 applications in server.xml application name="copy1" path="..\applications\copy1"/application name="copy2" path="..\applications\copy2"/ Questions a)I can run the copy1 app in my browser, but not copy2. b)If i comment out copy1, then for some reason i can run copy2. c)If i uncomment copy1, then copy1 starts working, and copy2 is not accessible. d)I don't get any error messages relating to not being able to access copy1 or copy2. Does anyone know what i might be doing wrong? Thanks, Greg
Clustering and Multicasting
I have installed a 3 node orion cluster(2 on windows2k and 1 on linux) and have it working just dandy, the replication seems to work and so does the loadbalancer but... I also have a bsdi box, and recently upgraded to the 4.2 version which has a JDK and JVM on which orion runs fine, but when I try to put into the cluster orion will not start and complains that it can't bind to the multicast address. any ideas why this is happening?
RE: I switch from X to Orion because:
-Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 5:42 PM To: Orion-Interest Subject: RE: I switch from X to Orion because: Just a few comments...not angry comments. :-) As a committer on an Apache project, let me just say that decisions to support JDK 1.1, on a per-project basis, are not about supporting "dead things". We have, in fact, people who _must_ use JDK 1.1 (probably more than you might think). As another example, we are a J2EE shop; but just recently we had a (big) requirement to support ISAM data. That's ancient, too, but I'll bet there's more ISAM data out there than there is relational data. Would you personally turn up your nose at supporting ISAM? Well, maybe you would. I dunno. I also use ISAM data, talk to mainframes (MVS, OS/390, VSE) and minis but we are not talking about that. We are talking about Apache neglecting important features in newer versions of the jdk which would work with all versions of the jdk. for example, instead of producing code with 200 occurences of: Class clazz=Class.forName("blabla"); these could be replaced with: Class clazz=ClassUtils.findClass("blabla"); where you could have a "central" ClassUtils with a static method called findClass which would find the class in the correct classloader (contextclassloader or primordial, etc)... The only drawback to this approach is that although the resulting code would work with any jdk, it would need jdk1.2+ to compile, but of course there are workarounds around this... So just becuase there are few jdk1.1 users out there, Apache releases code which will not work in advanced containers and require severe patching. (e.g. ever tried to use Xalan, BSF or Xerces together in JBoss, Resin, Orion?) I haven't used Struts myself, but since you mention it, I'd guess you'd have to ask Rickard himself why he decided to write his own framework. With all due respect to him, the primary reason, 9 times out of 10, that people write their own code is because as an industry we are damned terrible at re-use. There are a whole bunch of bad reasons why this is so - laziness, arrogance, reluctance to share the limelight, etc etc. Only rarely do you find that somebody wrote code because they conducted a thorough search and couldn't find anything that could even be modified. I'm personally pretty hot about this topic because there is a huge amount of wasted time due to this. Frameworks are a particularly bad offender - everybody and his brother wants to write their own framework. quoting from Webwork documentation... "Q: What is the difference between WebWork and Struts? A: Struts is probably the technique that was the most similar to WebWork. The main problem with Struts is its large API. There is quite a bit of API to learn, and it is closely tied to Servlet API. The Struts API also imposes quite a few implementation rules with regard to how things are done, leaving less room for customization. " (Large API == Bloated?) since both do the same things in concept. This industry is very pro-reuse, it's only when projects become surreal, when people start building something else. Let's get real, would you spent your time building something when there is another product which is accesible and fits your needs entirely... ? thought not... The problem here is that you can't serve god and devil at the same time. As far as bloat, well, that's in the eye of the beholder. If a product provides 100 features, but any given user only needs 25 of them, but nearly all of the features are useful to someone, it's "bloat" to almost everyone, but also useful to almost everyone. It's only bad bloat if the extra features get in your way, though, when you want to use your subset. I question whether this happens that often. But most of your comments are pretty general, so who knows exactly what you were talking about. Usually I don't mind about extra features, but take Xerces for example... it's a 800k jar file compressed, provides for just about every xml parsing scheme that currently exists, has a built-in serialization API, XML DOM, HTML DOM, you name it, it's there It is also the most popular xml parser for java right now... what's the problem? it's also the worst performant out of the xml parsers for java... So strictly my opinion, why not spend precious time trying to improve the things which are really important (speed and basic conformance) instead of trying to build a do-it-all-for-everyone parser. Then people say, "Why is java slow?" Is Apache becoming the Microsoft of the open source arena? Are Apache products perfect? No, not by a long shot. Are they as bad as you make them out to be? No, not by a long shot. Perfection cannot be attained, it can be aspired... The problem is that you can't aspire perfection without criticism. And Apache hates
RE: Accessing Orion-EJB-Server on one machine from Orion-web-serv er on another?
What should the path setting look like? I have an my-app.ear in the applications directory. In that ear I have a my-ejb.jar etc... I tried just using path="my-ejb.jar" it didn't work. I tried path="my-app/my-ejb.jar" it didn't work. In my server.xml on the remote machine my ear app is setup as follows: web-site path="./my-web-site.xml" / application name="me" path="../applications/my-app.ear" / so I also tried on the local machine: path="me/my-ejb.jar" it didn't work either. In all cases it seems as if orion just hangs during startup. I never get the Orion 1.4.5 initialized output message from my console window. I'm using Win NT and Win 2k, with JDK 1.3.01 and Hotspot Server. Any ideas? Thanks, Paul -Original Message- From: Juan Lorandi (Chile) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 10:06 AM To: Orion-Interest Subject: RE: Accessing Orion-EJB-Server on one machine from Orion-web-serv er on another? sorry about being elusive here's a (kinda) how to: in $orion\config\rmi.xml server host="the.remote.server.com" password="123" port="23791" username="admin" / then in orion-application.xml (in $orion\application-deployments\yourear\) ejb-module path="myEjbs.jar" remote="true" / that should be it JP -Original Message- From: Satish Gupta [mailto:[EMAIL PROTECTED]] Sent: Martes, 30 de Enero de 2001 14:05 To: [EMAIL PROTECTED] Subject: RE: Accessing Orion-EJB-Server on one machine from Orion-web-server on another? Thanks for your answer. But I'd appreciate it if you could please be a little more verbose in your reply. A bit of an explanation will help a newbie like me. Thanks yap, server.xml (add a RMI server ref there) JP -Original Message- From: Globetrot Communications [mailto:[EMAIL PROTECTED]] Sent: Lunes, 29 de Enero de 2001 22:18 To: Orion-Interest Subject: Accessing Orion-EJB-Server on one machine from Orion-web-server on another? What is the best way to configure two installations of Orion, on different machines, so web-server on one can access the EJB-Server on the other? Can this be done through only the configuration files? Thanks
Re: Connecting to LDAP from Orion
i've set it up, there are examples at java.sun.com for how to use jndi make sure you have your dn correct, it will save you lots of time - Original Message - From: "Franklin Kingma" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 3:38 PM Subject: Connecting to LDAP from Orion Hi all, Today I tried to connect to a LDAP server so I tried some things for a while, but no luck... Has anyone done this before? Do you know of some docs/tuts from which I can learn how to do this? thanks! franklin
RE: I switch from X to Orion because:
And let's not forget how J2EE 1.3beta3 is packaged...TomCat 3.2.1!!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Victor A. Salaman Sent: Wednesday, February 28, 2001 2:20 PM To: Orion-Interest Subject: RE: I switch from X to Orion because: Tomcat does not support EJB... the original author of the message meant Tomcat JBoss... And that integration is pure hell... Of course, you can download the already integrated version, but you'd be getting an old JBoss and an old Tomcat... The main problem with Tomcat and JBoss is also their virtue. Since everything is so modular, it also means that there are a lot of components, some of which have conflicts among eath other Among other things, JBoss is not compliant to any spec, as simple things like java:/comp/env namespace are plainly not supported by their jndi impl, cmp (jaws) support is very poor and does not really scale well to more than a couple kids playing "deploy" on 3 machines... JBoss also has many problems deploying j2ee "ear" (Enterprise Archives) ... Although Orion is small, it's self-contained and requires very little work to get everything running. flame-warning I respect the authors of JBoss as they have done a great job, but you really can't compare... it's a orange vs. apples comparison. As for Tomcat, it gives a bad name to server-java altogether... and as for Apache Server, well, what can I say, a simple "java" appserver such as Orion beats its performance by leaps... Most of the ASF is trying to stay compatible with dead things (jdk 1.1), which makes their software suffer a great deal. For example, they dislike the use of the Collections API, try to solve everyone's problems for everyone, and in the way bloat their products unnecessarily... And repeatedly "break" the rules... (How crazy is it creating threads inside the web container [Cocoon2] when the specs specifically say that it should not be done) ... An example of this is Jakarta-Struts... Sure it's great... but why then did Rickard Oberg (one of the technical leads in JBoss) create WebWork? ... Struts is just too damned bloated... same happens with most of Apache's offerings. It's rather sad, as most of those problems could easily be solved... Sometimes people on the list say things like "I can't get Cocoon to work under Orion", "I can't get XXX Apache product to work under Orion"... well now you know why :) haha ... Most of these problems are classloader issues which would break anyways, but since Tomcat has an arcane single classloader architecture, they'd never notice... /flame-warning -Original Message- From: Christian Sell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 3:01 PM To: Orion-Interest Subject: Re: I switch from X to Orion because: 2. Tomcat does not support EJB, even if it did, getting Tomcat Apache working together is sometimes a hair-pulling experience. now what exactly was your problem there? I just installed tomcat under apache on my new Linux box, and had no problems at all - just followed the instructions. And deploying an app is not more than copying the .war into the webapps directory...
Invalid manifest format I/O Exception?
When I try to invoke my application-client through: "java -jar application.jar" I get "invalid manifest format: I/O Exception? I have a META-INF/MANIFEST.MF, both inside the "application.jar" and in the working directory. The manifest file is: ___ Manifest-Version: 1.0 Created-By: Ant 1.2 Main-Class: com.cmc.ejb.member.MyClient ___ The application runs fine if I extract the jar file, though. I'd appreciate any tips on why this could be happening. Thanks Satish Gupta __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Invalid manifest format I/O Exception?
Do you add the manifest to the jar file using jar's '-m' option? tim. When I try to invoke my application-client through: "java -jar application.jar" I get "invalid manifest format: I/O Exception? I have a META-INF/MANIFEST.MF, both inside the "application.jar" and in the working directory. The manifest file is: ___ Manifest-Version: 1.0 Created-By: Ant 1.2 Main-Class: com.cmc.ejb.member.MyClient ___ The application runs fine if I extract the jar file, though. I'd appreciate any tips on why this could be happening. Thanks Satish Gupta __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
RE: I switch from X to Orion because:
On another note (am I imagining things?) or isn't JDK2 _REQUIRED_ for J2EE ? (Apache-folk: note the 2 in J2EE) That tells me that Tomcat can never effectively be part of a true J2EE server. Other than that I agree with all that Victor has said. Apache products suffer from - severe bloat, - old JDKs, - bad spec conformance, - appalling speed and - some sort of strange developer arrogance Why does everyone on the Apache project seem to think their products are 'the best' and cannot be beaten?! Sadly, 'tis not even close to true. -mike (who uses Orion, Saxon, Jdom, Epesh.com tags and OpenSymphony - not one released under the ASL and all rock) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Victor A. Salaman Sent: Thursday, March 01, 2001 9:49 AM To: Orion-Interest Subject: RE: I switch from X to Orion because: -Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 5:42 PM To: Orion-Interest Subject: RE: I switch from X to Orion because: Just a few comments...not angry comments. :-) As a committer on an Apache project, let me just say that decisions to support JDK 1.1, on a per-project basis, are not about supporting "dead things". We have, in fact, people who _must_ use JDK 1.1 (probably more than you might think). As another example, we are a J2EE shop; but just recently we had a (big) requirement to support ISAM data. That's ancient, too, but I'll bet there's more ISAM data out there than there is relational data. Would you personally turn up your nose at supporting ISAM? Well, maybe you would. I dunno. I also use ISAM data, talk to mainframes (MVS, OS/390, VSE) and minis but we are not talking about that. We are talking about Apache neglecting important features in newer versions of the jdk which would work with all versions of the jdk. for example, instead of producing code with 200 occurences of: Class clazz=Class.forName("blabla"); these could be replaced with: Class clazz=ClassUtils.findClass("blabla"); where you could have a "central" ClassUtils with a static method called findClass which would find the class in the correct classloader (contextclassloader or primordial, etc)... The only drawback to this approach is that although the resulting code would work with any jdk, it would need jdk1.2+ to compile, but of course there are workarounds around this... So just becuase there are few jdk1.1 users out there, Apache releases code which will not work in advanced containers and require severe patching. (e.g. ever tried to use Xalan, BSF or Xerces together in JBoss, Resin, Orion?) I haven't used Struts myself, but since you mention it, I'd guess you'd have to ask Rickard himself why he decided to write his own framework. With all due respect to him, the primary reason, 9 times out of 10, that people write their own code is because as an industry we are damned terrible at re-use. There are a whole bunch of bad reasons why this is so - laziness, arrogance, reluctance to share the limelight, etc etc. Only rarely do you find that somebody wrote code because they conducted a thorough search and couldn't find anything that could even be modified. I'm personally pretty hot about this topic because there is a huge amount of wasted time due to this. Frameworks are a particularly bad offender - everybody and his brother wants to write their own framework. quoting from Webwork documentation... "Q: What is the difference between WebWork and Struts? A: Struts is probably the technique that was the most similar to WebWork. The main problem with Struts is its large API. There is quite a bit of API to learn, and it is closely tied to Servlet API. The Struts API also imposes quite a few implementation rules with regard to how things are done, leaving less room for customization. " (Large API == Bloated?) since both do the same things in concept. This industry is very pro-reuse, it's only when projects become surreal, when people start building something else. Let's get real, would you spent your time building something when there is another product which is accesible and fits your needs entirely... ? thought not... The problem here is that you can't serve god and devil at the same time. As far as bloat, well, that's in the eye of the beholder. If a product provides 100 features, but any given user only needs 25 of them, but nearly all of the features are useful to someone, it's "bloat" to almost everyone, but also useful to almost everyone. It's only bad bloat if the extra features get in your way, though, when you want to use your subset. I question whether this happens that often. But most of your comments are pretty general, so who knows exactly what you were talking about. Usually I don't mind about extra features, but take
Re: mail.jar POP3
get the latest mail.jar from sun The POP3 service provider is now bundled in JavaMail 1.2. replace the mail.jar in orion with the one you downloaded. i've tried it and it works! peter - Original Message - From: "Andre Vanha" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 2:43 AM Subject: mail.jar POP3 Hello, I'm trying to add POP3 functionality to my application on orion. Unfortunately, the mail.jar that ships with orion does not include the POP3 provider. Does anyone know how I can enable the POP3 provider from Sun without replacing, or otherwise having to modify the existing mail.jar? Thanks, Andre Machines should work. People should think. -- IBM motto
Re: Orion with tomcat!!!
I know it has been mentioned in serveral times. However, I could not make Orion as EJB server work with Apache Tomcat. A servlet is placed to access ejb at tomcat's WEB-INF/classes directory, along with application-client.xml under META-INF directory. That's strange. I've built two different applications, both using Orion as an app server and Tomcat and Resin as servlet containers, both with Apache as a web server. In both application i had no ejb references in the web.xml and i have absolutely no application-client.xml. I've just built war files with the required lib, classes, jsps and servlets... few parameters into the web.xml and that's it. It looks from your stack trace that the problem is that the application cannot connect to the application server at all... I'm afraid that you're using the wrong port this unless you have changed the port number in the rmi.xml file from the default (23791) to the one you've set in the environment for the intial context (800). Best Regards, Kazuma Cos'e' il genio. E' fantasia intuizione, colpo d'occhio e velocita' d'esecuzione. (Amici Miei) --- Alessandro A. 'Kazuma' Garbagnati http://www.kazuma.net/ ICQ UIN: 1600386 Mountain View, CA, 94043 - USA
Struts (was: I switch from X to Orion because: )
This subject is especially timely for me because I just finished evaluating both WebWork and Struts. I decided to go with WebWork. It wasn't so much that I was drawn to WebWork's technological coolness - there are some neat ideas there, but I think most could be adapted into Struts with a little effort. The problem was that when I looked deeply into Struts, I didn't like what I saw. I spent a *lot* of time wavering; on one hand, Struts has a solid user community and good javadocs, on the other hand, WebWork is simpler and easier to teach future members of the team. I kept switching my favor back and forth when I discovered something new I did or didn't like. What finally pushed me over the edge was my experience hunting down the problem preventing Struts from working with Orion out of the box. Here's the story: If you've ever tried loading the Struts 1.0 example app, you are immediately confounded by missing resource errors. There is a lot of complaint in the Orion and Struts archives about this, but the closest anyone has come to nailing it down is this message: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg00582.html in which the principal author of Struts, Craig, implies that Orion's classloader has a problem preventing it from working with the standard JDK ResourceBundle. I knew there was something wrong with this because WebWork uses ResourceBundle without issue. So I looked through Struts' source to see how it might be using ResourceBundle differently, and what I discovered is that Struts doesn't use ResourceBundle at all! In fact, Struts has a whole homebrewed framework for handling properties which mirrors the ResourceBundle API but doesn't use any of its classes or interfaces. There are javadoc comments to the effect that the Struts code should be faster than ResourceBundles, but looking at the JDK 1.3 source code, both frameworks seem to be doing pretty much the same thing. For those curious, the actual problem with Orion is that Struts uses ClassLoader.getResourceAsStream() to build the Properties object, and (I checked the decompiled code) the Orion classloader does not implement getResourceAsStream(). Orion's fault, and logged as bug #340. But why re-invent the wheel?!? The JDK provides resource management for us! Even if the Struts code was slightly faster (which I doubt), any performance gain is going to be negligable compared to the amount of time spent processing taglibs, etc. I can't believe that whoever wrote the Struts MessageResources classes ever bothered to run the code through a profiler to find out where the real bottlenecks are. All this extra code and duplicated infrastructure is nothing but an opportunity for more bugs, IMHO. At this point I decided to go with WebWork. It is certainly not without issues as well, but I'm very happy with the results. And I am finding that in a framework this simple, fundamental changes are easy to make. I could elaborate on the differences between WebWork and Struts if anyone is really interested. If you're still writing JSP-centric applications, you *really* should look into an MVC framework. Jeff -Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 1:42 PM To: Orion-Interest Subject: RE: I switch from X to Orion because: Just a few comments...not angry comments. :-) As a committer on an Apache project, let me just say that decisions to support JDK 1.1, on a per-project basis, are not about supporting "dead things". We have, in fact, people who _must_ use JDK 1.1 (probably more than you might think). As another example, we are a J2EE shop; but just recently we had a (big) requirement to support ISAM data. That's ancient, too, but I'll bet there's more ISAM data out there than there is relational data. Would you personally turn up your nose at supporting ISAM? Well, maybe you would. I dunno. I haven't used Struts myself, but since you mention it, I'd guess you'd have to ask Rickard himself why he decided to write his own framework. With all due respect to him, the primary reason, 9 times out of 10, that people write their own code is because as an industry we are damned terrible at re-use. There are a whole bunch of bad reasons why this is so - laziness, arrogance, reluctance to share the limelight, etc etc. Only rarely do you find that somebody wrote code because they conducted a thorough search and couldn't find anything that could even be modified. I'm personally pretty hot about this topic because there is a huge amount of wasted time due to this. Frameworks are a particularly bad offender - everybody and his brother wants to write their own framework. As far as bloat, well, that's in the eye of the beholder. If a product provides 100 features, but any given user only needs 25 of them, but nearly all of the features are useful to someone, it's "bloat" to almost everyone, but also useful to almost everyone. It's only bad
RE: Database schema type mappings
You're thinking C++. In Java: A long is 8 bytes, always. An int is 4 bytes, always. The byte-orders are fixed independent of the hardware, too. Speaking of byte size, here's something I found amusing (and annoying): long millisInMonth = 1000 * 60 * 60 * 24 * 30; Date thirtyDaysAgo = new Date(); thirtyDaysAgo.setTime(thirtyDaysAgo.getTime() - millisInMonth); This actually produces a date in the FUTURE! It took me a while to hunt down this bug because it had really wierd effects on my application. Jeff -Original Message- From: Michael A Third [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 11:02 AM To: Orion-Interest Subject: RE: Database schema type mappings Randahl, We use the primitive long for all of our primary keys for a couple of reasons: * primary keys can't be null so there isn't a need for Long (or Integer) * long's are always 4 bytes no matter what the CPU (32bit vs 64bit), which is currently not a problem but could be when Itanium platforms come out. int's depend on the CPU's native integer type which happens to be 32bits on ix86 architectures. Michael Third Chief Software Architect parts.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Randahl Fink Isaksen Sent: Wednesday, February 28, 2001 10:02 AM To: Orion-Interest Subject: Database schema type mappings If you look at the database schema in "orion/config/database-schemas/hypersonic.xml" it looks as if it is mapping between the primitive java type "int" and the corresponding database type "int": type-mapping type="int" name="int" /. In my EJBs my primary keys and other attributes are of type Integer. Since there is no mapping for class Integer one could think that Integers would be mapped to VARBINARY. Luckily my integers are mapped to the database type "int", but this makes me ask two questions: 1. Why is Integers automatically converted to int by Orion - and is this a standard EJB convention? 2. Would it be legal to have a primary key of the primitive type "int" instead of Integer? Yours Randahl
RE: CMP 2.0
? I have all my transactional behavior defined as NotSupported and I use EJB 2.0 container managed relationships without issue. I don't currently need transactions for what I'm doing. Randahl, have you examined the contents of the database tables and the orion-ejb-jar.xml closely? Jeff -Original Message- From: Tim Drury [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 8:34 AM To: Orion-Interest Subject: RE: CMP 2.0 I've been out for a few days, so it this has been answered, sorry for the repost. This sounds like you didn't set the transactional behavior in ejb-jar.xml as "required". There is no default behavior in the spec so it is up to the container to decide what the default behavior is. I know in Weblogic, transactions default to "supports" (I think). In any event, the entities are not stored in the database unless you mark them as "required". Orion may be doing the same thing. -tim -Original Message- From: Randahl Fink Isaksen [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, February 26, 2001 5:29 AM To: Orion-Interest Subject: CMP 2.0 Would somebody please confirm that they have been able to use CMP 2.0 relationships on Orion, that they have seen them get stored in the database AND brought back into main memory correctly after a restart of the server. When I create a relationship it works fine until I restart - I simply can't make Orion restore my relationships from the keys it stores in the database. If I try the getX() / method of a cmr property it works - but after a restart it returns null. R.
RE: Database schema type mappings
From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] 1. Why is Integers automatically converted to int by Orion - and is this a standard EJB convention? Yes. All the class representations of the primitive types should work that way. 2. Would it be legal to have a primary key of the primitive type "int" instead of Integer? No. Primary keys must be Objects. This makes sense because EntityContext.getPrimaryKey() returns an Object. Jeff
referring to a jar from an ejb-jar file/directory?
I have an ejb application running under orion. I want to restructure the code so that some common code is put into a jar. The problem is that I can't figure out a way, short of putting the jar in the orion/lib directory, to make the contents of the jar available to the ejb side of the application. The EJB-2.0-pfd spec says: The ejb-jar file must also contain, either by inclusion or by reference, the class files for all the classes and interfaces that each enterprise bean class and the remote and home interfaces depend on, except J2EE and J2SE classes. (page 486) Well, what does 'reference' mean? The only hint I have found is: An ejb-jar file does not have to physically include the class files if the classes are defined in another jar file that is named in the Class-Path attribute in the Manifest file of the referencing ejb-jar file or in the transitive closure of such Class-Path references. (page 487) Well, I'm going to try creating a manifest file with a Class-Path in it, but since I'm running out of a directory, not an actual ejb-jar file, I really doubt this is going to work! Any hints would be greatly appreciated... Gary
RE: referring to a jar from an ejb-jar file/directory?
Running it out of a directory I'm not sure the MANIFEST Class-Path: will work. I know if you use a JAR, it will work that way. It's the way the OSCore library works, http://www.opensymphony.com/oscore -mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Gary Shea Sent: Thursday, March 01, 2001 4:35 PM To: Orion-Interest Subject: referring to a jar from an ejb-jar file/directory? I have an ejb application running under orion. I want to restructure the code so that some common code is put into a jar. The problem is that I can't figure out a way, short of putting the jar in the orion/lib directory, to make the contents of the jar available to the ejb side of the application. The EJB-2.0-pfd spec says: The ejb-jar file must also contain, either by inclusion or by reference, the class files for all the classes and interfaces that each enterprise bean class and the remote and home interfaces depend on, except J2EE and J2SE classes. (page 486) Well, what does 'reference' mean? The only hint I have found is: An ejb-jar file does not have to physically include the class files if the classes are defined in another jar file that is named in the Class-Path attribute in the Manifest file of the referencing ejb-jar file or in the transitive closure of such Class-Path references. (page 487) Well, I'm going to try creating a manifest file with a Class-Path in it, but since I'm running out of a directory, not an actual ejb-jar file, I really doubt this is going to work! Any hints would be greatly appreciated... Gary