RMI-HTTP(s)-Tunneling done. FYI!

2002-02-06 Thread Lachezar Dobrev

  Hi.
  Lately I sent an email describing my problems with the rmi-http-tunneling.
  Many of you may have stumbled upon these problems.
  Well... I was able to run it, even over HTTPS!

  Problem description:
   The rmi-http-tunnel servlet bundled with Orion 1.5.2 (maybe other
versions also) does not flush the response buffers, after sending the
required response headers to the client. That results in a deadlock:
   1. The client sends the request to the server.
   2. The servers sets the required headers for the reply, so that the
client understands, that this IS really a tunnel servlet. These are
tunnel-type: normal and dummy: normal headers.
   3. THE SERVLET SHOULD FLUSH ITS BUFFERS, so that the client receives the
affirmative response for tunneling services. This is not done by the bundled
servlet.
   4. The client waits to hear the headers, that are required by it (those
mentioned in 2). However the servlet has not flushed, and the client waits
forever. It will not send the real rmi request, and the server will also not
do anything.

   This results in a deadlock. The client waits for the headers in the
response, the server waits for further request.

   Solution: Write your own tunneling servlet. If you want to deploy it with
a name differnet than rmi, then you should supply the
http.tunnel.path=/servlet/your_servlet_name property in the
jndi.properties, ot the environment properties.

   P.S. I'm not sure, if orion-boys will soon fix this. I'm also not sending
my servlet, for obvious reasons.

   Lachezar





FW: [Ofbiz-devel] App Server Performance

2002-02-06 Thread Mike Cannon-Brookes

See below for an interesting test one of the OFBiz guys did using their
framework in different servers.

Good to see Orion smoked 'em! ;)
(Yes, I'll give up a half second for my $1500/server vs ~$10k/cpu for WL!)

Cheers,
Mike

Mike Cannon-Brookes
[EMAIL PROTECTED]

Atlassian :: www.atlassian.com
Supporting YOUR world


-- Forwarded Message
From: David E. Jones [EMAIL PROTECTED]
Organization: Open For Business
Reply-To: [EMAIL PROTECTED]
Date: Wed, 6 Feb 2002 03:11:43 -0700
To: [EMAIL PROTECTED]
Subject: [Ofbiz-devel] App Server Performance


As many of you know we have been working on making sure that OFBiz runs on a
number of different J2EE app servers. We have also been putting together
directories for each server with instructions and the files needed to get it
going.

We have it running on a few different ones now, and I've noticed that
performance varies a LOT between different app servers. So, I grabbed JMeter
and did some little tests.

These results are average response times with 6 simultaneous hits on the
server that repeat as soon as a response it received, the default little
JMeter behavior. The page hit was ecommerce/control/main which has
categories 
on the side and two products in the promos category. Note that most of the
servers could do a .25 to .3 second response for this page with one hit at a
time (except Tomcat, which is higher).

Weblogic: 0.8 seconds avg
Orion: 1.44 seconds avg
Resin: 1.6 seconds avg
Tomcat: 6.0 seconds avg

As you can see Tomcat doesn't do very well under the load. Single page hits
come in anywhere from .15s to 1.5s, so performance is all over the chard,
but 
the average for Tomcat seems to be about 1s. So, it doesn't do so well for
single hits either.

Why the performance difference? My guess is that there are resource handling
differences, taglib container differences, etc. It would seem like most of
the code is in OFBiz anyway, so there shouldn't be much difference. But,
different containers do things VERY differently, evidently.

One thing to note about Weblogic is that they have a native performance pack
for Linux which was being used for this test, which seems to give them a bit
of an advantage (if only it weren't so expensive).

Another thing found in recent timing excercises is that OFBiz is pretty slow
for a lot of things, especially in certain parts of ecommerce where tons of
information is being thrown around. We are doing some profiling and little
improvements here and there to speed things up, and it would be great to
have 
help with that. It's a great way to get to know the OFBiz internals. One
tool 
I have just started to try is Sitraka's JProbe, which gets some nice info.
They have a free demo download available (only 7 days though...).

Later,
-David Jones

___
Ofbiz-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/ofbiz-devel

-- End of Forwarded Message





What about session-tracking?

2002-02-06 Thread José Mª García



Hi,

 We have an application and we 
have problems with the sessions. Sometimes we lost the values of session 
variables. 

 In Orion documentation we look 
some information about the session tracking. But there are a few 
information.

Do you have more 
information about the sessionwith Orion? How does Orion manager the 
session?

 Thanks,




Auto-reply: RMI-HTTP(s)-Tunneling done. FYI!

2002-02-06 Thread ORAPOST





Hi,

Please note that as 
of the 8th February my email address has changed from [EMAIL PROTECTED] to [EMAIL PROTECTED].

Could youplease update your address book, and direct any 
email to my new address.


Cheers,

Lee

BEGIN:VCARD
VERSION:2.1
N:Smith;Lee
FN:Lee Smith
ORG:Oracle Corporation Ltd.;Oracle Energy Downstream
TITLE:Associate Software Engineer
NOTE;ENCODING=QUOTED-PRINTABLE:		
TEL;WORK;VOICE:+44 (0) 1442 437774
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;Hemel Hempstead;Breakspear Park=0D=0ABreakspear Way;Hemel Hempstead;Herts;H=
P2 4UL;United Kingdom
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Hemel Hempstead=0D=0ABreakspear Park=0D=0ABreakspear Way=0D=0AHemel Hempstea=
d, Herts HP2 4UL=0D=0AUnited Kingdom
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010417T080725Z
END:VCARD

---BeginMessage---

  Hi.
  Lately I sent an email describing my problems with the rmi-http-tunneling.
  Many of you may have stumbled upon these problems.
  Well... I was able to run it, even over HTTPS!

  Problem description:
   The rmi-http-tunnel servlet bundled with Orion 1.5.2 (maybe other
versions also) does not flush the response buffers, after sending the
required response headers to the client. That results in a deadlock:
   1. The client sends the request to the server.
   2. The servers sets the required headers for the reply, so that the
client understands, that this IS really a tunnel servlet. These are
tunnel-type: normal and dummy: normal headers.
   3. THE SERVLET SHOULD FLUSH ITS BUFFERS, so that the client receives the
affirmative response for tunneling services. This is not done by the bundled
servlet.
   4. The client waits to hear the headers, that are required by it (those
mentioned in 2). However the servlet has not flushed, and the client waits
forever. It will not send the real rmi request, and the server will also not
do anything.

   This results in a deadlock. The client waits for the headers in the
response, the server waits for further request.

   Solution: Write your own tunneling servlet. If you want to deploy it with
a name differnet than rmi, then you should supply the
http.tunnel.path=/servlet/your_servlet_name property in the
jndi.properties, ot the environment properties.

   P.S. I'm not sure, if orion-boys will soon fix this. I'm also not sending
my servlet, for obvious reasons.

   Lachezar



---End Message---


RE: What about session-tracking?

2002-02-06 Thread Smith Jason



RU 
losing the session variables when hopping over to HTTPS?

If so, 
you need to set your web app to "shared"...

share=true maybe?

/Jason

  -Original Message-From: José Mª García 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 
  06, 2002 1:51 PMTo: Orion-InterestSubject: What about 
  session-tracking?
  Hi,
  
   We have an application and we 
  have problems with the sessions. Sometimes we lost the values of session 
  variables. 
  
   In Orion documentation we look 
  some information about the session tracking. But there are a few 
  information.
  
  Do you have more 
  information about the sessionwith Orion? How does Orion manager the 
  session?
  
   Thanks,
  
  


re: apache + orion

2002-02-06 Thread Daniel Lopez

Hi,

Yes it is. But you have to play with mod_rewrite as mod_proxy just allows you 
to redirect directories. Combining both modules you can select certaing types 
of files, but be careful as mod_rewite is somtimes tricky.
D.

 Hello,
 
 I recently started up Orion on 127.0.0.1:8090 with apache serving up the
 front end. I have the proxy service working great, but I would like to get
 Orion to answer all .jsp request similar to how I have php setup.
 
 Is this possible?
 
 Thanks in advance.
 
 Justen Stepka
 
 


--
This message was sent using Sake Mail, a web-based email tool from
Endymion Corporation.  http://www.endymion.com/products/sake


Hello,

I recently started up Orion on 127.0.0.1:8090 with apache serving up the
front end. I have the proxy service working great, but I would like to get
Orion to answer all .jsp request similar to how I have php setup.

Is this possible?

Thanks in advance.

Justen Stepka






Username and Password

2002-02-06 Thread Christian, Joanne

HI All,

I'm new to J2EE and Orion. I have set up form-based authorization using
DataSourceUserManager. Super!

From my initial jsp and/or servlet (not the login page), I would like to
access the username of the person who just logged in.

How can I do this?  I have tried to get attributes from the ServletContext
an the session. I have also tried various other things I'd rather not
mention . . .

So:
How can I access the values of j_username and j_password once the user has
been logged in?  

Also, where and what is j_security_check?  


Thanks,

Joanne




When to use OrionCMTDataSource?

2002-02-06 Thread sana
Hi,

What kind of EJB needs to use OrionCMTDataSource
(or ejb-location of DriverManagerDataSource)?
CMT EJB only?

Thanks,
sana


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/


RE: Username and Password

2002-02-06 Thread Tom Gallaway

Would you please take me off your email list.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Christian,
Joanne
Sent: Wednesday, February 06, 2002 9:30 AM
To: Orion-Interest
Subject: Username and Password

HI All,

I'm new to J2EE and Orion. I have set up form-based authorization using
DataSourceUserManager. Super!

From my initial jsp and/or servlet (not the login page), I would like to
access the username of the person who just logged in.

How can I do this?  I have tried to get attributes from the
ServletContext
an the session. I have also tried various other things I'd rather not
mention . . .

So:
How can I access the values of j_username and j_password once the user
has
been logged in?  

Also, where and what is j_security_check?  


Thanks,

Joanne






Message status - undeliverable

2002-02-06 Thread Mailer-Daemon

The message that you sent was undeliverable to the following:
ggounden


Information about your message:
Subject: re: apache + orion



RE: Username and Password

2002-02-06 Thread Aaron Tavistock

Most of this material is not specific to Orion but defined in the J2EE
specs.  Part of the process is that j_username, etc are effectively 'special
values' recognized by the app server when doing authentication, so you
really won't ever have access to these values.

But since it is defined in the spec there are very simple and standardized
ways of getting some information.  request.getRemoteUser() will tell you the
username of the current login, and request.isUserInRole(somegroup) will tell
you if the user is in a particullar role.  I don't belive there is any
standard way to find their password though (and you probably wouldn't want
there to be if you were security minded).

-Original Message-
From: Christian, Joanne [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 9:30 AM
To: Orion-Interest
Subject: Username and Password


HI All,

I'm new to J2EE and Orion. I have set up form-based authorization using
DataSourceUserManager. Super!

From my initial jsp and/or servlet (not the login page), I would like to
access the username of the person who just logged in.

How can I do this?  I have tried to get attributes from the ServletContext
an the session. I have also tried various other things I'd rather not
mention . . .

So:
How can I access the values of j_username and j_password once the user has
been logged in?  

Also, where and what is j_security_check?  


Thanks,

Joanne




RE: Username and Password

2002-02-06 Thread Jeff Schnitzer

HttpServletRequest.getUserPrincipal().getName() should do the trick.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Christian, Joanne [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 06, 2002 9:30 AM
 To: Orion-Interest
 Subject: Username and Password
 
 HI All,
 
 I'm new to J2EE and Orion. I have set up form-based authorization
using
 DataSourceUserManager. Super!
 
 From my initial jsp and/or servlet (not the login page), I would like
to
 access the username of the person who just logged in.
 
 How can I do this?  I have tried to get attributes from the
ServletContext
 an the session. I have also tried various other things I'd rather not
 mention . . .
 
 So:
 How can I access the values of j_username and j_password once the user
has
 been logged in?
 
 Also, where and what is j_security_check?
 
 
 Thanks,
 
 Joanne





RE: Username and Password

2002-02-06 Thread Marc Rabil

You can get the user name for the request like this:

request.getRemoteUser()

I think, by design, you are not able to get the password from the container.
You can however, use the request.isUserInRole() method to see what role they
are in.  Otherwise, you'll need to access your DB for the password.

Marc

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Christian,
Joanne
Sent: Wednesday, February 06, 2002 12:30 PM
To: Orion-Interest
Subject: Username and Password


HI All,

I'm new to J2EE and Orion. I have set up form-based authorization using
DataSourceUserManager. Super!

From my initial jsp and/or servlet (not the login page), I would like to
access the username of the person who just logged in.

How can I do this?  I have tried to get attributes from the ServletContext
an the session. I have also tried various other things I'd rather not
mention . . .

So:
How can I access the values of j_username and j_password once the user has
been logged in?

Also, where and what is j_security_check?


Thanks,

Joanne





Re: When to use OrionCMTDataSource?

2002-02-06 Thread Nevin Ng
Take a look at 

http://kb.atlassian.com/content/orion/docs/datasource-configuration/datasource-configuration.html

It has some detail explaination of your question. ;-)

Regards,
Nevin

- Original Message - 
From: "sana" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 2:22 AM
Subject: When to use OrionCMTDataSource?


| Hi,
| 
| What kind of EJB needs to use OrionCMTDataSource
| (or ejb-location of DriverManagerDataSource)?
| CMT EJB only?
| 
| Thanks,
| sana
| 
| 
| __
| Do You Yahoo!?
| Yahoo! BB is Broadband by Yahoo!
| http://bb.yahoo.co.jp/
| 
| 


RE: Username and Password

2002-02-06 Thread The elephantwalker

Dear Joanne,

String username = request.getRemoteUser();

That does the trick for me.

As far as the password, this is what I do.

Protect a servlet or jsp(lets say /login) where you want to get the vital
information from within your web.xml. Since you have already used form-based
authorization...you know how to do this.

Lets say the servlet is /login, from within the post (because all processing
of form-based stuff is post) processing, you can do this:

 String username = request.getRemoteUser();
 String password = request.getParameter(j_password);

And then you can do stuff with this (for example, encrypt the password and
username, and create some authorization cookies).

After you do stuff, you can forward to other protected resources.

This is all assuming you already have a user.

If you want to programatically create a user, you use the roleManager
interface to do this (by using roleManager, you can change your usermanager
later without having to change any code).

RoleManager manager = (RoleManager)new
InitialContext().lookup(java:comp/RoleManager);

Principal principal = manager.createPrincipal(username,password,)

you can also add principals to various roles with

manager.addToRole(principal,role);

or remove from role

manager.removeFromRole(principal,role);

You can even programatically log somebody in...

manager.login(username,password);

or even remove the user

manager.remove(principal);

Its really quite flexible. A little like JAAS, but easier to use.

Regards,

the elephantwalker
www.elephantwalker.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Christian,
Joanne
Sent: Wednesday, February 06, 2002 9:30 AM
To: Orion-Interest
Subject: Username and Password


HI All,

I'm new to J2EE and Orion. I have set up form-based authorization using
DataSourceUserManager. Super!

From my initial jsp and/or servlet (not the login page), I would like to
access the username of the person who just logged in.

How can I do this?  I have tried to get attributes from the ServletContext
an the session. I have also tried various other things I'd rather not
mention . . .

So:
How can I access the values of j_username and j_password once the user has
been logged in?

Also, where and what is j_security_check?


Thanks,

Joanne





classpath issues??

2002-02-06 Thread Dan Ascheman

Ok, I've created an application (.ear file) which has successfully been 
deployed, BUT my servlet in my .war file blows up on a runtime exception 
because it can't find it's base class, or helper classes.
I have a .jar file called allsrc.jar that contains all classes in my 
system, and that resides in my .ear file - I thought that would be enough 
for my servlet to see it, but it's not.  I tried putting the allsrc.jar in 
my d:\orion directory and it didn't work, and I tried referencing it in my 
classpath upon startup like this:
java -cp=d:/orion/fwrk/allsrc.jar -jar orion.jar

Nothing seems to work!!  The only way I can get my servlet to successfully 
run is to unjar all of my classes into my web-inf/classes directory, and I 
don't want to do that.

So, where do I put my allsrc.jar so my servlet can find the classes it needs 
to run??

thanks,
Dan


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com





Re: classpath issues??

2002-02-06 Thread Jacky Cheung

You can put allsrc.jar under WEB-INF/lib of your webapp. Or you can put the
jar in ear and add an entry Class-Path: allsrc.jar in the manifest file of
the ear.

Best regards,
Jacky

- Original Message -
From: Dan Ascheman [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 10:24 AM
Subject: classpath issues??


 Ok, I've created an application (.ear file) which has successfully been
 deployed, BUT my servlet in my .war file blows up on a runtime exception
 because it can't find it's base class, or helper classes.
 I have a .jar file called allsrc.jar that contains all classes in my
 system, and that resides in my .ear file - I thought that would be enough
 for my servlet to see it, but it's not.  I tried putting the allsrc.jar
in
 my d:\orion directory and it didn't work, and I tried referencing it in
my
 classpath upon startup like this:
 java -cp=d:/orion/fwrk/allsrc.jar -jar orion.jar

 Nothing seems to work!!  The only way I can get my servlet to successfully
 run is to unjar all of my classes into my web-inf/classes directory, and I
 don't want to do that.

 So, where do I put my allsrc.jar so my servlet can find the classes it
needs
 to run??

 thanks,
 Dan


 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com








[announce] Log4J Appender for Orion's application.log

2002-02-06 Thread Geoff Soutter

Hi there,

I've hacked up an Orion Appender to allow you to log to the
application.log file, via the Logger instance that Orion installs at
java:comp/Logger. Here it is in all it's glory, use it however you wish.

Cheers

Geoff

PS, did anyone figure out if it's possible to get orion to roll it's log
files when they get too big? ;-)

import com.evermind.util.LogEvent;
import com.evermind.util.Logger;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Layout;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.spi.ErrorCode;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.ThrowableInformation;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

/*
Example Test Code

Deploy OrionAppender with log4j in the Orion lib directory,
then add this code to an EJB or JSP and execute it.

Note it doesn't seem to be able to find a Logger instance when
running
in an application client, so in this case use a normal log4j
Appender.

Category log = Category.getInstance(for.bar.Category);
BasicConfigurator.resetConfiguration(); // for jsp reloading
BasicConfigurator.configure(new OrionAppender());
log.info(A test INFO message);
NDC.push(demo-ndc);
log.warn(A test WARN message with NDC);
NDC.pop();
log.fatal(A test FATAL message with exception, new
Exception(fatal));
*/

public class OrionAppender extends AppenderSkeleton {

// NOTE: Most simple layouts are not useful for this Appender
because
// the design of log4j is such that Layouts are responsible for
adding
// line endings, and we require that the Layout not add line
endings.
// This is IMHO a design flaw in log4j...

// NOTE: Orion includes a 2/5/02 5:46 PM format date in each log
entry.
// NOTE: Orion doesn't generate unique names for each thread, so the
thread
// name pattern entry is not much use.

// NOTE: Using a hardcoded layout now, can make this configurable
later.
// Basically it's priority category [ndc]: message
private static final Layout sLayout = new PatternLayout(
%-5p %c{1} [%x]: %m);

private Logger iLogger;

public OrionAppender() {
try {
Context lContext = new InitialContext();
Object lBoundObject = lContext.lookup(java:comp/Logger);
iLogger = (Logger) PortableRemoteObject.narrow(lBoundObject,
Logger.class);
} catch (Exception e) {
errorHandler.error(Error finding Orion Logger for appender
[ +
name + ]., e, ErrorCode.GENERIC_FAILURE);
}
}

public boolean requiresLayout() {
// Tell the configurator we have our own hardcoded layout.
// See PropertyConfigurator for how this method is used.
return false;
}

protected void append(LoggingEvent event) {
if (iLogger == null) {
errorHandler.error(No Logger for appender [ + name +
].);
return;
}
try {
LogEvent lEvent = null;
String lMessage = sLayout.format(event);
ThrowableInformation lInfo =
event.getThrowableInformation();
if (lInfo == null) {
lEvent = new LogEvent(lMessage);
} else {
lEvent = new LogEvent(lMessage, lInfo.getThrowable());
}
iLogger.log(lEvent);
} catch (Exception lEx) {
errorHandler.error(Could not log message in appender [ +
name
+ ]., lEx, ErrorCode.GENERIC_FAILURE);
}
}

public synchronized void close() {
iLogger = null;
}
}





Re: When to use OrionCMTDataSource?

2002-02-06 Thread sana
Hi,

 http://kb.atlassian.com/content/orion/docs/
 datasource-configuration/datasource-configuration.html

Some excerpts from this documentation:

| Even if using a real JDBC 2.0 DataSource, Orion wrappers 
| should be used if these DataSource are to be used 
| for EJBs utilizing CMT (Container Managed Transactions). 

.

| Configuring a vendor XA DataSource for CMT usage
|
| In order to use a vendor implementation of a XA DataSource 
| for EJB CMT usage, the DataSource has to be wrapped 
| by the OrionCMTDataSource class in order for Orion 
| to add support for distributed transactions and pooling 
| as necessary. 

.

| Configuring a DataSource emulation for CMT usage
|
| In order to use EJB CMT a OrionCMTDataSource needs 
| to be used to add support for distributed transactions 
| and pooling as necessary. 


 | What kind of EJB needs to use OrionCMTDataSource
 | (or ejb-location of DriverManagerDataSource)?
 | CMT EJB only?

Only CMT EJB needs to use OrionCMTDataSource.
BMT EJB can use com.evermind.sql.OrionPooledDataSource

Is it correct?

Regards,
sana


Nevin Ng wrote:
 
 Take a look at
 

http://kb.atlassian.com/content/orion/docs/datasource-configuration/datasource-configuration.html
 
 It has some detail explaination of your question. ;-)
 
 Regards,
 Nevin


 - Original Message -
 From: "sana" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Thursday, February 07, 2002 2:22 AM
 Subject: When to use OrionCMTDataSource?
 
| Hi,
|
| What kind of EJB needs to use OrionCMTDataSource
| (or ejb-location of DriverManagerDataSource)?
| CMT EJB only?
|
| Thanks,
| sana


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/