RE: default.jsp bug (duplicate requests)

2002-04-01 Thread Manuel De Jesus

If I were to guess your problem is not with orion, but rather with your
settings for cache expiration in the JSP pages.

response.setDateHeader (Expires, 1); //prevents caching at the proxy

Try replacing your cache prevention section with:

%
response.setHeader(Pragma, No-cache);
response.setHeader(Cache-Control, no-cache);
response.setDateHeader(Expires, 0);
%

or try removing it totally to confirm the error and set the browser to check
for new pages on every hit at the client side.

Regards,
Manuel



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert Johnson
Sent: Monday, April 01, 2002 7:00 AM
To: Orion-Interest
Subject: default.jsp bug (duplicate requests)


I have discovered a bug with orion after enabling Content Advisor
in both IE 5.5 and 6.0.  The problem is that the default.jsp is being
executed after every request, causing a duplicate erroneous request.

I have created a simple test to duplicate the problem.  I tested 1.5.2 and
1.5.4 which both have the problem.  I also tested oc4j 1.0.2.2.1 which works
fine.  Below are the steps to reproduce the problem.

1. Create a default.jsp which contains the following lines: (The first few
lines are to prevent caching):

%
response.setHeader(Cache-Control,no-store); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader (Expires, 1); //prevents caching at the proxy
server
%
%!
static int x = 0;
%
% System.out.println(EXECUTING DEFAULT.JSP: x= + x);%
%=This is default.jsp: x= + x++%

2. Create a test.jsp which contains the following lines (The first few lines
are to prevent caching):

%
response.setHeader(Cache-Control,no-store); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader (Expires, 1); //prevents caching at the proxy
server
%
%!
static int y = 0;
%

% System.out.println(EXECUTING TEST.JSP: y= + y);%
%=This is test.jsp: y= + y++%

3. Place both files in the default-web-app folder (be sure to rename the
index.html to index1.html so the default.jsp is used).
4. Start orion and issue a request for http://localhost/test.jsp.  Below is
the output I receive:

C:\Prog\java\orion1_5_2java -jar orion.jar
Orion/1.5.2 initialized
EXECUTING TEST.JSP: y=0
EXECUTING DEFAULT.JSP: x=0   -- Duplicate request

5. Now issue a request for http://localhost/.  Below is the output I
receive:

C:\Prog\java\orion1_5_2java -jar orion.jar
Orion/1.5.2 initialized
EXECUTING TEST.JSP: y=0
EXECUTING DEFAULT.JSP: x=0
EXECUTING DEFAULT.JSP: x=1
EXECUTING DEFAULT.JSP: x=2  -- duplicate request


This is causing some problems for my site which I am about to deploy and I
have been unable to find a solution.  I will probably have to switch to an
alternate server if I cannot resolve the problem.  Any help would be
appreciated.

Thanks,
Robert Johnson






Re: Client program for simple EJB tutorial

2002-04-01 Thread Ray Harrison

Hi Ken -
Here's a sample client program.

Cheers
Ray


=
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import mypackage.MyEntityEJB;
import mypackage.MyEntityEJBHome;
import java.util.Collection;
import java.util.Iterator;

public class SampleMyEntityEJBClient 
{
  public static void main(String [] args)
  {
SampleMyEntityEJBClient sampleMyEntityEJBClient = new SampleMyEntityEJBClient();
try
{
  Hashtable env = new Hashtable();
  env.put(Context.INITIAL_CONTEXT_FACTORY,
com.evermind.server.rmi.RMIInitialContextFactory);
  env.put(Context.SECURITY_PRINCIPAL, user);
  env.put(Context.SECURITY_CREDENTIALS, password);
  env.put(Context.PROVIDER_URL, ormi://machine/application);
  
  Context ctx = new InitialContext(env);
  MyEntityEJBHome myEntityEJBHome = (MyEntityEJBHome)ctx.lookup(MyEntityEJB);
  MyEntityEJB myEntityEJB;

  // Use one of the create() methods below to create a new instance
  for (int i=1; i100; i++) {
  System.out.println(i);
  
  myEntityEJB = myEntityEJBHome.create( new Integer(i).toString() );
  }
  
}
catch(Throwable ex)
{
  ex.printStackTrace();
}

  }
}




--- Ken Cooper [EMAIL PROTECTED] wrote:

HR
htmldiv style='background-color:'DIV/DIV
DIV/DIV
PThe A href=http://www.orionserver.com/tutorials/orion-primer;The Orion 
Primer/Anbsp;uses
a servlet as a client for an EJB. Does someone have the code for a 'command line' 
client. That is,
a client that is a standard java app (public static void main...)? Have tried this but 
have had
'problems'./P
PThanks - KenBRBR-- /P
DIV/DIVKenneth Cooper, Jr. [EMAIL PROTECTED] 
DIV/DIV-- 
DIV/DIV/divbr clear=allhrSend and receive Hotmail on your mobile device: a
href='http://g.msn.com/1HM305401/14'Click Here/abr/html



__
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/




WG: Q: How can i turn the automatic reload of the config files off?

2002-04-01 Thread Jan Heise

 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hi all,

i'd like to turn of the automatic reload of the following
config files:
- - config/server.xml
- - config/application.xml

I'm using orion 1.5.2 under debian-linux and every time
i reconfigure/add webapps in one of the above files, orion
tries to reconfigure itself, fails and instead goes down.
and this in a very nasty way (i have to use kill -9 and be
quite fast to find out a proc id of one of the java
processes. otherwise the vm eats up all resources on the
machine. i used the following vm's: blackdown, ibm and sun 1.3

interestingly, this is not a problem using win2k.
orion reconfigures properly. 

I'd like to turn automatic reconfiguration off so i can edit
the config files and afterwards run my own /etc/init.d/orion restart
script.

tia, jan

- --
Jan Heise / Tel. +49-163-4803237 / [EMAIL PROTECTED] 


-BEGIN PGP SIGNATURE-
Version: PGP 7.0.4

iQA/AwUBPKh/yp/YNqVvLvLkEQIGgwCeOoorJcv0FBj4a7HgAXuAYRgVYE0AoI7h
XGKg6G7alvKvCQH5FuXkn2U+
=2nF7
-END PGP SIGNATURE-





RE: Client program for simple EJB tutorial

2002-04-01 Thread Eric Hodges

I don't think -cp and -jar can be used together like that.  Try just using
-cp and place the .jar on the classpath.


 -Original Message-
 From: John D. Ware [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, April 01, 2002 3:10 PM
 To: Orion-Interest
 Subject: Re: Client program for simple EJB tutorial
 
 
 Hi,
 This is indeed a timely question as I am working on this 
 also. I was able to get a client working until I tried to put 
 it into a jar file.
 I get a ClassNotFoundException looking for the 
 com.evermind.server.ApplicationInitialContextFactory when 
 starting my app using:
 
 java -cp c:/orion/orion.jar -jar pet-class.jar
 
 Again, it works fine (Note: no classpath specified) if run like:
 
 java org.jdware.pet.client.PetClient  
 
 any ideas?
 
 
 thanks
 
 john ware
 
 
 




Newbie Orion question - webapp problem

2002-04-01 Thread Ken Delong

I'm trying to get Orion to run a web app that's part of an ear.

I made the following changes:
IN SERVER.XML
application name=Majordomo path=C:\orion\autodeploy\Majordomo.ear
auto-start=true /

IN DEFAULT-WEB-SITE.XML
web-app application=Majordomo name=MajordomoWeb.war
root=/MajordomoWeb /

IN THE EAR'S APPLICATION.XML
module
web
web-uriMajordomoWeb.war/web-uri
context-root/MajordomoWeb/context-root
/web
/module

But when I hit http://localhost/MajordomoWeb/index, I get a 500: Internal
Server Error and I can't find any output as to what the error is in any of
the log files.  

The EJB portion of the app, which I accessed with an Application Client,
works fine.

One other clue: I'm referencing other JAR files, and using the Manifest
Class-Path attribute in the WAR file.  I tried putting the external JAR into
the /lib directory of the War, but that didn't work either.  Same error.

Any help here?

PS the EAR deploys into Sun's RI 1.3, and also into WebSphere 4.01.  It
works fine there, so it must be an Orion configuration problem.
---
Kenneth DeLong
Senior Consultant
Direct: 510-517-5839 (Cell)
Fax: 972.789.1340 

Valtech Technologies, Inc.
5080 Spectrum Drive
Suite 1010 West
Addison, Texas 75001
www.valtech.com http://www.valtech.com

transforming technology skills
into sustainable business value 






Re: Java IDE?

2002-04-01 Thread @Basebeans.com

Subject: Re: Java IDE?
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
CodeGuide v4 of Omnicore.com does the same thing and is cheaper and I 
think nicer.

(I used Netbeans as well)

VIc

Robert S. Sfeir wrote:

 (Sorry my last message got sent before I could finish it)
 
 Ok there was a lot of talk about this IDE so I decided to go poke around and
 look at it.  I had been using Netbeans (Forte too) for a while, but always
 found it to have either way too many things you can do with it, and
 therefore you have to spend a lot of time learning the IDE, or it's just
 clunky and things are not where they're supposed to be.  So I downloaded the
 IDEA IDE, and low and behold, as advertised on this list, my productivity
 has jumped 10 fold.  It is SO easy to use, it's a bit weird at first glance,
 and I actually removed it the first time then decided to try again, and wow,
 if you take just a couple of hours, you're totally familliar with its
 features and capabilities... and thank go for no weird wizards... templates
 are good... wizards are for 2 year olds.
 
 Here is why I liked it, and would GLADLY pay $395.00 for it.
 
 It allows you to setup multiple CVS repositories, working with Ant is
 amazing, when you run the ant script it allows you to expand every step and
 look at it and get more information about it.  I am able to run the full
 build of my app within the IDE and I didn't have to do anything
 funky, or mess with classpaths it just ran.  I am SO productive in this IDE
 I can't believe it.
 
 Further, it allows you to set ALL aspects of code style including spaces
 between parenthesis or brackets, line after curly bracket or not, and you
 can choose if you want it before an else, if else, etc...  so fine tuned.
 This is important because sometimes developers can get sloppy.  One mouse
 click and wham, the thing is clean and in place.
 
 besides that, you can actually write a bunch of code and then select it, and
 tell it to wrap it in an try/catch, or add a case and stuff like that.  Same
 goes for getter and setter, you just select the vars you want to write get
 and set methods for, and in a few seconds I had more than 40 gets and sets
 already setup.  This is a much better way to do it than any other ide.
 
 The nice thing is that there are a bunch of tabs on the side which don't
 intrude in your coding area unless you absolutely want to see them, and you
 can choose the behavior of the tabed window so it can close back up as soon
 as you're done, or pin it down so it's always there.  What ever works for
 you.
 
 It also includes Refactoring, and will look through your code and allow you
 to optimize your imports automatically.  Very nice stuff, but I didn't push
 that yet because I didn't have a need for it yet.
 
 I also like that it has syntax completion, but they took it to a higher
 level, when the syntax completion pops up and you select for example
 'parseInt' it shows you the java doc for it in another popup!  SO SWEET!  No
 need to go look at the API pages or anything like that!  VERY VERY COOL
 stuff.
 
 I am surprised that Forte won the JDJ award over this IDE... I guess because
 it's not free or something.  This is a much much better tool.
 
 Robert S. Sfeir
 Senior Software Architect
 Sfeir Engineering
 [EMAIL PROTECTED]
 - Original Message -
 From: Justin Crosbie [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Wednesday, March 27, 2002 12:52 AM
 Subject: RE: Java IDE?
 
 
 
I hate the way it doesn't support folder hierarchies. The new one even

 less
 
than 3.2.3, which allowed one folder level per project. I don't see why

 not,
 
it seems like such a trivial thing.

-Original Message-
From: Joydeep Kamdar [mailto:[EMAIL PROTECTED]]
Sent: 25 March 2002 16:11
To: Orion-Interest
Subject: Re: Java IDE?


Any serious users of Orion will absolutely love JDeveloper. This is as
fantastic tool and is free to use till you decide to deploy your
applications
into production. Thus you can for the first time test an enterprise class
IDE
without the every 30 day reinstall

Here's a comparison matrix of JBuilder 6 and JDeveloper 9i
http://www.oracle.com/ip/develop/ids/index.html?Jbuilder6_table.html

Check out -
http://www.sdmagazine.com/documents/s=7032/sdm0204d/0204d.htm

The chat about the price totall cracked me up. Noha - keep up the good

 work!
 

Marc Rabil wrote:


I have been following this discussion with much interest since I

 recently
 
set out to re-evaluate Java IDEs - particularly for J2EE.  Based on the
recent JDJ poll located here:

http://www.sys-con.com/java/readerschoice2002/liveupdate.cfm?cat=J2EE

it would seem that a lot of folks like JBuilder.  But this may just be a
marketshare estimate and it looks like a lot of folks on this list like
IDEA.

We've been using JBuilder 4 Enterprise with mixed feelings and are

 looking
 
at upgrading to JBuilder 6.  Can any of the IDEA proponents out there
summarize the major advantages of IDEA over JBuilder 6