RE: configuration of web tier (JNDI)

2001-06-08 Thread Harley Rana

Hi Denis, I'm not sure why you are using tomcat, the example I made was
using orion.
If you want to change the page that process the form on LoginPage.jsp just
change the url in the action setting of the form.
Are you getting any errors? Is so what are the details?







RE: configuration of web tier (JNDI)

2001-05-31 Thread Harley Rana

Hi site.zip has the source and if you just replace the old LoginWeb.war file
with the new one it should work.

Now there's the login page that sends the form to LoginResultPage.jsp, which
calls LoginWebBean that then calls the EJB.
The servlet is still there. All you need to call the servlet is change the
action in the form tag of the LoginPage.jsp.
I generally like using jsp with web beans instead of servlets because you
get a clearer separation of logic and display.

The answer to your question is on line 26 of LoginWebBean and 29 in the
servlet.  It sets the URL for the InitalContext to search, you could change
the URL to any computer that's hosting Orion.
If you look in the server.xml the line; 
It binds the application to the name LoginEJB, that's why the URL in the
InitalContext is ormi://localhost/LoginEJB.  It's computer address and the
application on it.
I called System.setProperty () to set the properties, but you really should
use Property file instead.

I hope that clears the problem!  Let me know.
Harley.


 Site.zip
 LoginWeb.war


RE: configuration of web tier (JNDI)

2001-05-31 Thread Denis Kranjcec

Thanks a lot for your example :-)

But something is wrong with your example :-(
This is output from Orion console:

getting reference...
Got reference
LoginBean EJBHome
class LoginHome_StatelessSes
ERROR processing request!
java.lang.ClassCastException

This is html:







Could you also send source?

How can I explicitly specify server and application where my EJB's are?
If I have same ejb in different application I must specify tha application.

Thanks again :-)

Denis Kranjcec


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Harley Rana
Sent: Friday, June 01, 2001 2:59 AM
To: Orion-Interest
Subject: RE: configuration of web tier (JNDI)


Forgot the files!!

Hey I've put together an example for you with a EJB that returns a Boolean
to a servlet if the user name and pass are "admin" "pass".
The changes that I made to the config files are;

in server.xml ;



in application.xml;


in default-web-site.xml;


Then just put the 3 files in the application directory, and change the
password in the servlet.
It should work, let me know how it goes.
Harley.






RE: configuration of web tier (JNDI)

2001-05-31 Thread Harley Rana

Forgot the files!!

Hey I've put together an example for you with a EJB that returns a Boolean
to a servlet if the user name and pass are "admin" "pass".
The changes that I made to the config files are;

in server.xml ;



in application.xml;


in default-web-site.xml;


Then just put the 3 files in the application directory, and change the
password in the servlet.
It should work, let me know how it goes.
Harley.


 files.zip


RE: configuration of web tier (JNDI)

2001-05-31 Thread Harley Rana

Hey I've put together an example for you with a EJB that returns a Boolean
to a servlet if the user name and pass are "admin" "pass".
The changes that I made to the config files are;

in server.xml ;



in application.xml;


in default-web-site.xml;


Then just put the 3 files in the application directory, and change the
password in the servlet.
It should work, let me know how it goes.
Harley.





RE: configuration of web tier (JNDI)

2001-05-29 Thread Denis Kranjcec

Thanks for answer!

But I still don't know could I put JNDI properties in web.xml?
Could you give me some example?
That would be great. 
Thanks.

Denis Kranjcec

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Harley Rana
Sent: Wednesday, May 30, 2001 2:05 AM
To: Orion-Interest
Subject: RE: configuration of web tier (JNDI)


Hey Denis, its not to hard.
You would package both the seperate tiers files into seperate .ear files,
then in a servlet you would access a ejb by creating a properties file with
your JNDI settings and setting the url to the machine hosting the ejb tier
( for now would be localhost, but could be anything ), create the
InitalContext with the properties, and you can then access the bean on the
ejb tier from the web tier.
Its all about setting the IntialContex with the url of the right machine.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Denis Kranjcec
Sent: Monday, May 28, 2001 7:14 AM
To: Orion-Interest
Subject: configuration of web tier (JNDI)


Hi everyone!

I'm new user of Orion and I have one problem.

I want to separate web tier and ejb tier. Both tiers will be running in the
same server for now, but later they will be on different Orion servers.
How can I specify that my web tier make jndi lookup to ejb tier, where is
JNDI server...?
We have two applications and  both have Login bean so I must be able to
specify application where my web tier should make lookup.

Configuration should be same as that tiers are on different servers.

I have read Orion documentation, but there isn't examples, and I'm not able
to figure it out how to configure it.

Thanks in advance,
Denis Kranjcec









RE: configuration of web tier (JNDI)

2001-05-29 Thread Harley Rana

Hey Denis, its not to hard.
You would package both the seperate tiers files into seperate .ear files,
then in a servlet you would access a ejb by creating a properties file with
your JNDI settings and setting the url to the machine hosting the ejb tier
( for now would be localhost, but could be anything ), create the
InitalContext with the properties, and you can then access the bean on the
ejb tier from the web tier.
Its all about setting the IntialContex with the url of the right machine.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Denis Kranjcec
Sent: Monday, May 28, 2001 7:14 AM
To: Orion-Interest
Subject: configuration of web tier (JNDI)


Hi everyone!

I'm new user of Orion and I have one problem.

I want to separate web tier and ejb tier. Both tiers will be running in the
same server for now, but later they will be on different Orion servers.
How can I specify that my web tier make jndi lookup to ejb tier, where is
JNDI server...?
We have two applications and  both have Login bean so I must be able to
specify application where my web tier should make lookup.

Configuration should be same as that tiers are on different servers.

I have read Orion documentation, but there isn't examples, and I'm not able
to figure it out how to configure it.

Thanks in advance,
Denis Kranjcec