Access EJB's from a standalone client.

2000-12-21 Thread Martin Andersson

I'm having problem trying to access EJB's from a standalone client. I have
no problem using these beans from a JSP-page within Orion but trying to
access them from outside Orion doesn't work.
Please let me know how to make this happen.
I'm currently using version 1.3.8.

Merry Christmas :)

/M Andersson





RE: compound key

2000-12-21 Thread Tim Squires

Ooops,  Thanks Stanislas.

Don't for get the hashCode and equals methods in the primary key
classes

-Original Message-
From: Stanislas Truffaut
Sent: 20 December 2000 17:11
To: Tim Squires
Subject: RE: compound key


Hi,

be carefull a PK class as said in ejb specification must implement
hashCode() and equals() method






From: Tim Squires
Subject: RE: compound key
Date: Wed, 20 Dec 2000 04:21:46 -0800




What you need to do is create a primary key class with the primary keys in
it:



public class answerPK implements java.io.Serializable
{

  public Integer Id;
  public Integer Answer_Type_Id;
  /**
   * Constructor
   */
  public answerPK( Integer Id, Integer Answer_Type_Id )
  {
this.Id = Id;
this.Answer_Type_Id = Answer_Type_Id;
  }

  public answerPK() {}

  public Integer getId() throws java.rmi.RemoteException
  {
return Id;
  }

  public void setId( Integer Id ) throws java.rmi.RemoteException
  {
this.Id = Id;
  }

  public Integer getAnswer_Type_Id()
throws java.rmi.RemoteException
  {
return Answer_Type_Id;
  }

  public void setAnswer_Type_Id( Integer Answer_Type_Id )
throws java.rmi.RemoteException
  {
this.Answer_Type_Id = Answer_Type_Id;
  }

}



You can then specify in your descriptor:
prim-key-classanswerPK/prim-key-class

You still put the variables into your bean class and return the primary key
class ( e.g. answerPK ) from the ejbCreate.

  public answerPK ejbCreate( Integer Id, Integer Answer_Type_Id )
throws CreateException, RemoteException
  {
this.Id = Id;
this.Answer_Type_Id = Answer_Type_Id;
return new answerPK( Id, Answer_Type_Id );
  }

Have fun,
Tim.



-Original Message-
From: Henry Hu [mailto:[EMAIL PROTECTED]]
Sent: 16 December 2000 02:21
To: Orion-Interest
Subject: compound key


Could anybody tell me how I can specify a compound key in the descriptor
file? When the primary key consists of  2 or more fields, the DTD told
me not to specify the  "primkey-field/primkey-field "tag.  However,
the deployment has an error as

   No direct database fields for primary key

Please help.

Henry






Re: Stress orion = servlet engine failed arround 200 users

2000-12-21 Thread Marcus Ahnve

We've performed quite a few loadtests with logins, insertion into
databases etcetera. The server used for testing has two PII 550 and 768
MB of RAM. As long as there are enough connections to the database (see
previous posts about that) we can see very stable performance from
Orion. We've had 40 threads from four different machines hitting Orion
with 1000 continuous logins (basic authentication), with maximum
response times at around 9 secs and averaging at around 6. 

happy-customer
While I'm at it I might as well recommend PureLoad from InnovativeIT.
Excellent tool with a nice pricetag - much like Orion.
/happy-customer

/Marcus
-- 
Marcus Ahnve  email: [EMAIL PROTECTED]
Lecando AB   Office: +46-(0)8-634 94 18
Sweden   Mobile: +46-(0)70-462 19 18
www.lecando.comICQ#: 4564879




Re: Stress orion = servlet engine failed arround 200 users

2000-12-21 Thread Joseph B. Ottinger

On Thu, 21 Dec 2000, Marcus Ahnve wrote:

 happy-customer
 While I'm at it I might as well recommend PureLoad from InnovativeIT.
 Excellent tool with a nice pricetag - much like Orion.
 /happy-customer

It's always nice to see these! What URL? (I've been looking into a better
tool than httpbench myself, and I'm writing something simple... but if
someone else has done it, I'll be happy to use their tools
instead. JMeter's not able to measure finely enough, httpbench only hits
one URL, MS's web stress tool doesn't work, another tool mentioned here
requires admin access on NT to install...)

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://epesh.com/ IT Consultant





Recursive call to non-reentrant bean error using BMP.

2000-12-21 Thread Stefan Jonsson



Hi all,
I get this error message in the application.log 
file when I set the exclusive-write-access to "false" in the orion-ejb-jar.xml 
file.
It's a BMP bean.

2000-12-21 10:23 Started2000-12-21 10:23 Error 
in bean TestHome: Error in 
ejbPassivatecom.evermind.server.rmi.OrionRemoteException: Recursive call to 
non-reentrant beanat 
com.evermind.server.ejb.AbstractEJBObject.startCall(JAX, Compiled 
Code)at 
com.evermind.server.ejb.EntityEJBObject.removeFromCache(JAX)at 
com.evermind.server.ejb.EntityEJBObject.endTransaction(JAX)at 
com.evermind.server.ApplicationServerTransaction.ao8(JAX, Compiled 
Code)at com.evermind.server.ApplicationServerTransaction.commit(JAX, 
Compiled Code)at 
com.evermind.server.ApplicationServerTransaction.end(JAX)at 
TestHome_EntityHomeWrapper3.create(TestHome_EntityHomeWrapper3.java, Compiled 
Code)at java.lang.reflect.Method.invoke(Native Method)at 
com.evermind.server.rmi.bf.do(JAX)at com.evermind.util.f.run(JAX, 
Compiled Code)
The bean has an adapter class that implements the 
ejbPassivate method but even if I override the adapter 
implementation
in the bean class I still get the error message. I 
set up a test the only create the bean, calls findByPrimary and then removes 
it
so there no reentrant calls made.

I have tried it on orion 1.4.0 and on 1.4.4 with 
the same problem. I am running on windows NT, java version 1.2.2

Anyonetried doing 
BMP+exclusive-write-access="false" it with success?

Best regards,
Stefan
--
orion-ejb-jarenterprise-beans 
entity-deployment location="TestHome" name="TestEJB" 
exclusive-write-access="false" 
resource-ref-mapping location="jdbc/DefaultDS" name="jdbc/defaultPool" 
/ 
/entity-deployment/enterprise-beans/orion-ejb-jar


ejb-jarenterprise-beansentityejb-nameTestEJB/ejb-namehomecom.xxx.TestHome/homeremotecom.xxx.Test/remoteejb-classcom.xxx.TestBean/ejb-classpersistence-typeBean/persistence-type 
prim-key-classjava.lang.Long/prim-key-class 
reentrantFalse/reentrantenv-entryenv-entry-nameidType/env-entry-nameenv-entry-typejava.lang.String/env-entry-typeenv-entry-valueTestId/env-entry-value/env-entry 
env-entry 
env-entry-namelogSource/env-entry-name 
env-entry-typejava.lang.String/env-entry-type 
env-entry-valueTestEJB/env-entry-value 
/env-entryresource-refres-ref-namejdbc/defaultPool/res-ref-nameres-typejavax.sql.DataSource/res-typeres-authContainer/res-auth/resource-ref/entity/enterprise-beans

assembly-descriptorcontainer-transactionmethodejb-nameTestEJB/ejb-namemethod-name*/method-name/methodtrans-attributeRequired/trans-attribute/container-transaction
/ejb-jar






How to put a internet page to a file.

2000-12-21 Thread cgreen



Hi,all:
 I want to read a internet 
page(e:http://www.microsoft.com/) and put the page to a file(e: 
c:/temp.txt).
 How to do ?

Thanks very much!

cgreen
 
 


QUESTION: Using the Standalone News Client

2000-12-21 Thread Robert Keith

Hi Everyone,

Quick question, one the News Application is installed, I can access  it fine
using a web browser, but I would also like to see how it works using the
standalone client.

This is contained in the ear file in a jar file. Do I need to extract it and
add it to my classpath before I can use it, or it there some other way?

cheers

Bob




Re: Stress orion = servlet engine failed arround 200 users

2000-12-21 Thread Christian Sell

 happy-customer
 While I'm at it I might as well recommend PureLoad from InnovativeIT.
 Excellent tool with a nice pricetag - much like Orion.
 /happy-customer

$14900 is a nice pricetag, indeed - depending from whose side you look at
it. I dont see the similarities with orion, however (and sure am glad)

regards






Re: How to put a internet page to a file.

2000-12-21 Thread Joseph B. Ottinger

This has virtually nothing to do with Orion.

However, you can do this in a LOT of ways: "Save As" from your browser,
you can use various mirroring tools, you could even use a URLConnection
from java.net.* and use one of the java.io classes to write it to your
local filesystem... as well as a thousand other ways.

On Thu, 21 Dec 2000, cgreen wrote:

 Hi,all:
I want to read a internet page(e:http://www.microsoft.com/) and put the page to a 
file(e: c:/temp.txt).
How to do ?
 
 Thanks very much!
 
 cgreen

   
 

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://epesh.com/ IT Consultant





OrionSupport

2000-12-21 Thread Joseph B. Ottinger

A week or so ago, I posted a new document to OrionSupport:

http://www.orionsupport.com/articles/vision.html

In this, titled "In the Future," I try to address what I see OrionSupport
being, and what facilities I'd like it to provide. This is a community
effort; in addition to lack of knowledge, I've a severe lack of time, but
not will. However, this would be a LOT easier to see happen if I had
specific input and contributions from you, the Orion community. If you've
expertise in one of the areas mentioned, please let me know. I need code
as well as contributions; code that doubles as a contribution to the site
content is best, since that's more or less the modus operandi I see for
OrionSupport (i.e., "Here's how you do X -- and we know it works, because
OrionSupport uses it in exactly this way.")

Please let me know what you'd like to see, as well.

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://epesh.com/ IT Consultant





RE: How to put a internet page to a file.

2000-12-21 Thread Stephane GINER



hello,

here 
is the code to get http page.
you 
can write it were you want !

best 
regards




//create url 
objectInputStream 
l_urlStream; URL l_url = new 
URL(p_sUrl);

//get 
a connctionHttpURLConnection 
l_connection = (HttpURLConnection) 
l_url.openConnection();
l_connection.connect();
//open stream 
from connection l_urlStream = 
l_connection.getInputStream();

 
BufferedReader l_reader = new BufferedReader(new 
InputStreamReader(l_urlStream));

//process lines 
while ((l_sCurrentLine = l_reader.readLine()) != null) {
file://write line were you want 
!}

  -Message d'origine-De: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]De la part de 
  cgreenEnvoyé: jeudi 21 décembre 2000 10:29À: 
  Orion-InterestObjet: How to put a internet page to a 
  file.
  Hi,all:
   I want to read a internet 
  page(e:http://www.microsoft.com/) and put the page to a file(e: 
  c:/temp.txt).
   How to do ?
  
  Thanks very much!
  
  cgreen
   
   


Re: javax.naming.NameNotFoundException: agency not found

2000-12-21 Thread Peter Pontbriand

 Does anybody know what could cause a javax.naming.NameNotFoundException:
my
 bean name not found?  I think my .xml files are fine, and I think this
used
 to work!

We've got the same problem - it seems Orion 1.4.4 can't decide whether to
make EJB home interfaces available at "java:comp/env/ejb-name" or just
"ejb-name". We've replaced all our lookup code with something like this:

Object ref = null;
try{
ref = jndiContext.lookup("java:comp/env/ejb/WhateverEJB");
} catch(NamingException ne) {
System.err.println("Failed to find WhateverEJB attempting again
using non-standard mapping");
ref = jndiContext.lookup("WhateverEJB");
}
WhateverHome home = (WhateverHome)PortableRemoteObject.narrow(ref,
WhateverHome.class);

This at least lets the app function. Sometimes the first lookup works,
sometimes not. If and when we see a pattern that implies sort sort of reason
for this strange behaviour, I'll report it to the list.

P. Pontbriand
Canlink Interactive Technologies Inc.





CMP-findBy method

2000-12-21 Thread tasneem



Hello everybody

I have a problem i hav a CMP bean in which i am 
doing doing a findBy method to get some info from my table.
As per the normal way i have mentioned the query in 
my home class.
After deploying have also found the same  query in 
the orion.ejb.jar xml file but when i run my application the look up gets done 
findByPrimaryKey method is also working but the moment it reaches this findBy 
method it gives me the following error.

Note: My query looks like this in orion.ejb.jar xml 
file :
finder-method query="select T_Hotel.hotel_name 
from T_Hotel where T_Hotel.trans_xid=$1" 
partial="false"!-- Generated SQL: "select 
T_Hotel.hotel_name from T_Hotel where T_Hotel.trans_xid=?" --
where hotel_name , trans_xid are my columns and the 
table name is T_Hotel


java.sql.SQLException: Column not foundat 
sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(Unknown Source)at 
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)at 
THotelHome_EntityHomeWrapper2.findByTrans_xid(THotelHome_EntityHomeWrapper2.java:959)at 
CMP.HotelServlet.doGet(HotelServlet.java:61)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java)at 
com.evermind.server.http.d1.si(JAX)at 
com.evermind.server.http.d1.forward(JAX)at 
com.evermind.server.http.ed.sp(JAX)at 
com.evermind.server.http.ed.so(JAX)at 
com.evermind.util.f.run(JAX)


A few (newbie) problems with Orion

2000-12-21 Thread revivalatgt revivalatgt

Does anybody know what could cause a javax.naming.NameNotFoundException: my 
bean name not found?  I think my .xml files are fine, and I think this used 
to work!


Also, I'm getting a message: cmp-field 'carrier_id' not found in class 
eb.carriercompany.CarrierCompanyBean .  I'm trying to access my Oracle 
database, but it's giving me a message like it's looking in my bean class.  
I have a orion-ejb-jar.xml file that I'm mapping a field called 'carrierId' 
to a field in the database called 'carrier_id'.  Maybe I'm putting my xml 
file in the wrong place (ejb\orion)?

Thanks, and great server!

Merry Christmas!
_
Get your FREE download of MSN Explorer at http://explorer.msn.com





Comunicating between EJBs and Application Client

2000-12-21 Thread Christopher Bartling

I've have what I hope is a really easy question to answer.  I have a number
of Session beans deployed to Orion (1.4.4 level), and everything works great
when communicating from an application client (JSPs and servlets running
Apache Tomcat) to the Orion server.  Now I want to add some EJB to EJB
communication, with one EJB obtaining the home and remote interfaces of
another EJB and executing methods on that remote interface.

When I attempt to lookup my bean using the JNDI context, I get an exception
being thrown that says that it can't find the JNDI lookup name in the
Application Client.  I assume that Orion is not finding the
application_client.xml file within its own environment.  What are others
doing to rectify this situation?  I assume that EJB to EJB communication is
**very common**, as most people are using Session bean fascades around their
Entity beans.  An example of this sort of functionality and the steps needed
to configure it should be available through Orion or orionsupport.com, but I
could not find anything.


Thanks in advance.



-- chris bartling --


 





RE: Access EJB's from a standalone client.

2000-12-21 Thread David Ekholm

In order to connect a stand-alone client to my EJBs I place a
jndi.properties file next to the .class files of the client like this
--
java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://hostNameOfOrionServer/yourAppName
java.naming.security.principal=admin
java.naming.security.credentials=passwordOfAdmin
--

By using the RMIInitialContextFactory I don't have to deal with creating an
extra META-INF directory + XML file for the client. If I want to leave the
jndi.properties file out completely, I can put the content inside a
Properties object and pass it as parameter to new InitialContext().

Then I copy these jar files from the orion directory to the client computer:
ejb.jar, jndi.jar, mail.jar, orion.jar, xerces.jar (2.86 MB in total)

I finally run the client and pass the path of the following jar files as
classpath:
orion.jar, ejb.jar, jndi.jar
I also add the path to the ejb.jar file containing the home- and remote
interfaces of my EJB application.
Orion will automatically and instantly create stub code from the interfaces
when I run the application.

/David




Re: OrionSupport

2000-12-21 Thread Jay Armstrong

Hi Joseph,

I don't have anything to contribute just at the moment, but when I get
further along with a couple of my projects, I will be happy to contribute.
Great site -- I am grateful for your help.

Jay Armstrong
[EMAIL PROTECTED]

At 08:17 AM 12/21/00 -0500, you wrote:
A week or so ago, I posted a new document to OrionSupport:

http://www.orionsupport.com/articles/vision.html

In this, titled "In the Future," I try to address what I see OrionSupport
being, and what facilities I'd like it to provide. This is a community
effort; in addition to lack of knowledge, I've a severe lack of time, but
not will. However, this would be a LOT easier to see happen if I had
specific input and contributions from you, the Orion community. If you've
expertise in one of the areas mentioned, please let me know. I need code
as well as contributions; code that doubles as a contribution to the site
content is best, since that's more or less the modus operandi I see for
OrionSupport (i.e., "Here's how you do X -- and we know it works, because
OrionSupport uses it in exactly this way.")

Please let me know what you'd like to see, as well.

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://epesh.com/ IT Consultant








Re: CMP-findBy method

2000-12-21 Thread Boris Gertsberg



Your select statement in findBy method MUST include 
EVERY mapped property of your Entity Bean even if you use partial SQL 
statement.(i.e:"select T_Hotel.hotel_name,T_Hotel.trans_xid from T_Hotel 
where T_Hotel.trans_xid=$1")
After findBy method found each of your entity beans 
application server loads the data into memory. That's why it MUST have EVERY 
field. Otherwise it would have to do n+1 SQL query to load your bean. 1 select 
statement is faster then n+1.

Actually you probably don't even need to use 
partial="false" here. The only good use for partial that I found is calling 
stored procedures and doing complex joins in findBy 
methods.Boris

  - Original Message - 
  From: 
  tasneem 
  
  To: Orion-Interest 
  Sent: Thursday, December 21, 2000 9:54 
  AM
  Subject: CMP-findBy method
  
  Hello everybody
  
  I have a problem i hav a CMP bean in which i am 
  doing doing a findBy method to get some info from my table.
  As per the normal way i have mentioned the query 
  in my home class.
  After deploying have also found the same query in 
  the orion.ejb.jar xml file but when i run my application the look up gets done 
  findByPrimaryKey method is also working but the moment it reaches this findBy 
  method it gives me the following error.
  
  Note: My query looks like this in orion.ejb.jar 
  xml file :
  finder-method query="select 
  T_Hotel.hotel_name from T_Hotel where T_Hotel.trans_xid=$1" 
  partial="false"!-- Generated SQL: "select 
  T_Hotel.hotel_name from T_Hotel where T_Hotel.trans_xid=?" --
  where hotel_name , trans_xid are my columns and 
  the table name is T_Hotel
  
  
  java.sql.SQLException: Column not 
  foundat sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(Unknown 
  Source)at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown 
  Source)at 
  THotelHome_EntityHomeWrapper2.findByTrans_xid(THotelHome_EntityHomeWrapper2.java:959)at 
  CMP.HotelServlet.doGet(HotelServlet.java:61)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java)at 
  com.evermind.server.http.d1.si(JAX)at 
  com.evermind.server.http.d1.forward(JAX)at 
  com.evermind.server.http.ed.sp(JAX)at 
  com.evermind.server.http.ed.so(JAX)at 
  com.evermind.util.f.run(JAX)


Is anyone using Jakarta Struts v1.0?

2000-12-21 Thread Michael S. Kelly

I've seen people talking about Struts v1.0, but the Struts site still
advertises v0.5.  What's the real latest version and where does one get it?

Also, any early reviews of this tool?

-=michael=-

==
 Michael S. Kelly      _
 Axian, Inc. // |_  __(_) ___  _ __
 4800 SW Griffith Dr., Ste. 202 //| |\\/ /| |/ _ \| '_ \
 Beaverton, OR  97005 USA _//_| | / / | | |_| | | | |
 Voice: (503)644-6106 x122   ((   //  |_|/_/\\|_|\_/|_|_| |_|
 Fax:   (503)643-8425 ``-''  ``-''
 http://www2.axian.com   Software Consulting and Training
 mailto:[EMAIL PROTECTED]
==






Re: Distributed Transaction without EJB.

2000-12-21 Thread James Manning

[Scott Stirling]
 JTS is not officially part of J2EE, so I haven't had to deal with
 it personally.

http://java.sun.com/j2ee/transactions.html

This page seems to imply JTS and JTA are both included, esp.  since they
specifically say that they're RI includes a transaction manager that
supports both JTS and JTA... am I missing something?
-- 
James Manning [EMAIL PROTECTED]
GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4




Strange DataSourceUserManager behavior in 1.4.4

2000-12-21 Thread Werner Bohl

Hi:
After a lot of effot I was able to use DataSourceUserManager. It works fine
with my jsp's, but my
standalone (swing)  clients are only validated against XMLUserManager.
Anyone has seen this behavior before?

TIA,

Werner Bohl
Organization for Tropical Studies