RE: ANSWER: How to use pooled connections in Orion?

2000-10-07 Thread Rick Bos

I have a question.

If I only specify a location, not a pooled location, does Orion
not do any connection pooling ?

For example, if I have several container managed entity beans from
the same database, would Orion share the same connection for these ?

Thanks.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Goel, Deepak
Sent: Saturday, October 07, 2000 12:09 AM
To: Orion-Interest
Subject: ANSWER: How to use pooled connections in Orion?


Hello everyone,

I've seen that many people are confused over how to setup pooled connections
in Orion (even I was initially). Now since I figured out through
documentation and through some hit and try, I would like to share these
instructions. Keep in mind that this is only one way of setting it up and
there are other ways to setup depending on capabilities of the driver.

1. Basically, the first step is to create a non-pooled version of your data
source. This can be done by adding something like this to your
data-sources.xml:

data-source
class="com.evermind.sql.DriverManagerDataSource"
name="SQLServerNP"
location="jdbc/SQLServerNP"
xa-location="jdbc/xa/SQLServerXANP"
ejb-location="jdbc/SQLServerNP"
connection-driver="com.inet.tds.TdsDriver"
username="user"
password="pwd"
url="jdbc:inetdae:localhost"
inactivity-timeout="30"
schema="database-schemas\ms-sql.xml"
/

The above example is for a SQL Server data source using i-net driver.
Remeber to change the connection-driver, username, password and url.

2. Now, the following step will add the pooled version. Add the following
lines to data-sources.xml.

data-source
class="com.evermind.sql.OrionPooledDataSource"
name="SQLServer"
location="jdbc/SQLServerDS"
xa-location="jdbc/xa/SQLServerXADS"
ejb-location="jdbc/SQLServerDS"
max-connections="4"
source-location="jdbc/SQLServerNP"
pooled-location="jdbc/SQLServerDS"
inactivity-timeout="30"
connection-driver="com.inet.tds.TdsDriver"
url="jdbc:inetdae:localhost"
/

Note that the source-location should correspond to location in the 1st step.
"max-connections" can be changed to suit your requirements. I'm not sure
whether url and connection-driver are required here.

The above steps should work for any JDBC drivers. If your driver vendor
supplies a data source, step 1 will be little bit different. Also, some of
the driver vendors directly provide pooled data source implementation in
which case 2 steps are not needed. I could successfully use i-net OPTA
PooledDataSource with Orion.

--Deepak





RE: Client application

2000-10-07 Thread Frank Eggink

Hope I haven't made any errors in the example causing to to waiste your 
time (as i did with my typo comp:/java/env). If so let me know. I'll fix 
the example.

The error messages tell me that the system can't find the home interface. 
From the output I can't deduct what is wrong (which could be a lack of 
understanding from my side). I see two possibilities: 1) either there is a 
naming problem, or 2) resolving the class file for the home interface goes 
wrong.

Here are some things I would have a look at:

1. Check wether there is a orion-application-client.xml in the META-INF 
folder/directory on your client and whether the name you are using is in 
there. You specify the name in java:/comp/env/name. The name in the 
orion-application-client.xml file points you to the name in the 
application-client.xml (on the client) file.

2. Check that the name in the application-client.xml file corresponds 
with the name in the ejb-jar.xml file on the server.

3. When you are sure that it is all correct, I would have a look at the 
mapping for the Home (plus the Remote and EJB) classes. Check whether the 
home interfaces defined in application-client.xml and in the ejb-jar.xml 
refer to the correct class files. All though I think that if the one in 
ejb-jar.xml is wrong the server will complain when starting the 
application. Make also sure they are in the right folders/directories 
(install-root/hello/ejb).


Hope this helps,
Frank

On Friday, October 06, 2000 9:22 PM, Kurt Hoyt [SMTP:[EMAIL PROTECTED]] wrote:
 I've gotten that same error, usually the first time I run a client 
program.
 I run it again, and it works fine with no NamingException. Very strange.

 Kurt in Atlanta

 -Original Message-
 From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 06, 2000 8:27 AM
 To: Orion-Interest
 Subject: Re: Client application
 
 
 Thanks for your response Robert. You were right about the
 typo. It really
 was in my email. The path that I use is
 ;\orion\orion.jar;\orion\ejb.jar;\orion\jdbc.jar;\orion\jndi.ja
 r;\orion\mai
 l.jar;orion-primer-client.jar
 
 
 Since this email I have gotten the client to run, now I get
 the following
 error:
 
 Unable to get initial JNDI context: javax.naming.NamingException: Error
 reading application-client descriptor: No location specified
 and no suitable
 instance of the type 'hello.ejb.Hello' found for the ejb-ref
 ejb/HelloHome
 Exception in thread "main" java.lang.Exception: We're going to
 the dogs!
 at hello.client.HelloClient.main(HelloClient.java:26)
 
 - Original Message -
 From: "Robert Krueger" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Friday, October 06, 2000 4:33 PM
 Subject: Re: Client application
 
 
 At 09:48 06.10.00 , you wrote:
 Frank,
 I followed your example and deployed the orion-primer
 application. I copied
 the necessary JAR's into my directory along with the
 jndi.properties file.
 I
 also copied the orion-primer-client.jar into my directory. I
 then ran the
 following
 
 java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar
 
 hello.client.HelloClient
 
 I got the following error:
 Exception in thread "main" java.lang.NoClassDefFoundError:
 hello/client/HelloClient
 
 Any idea?
 
 it obviously doesn't find the class. a typo in the classpath maybe ;-)
 
 robert
 
 -Danno
 
 (-) Robert Kruger
 (-) SIGNAL 7 Gesellschaft fur Informationstechnologie mbH
 (-) Bruder-Knau?-Str. 79 - 64285 Darmstadt,
 (-) Tel: 06151 665401, Fax: 06151 665373
 (-) [EMAIL PROTECTED], www.signal7.de
 
 
 
 
   File: ATT3.html  




RE: Anyone using Orion/Apache w/ many virt. hosts?

2000-10-07 Thread Robert Krueger

At 08:57 04.10.00 , you wrote:

My first go at Filters I wrote the mod_expires as it was a topic on this 
list.
Im not sure how usefull it is, but if it is, I can always put it up 
somewhere.. Maybee in the Filter tutorial.
My only problem with this was to understand the need for it.

If there is a need for these mod's, please list them and lets implement 
them as Filters.
WR

Hi,

the link below has a good article for the use of mod_expires

http://www.mnot.net/cache_docs/

robert


  -Original Message-
  From: Mike Cannon-Brookes 
 [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
  Sent: den 4 oktober 2000 00:31
  To: Orion-Interest
  Subject: RE: Anyone using Orion/Apache w/ many virt. hosts?
 
 
  Bring it on! ;)
 
  Seriously, I'm interested to hear any Apache modules that
  couldn't be done
  with a simple servlet filter. I only know of the mainstream modules
  (mod_rewrite, mod_perl etc) really, but when this can of
  worms was opened
  last time noone spoke up.
 
  I'm sure the Orion team would be interested too. It's well
  worth their time
  to dupe any popular modules.
 
  Mike
 
   -Original Message-
   From: [EMAIL PROTECTED]
   
 [mailto:[EMAIL PROTECTED]mailto:owner-orion-interest@ 
 orionserver.com]On Behalf Of
  Robert Krueger
   Sent: Tuesday, October 03, 2000 10:20 PM
   To: Orion-Interest
   Subject: Re: Anyone using Orion/Apache w/ many virt. hosts?
  
  
   At 07:16 03.10.00 , you wrote:
   Mike Cannon-Brookes wrote:
   
 I run Orion with 15 virtual hosts (don't know why 50
  would be any
 different).

 Use Orion exclusively, it's really only a little leap not
   really a big one.
 There was a discussion a while back about what you needed in
   Apache, net
 result: there's nothing that can't be done in Orion ;)
  
   now, that is a very daring statement if you look at the wealth of
   existing
   apache modules. what you probably mean is "there's nothing
  that cannot be
   done with orion if you are ready to code a filter for that"
  and the I'd
   still say that you'll find things that are at least hard to do.
  
   -snip
  
  
   Mike,
   
   I know that running SSL on multiple virtual-host sites works
   well with Apache.
   However, have you tried to do the same with Orion? By that, I
   don't mean one
   SSL certificate shared by multiple hosts - I mean multiple
   certificates, each
   of which is specific to a virtual host.
   
   I've tried for a long time to get that scenario to work, yet the
   best I can do
   is to have Orion recognize and share only one certificate among
   *all* of the
   virtual-hosts. That's not particularly useful.  I'm to the point
   of placing
   just the SSL pages of all the sites on Apache, and using Orion
   only for the
   non-SSL part of the virtual-host sites.
   
   I was told by someone that this was an https limitation
  and not an Orion
   limitation, but it works on Apache, JavaWebServer, and IIS
  just fine.
  
   Are you talking name based or ip based vhosts? what magnus
  explained was
   that it was a problem with name based hosts sharing one ip
  address and
   port. for ip base hosts he gave you a solution. you're saying
   that it does
   work with name based hosts sharing ip and port with apache?
  
   robert
  
   Any suggestions or ideas?
   
   Thanks!
   
-Dale
   
  
   (-) Robert Krüger
   (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
   (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
   (-) Tel: 06151 665401, Fax: 06151 665373
   (-) [EMAIL PROTECTED], www.signal7.de
  
  
  
 
 

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





Re: Run Orion as a daemon in Linux

2000-10-07 Thread Jim Archer

When you change ownership to a normal user, do you find that Orion has 
difficulty creating the JSP cache files?

Jim

--On Friday, October 06, 2000 10:33 AM -0700 Sach Jobb [EMAIL PROTECTED] 
wrote:

 We use something very similar to this, only we change the ownership to a
 normal user.

 On Thu, 5 Oct 2000, Tony Abbott wrote:

 This is off the top of my head but something like this should work...

 #!/bin/sh

 case "$1" in
start)
   cd /usr/local/orion  (java -server -Xmx128m -jar orion.jar )
   ;;
stop)
   cd /usr/local/orion  java -jar admin.jar ormi://localhost admin
   123 -shutdown ;;
 esac


 -t




 On Thu, Oct 05, 2000 at 06:51:06PM -0400, Sean Han wrote:
  Hi, everyone:
 
  I know some of you guys use linux as the platform for running Orion
  server. Do you use the Sys V script to startup and shutdown the Orion
  server? If you do, could you please send me a copy of the script? If
  not, is there any solution to startup the Orion server when the OS
  bootup?
 
  thanks!
 
  Sean
 

 --

Tony Abbott   [EMAIL PROTECTED]











New 2 Orion.

2000-10-07 Thread Miles Daffin



Hi,

I have 2 questions for the Community:

1) I can start Orion (1.3.8) usinga batch 
file but I cannot believe that the only way to stop it is 'Ctrl - c'. Is 
it?
2) I find the instructions for creating a new 
application a little scanty - does anyone know where I can find a real idiots', 
step by tedious step, guide to setting up an alternative to the default 
application?

Thanks. 


--Miles DaffinJava Developer, 
Netherlands.

Land: +31 (0)10 476 2412Mobile: +31 (0)6 2959 
1423Permanent email: [EMAIL PROTECTED]


RE: New 2 Orion.

2000-10-07 Thread Nathan Phelps



1.) 
You can cleanly shut Orion down using the following command: java -jar admin.jar 
ormi://yourservername admin youradminpw -shutdown
Or, 
you can use the Orion console by right-clicking on the Server and choosing 
Shutdown from the Context-sensitive menu.

2.) 
See http://www.znerd.demon.nl/orion-primer/

  -Original Message-From: Miles Daffin 
  [mailto:[EMAIL PROTECTED]]Sent: Saturday, October 07, 2000 
  2:12 PMTo: Orion-InterestSubject: New 2 
  Orion.
  Hi,
  
  I have 2 questions for the 
Community:
  
  1) I can start Orion (1.3.8) usinga batch 
  file but I cannot believe that the only way to stop it is 'Ctrl - c'. Is 
  it?
  2) I find the instructions for creating a new 
  application a little scanty - does anyone know where I can find a real 
  idiots', step by tedious step, guide to setting up an alternative to the 
  default application?
  
  Thanks. 
  
  
  --Miles DaffinJava Developer, 
  Netherlands.
  
  Land: +31 (0)10 476 2412Mobile: +31 (0)6 2959 
  1423Permanent email: [EMAIL PROTECTED]


RE: ANSWER: How to use pooled connections in Orion?

2000-10-07 Thread Goel, Deepak

Hello,

I'm certainly not an expert on this area and I can only answer from my
experience. If you're not using a pooled connection, a connection is opened
for each request in CMP. If you're using BMP, it's totally upto you to
control connection handling. Even with BMP, it is advised that a datasource
defined within the container be used so that the container (Orion) can
manage connection pooling etc.

In case of CMP and a pooled datasource, the connection sharing across beans
is dependent on how you specify the datasource in orion-ejb-jar.xml. Say for
both beans A and B, you specify jdbc/SQLServerDS as the datasource, then
Orion will only use connections available from the pool of connections for
jdbc/SQLServerDS.

I request the Orion team to correct me if any of this is not correct.

--Deepak

-Original Message-
From: Rick Bos [mailto:[EMAIL PROTECTED]]
Sent: Saturday, October 07, 2000 5:38 AM
To: Orion-Interest
Subject: RE: ANSWER: How to use pooled connections in Orion?


I have a question.

If I only specify a location, not a pooled location, does Orion
not do any connection pooling ?

For example, if I have several container managed entity beans from
the same database, would Orion share the same connection for these ?

Thanks.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Goel, Deepak
Sent: Saturday, October 07, 2000 12:09 AM
To: Orion-Interest
Subject: ANSWER: How to use pooled connections in Orion?


Hello everyone,

I've seen that many people are confused over how to setup pooled connections
in Orion (even I was initially). Now since I figured out through
documentation and through some hit and try, I would like to share these
instructions. Keep in mind that this is only one way of setting it up and
there are other ways to setup depending on capabilities of the driver.

1. Basically, the first step is to create a non-pooled version of your data
source. This can be done by adding something like this to your
data-sources.xml:

data-source
class="com.evermind.sql.DriverManagerDataSource"
name="SQLServerNP"
location="jdbc/SQLServerNP"
xa-location="jdbc/xa/SQLServerXANP"
ejb-location="jdbc/SQLServerNP"
connection-driver="com.inet.tds.TdsDriver"
username="user"
password="pwd"
url="jdbc:inetdae:localhost"
inactivity-timeout="30"
schema="database-schemas\ms-sql.xml"
/

The above example is for a SQL Server data source using i-net driver.
Remeber to change the connection-driver, username, password and url.

2. Now, the following step will add the pooled version. Add the following
lines to data-sources.xml.

data-source
class="com.evermind.sql.OrionPooledDataSource"
name="SQLServer"
location="jdbc/SQLServerDS"
xa-location="jdbc/xa/SQLServerXADS"
ejb-location="jdbc/SQLServerDS"
max-connections="4"
source-location="jdbc/SQLServerNP"
pooled-location="jdbc/SQLServerDS"
inactivity-timeout="30"
connection-driver="com.inet.tds.TdsDriver"
url="jdbc:inetdae:localhost"
/

Note that the source-location should correspond to location in the 1st step.
"max-connections" can be changed to suit your requirements. I'm not sure
whether url and connection-driver are required here.

The above steps should work for any JDBC drivers. If your driver vendor
supplies a data source, step 1 will be little bit different. Also, some of
the driver vendors directly provide pooled data source implementation in
which case 2 steps are not needed. I could successfully use i-net OPTA
PooledDataSource with Orion.

--Deepak





getting EJB home from JSP

2000-10-07 Thread Jitendra Kothari
Title: 



Hi,
I am deploying ejbs, and jsps using a source-directory method 
with development set to "true"( instead of packages classes into ears or wars). 
When i try to get a handle from JNDI for EJB home class within my jsp i am 
getting following error:
java.lang.ClassCastExceptionat 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)at 
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
This isbecause Orionis returning some wrapper class 
instead of thehome.(CategoryManagerHome_StatelessSessionHomeWrapper3).
The same code works fine if i call from a standalone java test 
client, in which case Orion returns some _proxy3 class which 
gets casted to the proper class.
Would appreciate any help and insights on this 
problem.
Thanks Much,
Krishnan