Re: Looking up session beans between apps

2002-03-07 Thread Remy . Boucher

Hi,

try to put the remote and home interface of your bean in the app server
classpath ( server.xml ), i think it will solve your problem if Bean A and
Bean B are on the same server.

Does anybody know how to solve this problem if bean A and bean B are on
different server ??

Thanks.
Rémy.


 Gday all,
 
 I am currently working on porting an application
 from jboss to orion (don't ask!) and am
 having problems looking up session beans between apps.
 What i am trying to do is lookup sessionbeanA
 (in app A) from sessionbeanB (from app B).
 (Note that sessionbeanA and sessionbeanB are
 different bean classes). I am getting a class cast ecxception.
 
 This is how i am doing it
 
 So in sessionbeanB I create a context using the
 following properties..
 
 props.put( Context.INITIAL_CONTEXT_FACTORY,
 com.evermind.server.ApplicationClientInitialContextFactory );
 props.put( Context.PROVIDER_URL, ormi://localhost/sso-wa );
 props.put( Context.SECURITY_PRINCIPAL, guest );
 props.put( Context.SECURITY_CREDENTIALS,  );
 
 .. and can successfully locate an instance of sessionbeanA.
 Then i attempt to narrow it.
 The class i want to narrow to is SSOManagerHome.
 The class of the object being narrowed is
 SSOManagerHome_StatelessSessionHomeWrapper27
 It looks OK to me, but the narrow gives and exception. 
 
 java.lang.ClassCastException
 at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown
 Source)
 at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
 ..
 
 
 I have found some similar problems..
 http://www.elephantwalker.com/searchresult?id=277
 http://www.mail-archive.com/orion-interest@orionserver.com/msg17468.html
 But no solutions :(
 
 
 
 
 
 So where to from here??? Is there a solution? 
 Will the remote access doco
 http://www.orionserver.com/docs/remote-access/remote-access.xml
 be of any help as i am going session bean to session bean?
 (as opposed to web component to session bean).
 
 Thanks and Regards
 
 Ryan





RE: Local interfaces difference ???

2002-03-07 Thread Jon Iles

Just picking up on Scott's request... the change to using
copy-by-value=false gave our application on average a 20% speedup. The
application only uses Remote interfaces at present. The testing was carried
out using JUnit+HTTPUnit to execute multiple passes of our regression test
suite (500+ tests generating HTTP traffic, taking about 2 minutes to
execute). Timings were recorded before and after the change was made.

Jon

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Farquhar
 Sent: 07 March 2002 00:06
 To: Orion-Interest
 Subject: Re: Local interfaces difference ???


 There is a workaround that has been in Orion for a while - by specifying
 that your beans are executed in the same container, you save the
 marshalling  remote calls that normal EJB uses.

 In orion-ejb-jar.xml, you can set copy-by-value=false, which will pass
 by reference instead.

 http://kb.atlassian.com/content/orion/docs/deployment/orion-ejb-ja
 r.xml.html

 If you do any performance testing, please let me know the differences in
 speed.

 Of course - you can still use local interfaces to achieve the same thing.

 Cheers,
 Scott






Re: Caching Group Information

2002-03-07 Thread Stephen Davidson

Christian, Joanne wrote:
 Hi All,
 
 I am using a custom user manager that gets group and user information from
 the database.  I would like to cache the database information when the user
 manager is initialized; and access the cache to get the user information.
 
 Can anyone suggest the best method for doing this?  I am thinking about
 using a hashmap, but I'm not quite sure what is the best option.
 
 
 Thanks,
 
 Joanne
 
 
 

Hi Joanne.

I am using an Entity EJB, and letting the Container worry about how to handle the 
cache.
My UserEJB actually loads itself from several tables, and has two hashmaps and some 
rather complex objects.  Of course, this has to be done using BeanManaged 
Persistance, but actually works quite smoothly.  Among other things, this is key to 
how the security model for my application works.

In the EJB specs, there is a method called getHandle(), which returns a small, 
serializable object, that can be passed around and/or stored in Hashmaps or other 
objects.  It can be used to obtain a remote interface to a specific EJB w/o having to 
do a home lookup and a findByXXX call.  (userHandle.getEJBObject does the 
trick).

With this method, if the EJB is being used, container keeps it around.  If/when not 
being used, container releases it (supposedly).  And as this is handled by 
the container, you do not have to write the code to load/release the user data.  And 
this method is also expandable into a cluster (only one instance of Entity 
EJB per cluster, + backup copies, with cluster worrying about how to keep data 
syncronized, not you).

-Steve


-- 
Stephen Davidson
Java Consultant
Delphi Consultants, LLC
http://www.delphis.com
Phone: 214-696-6224 x208





Re: Local interfaces difference ???

2002-03-07 Thread Joseph Ottinger

Because SOMEONE (I'm not going to mention BEA's name) couldn't see their
way around actually optimizing that way. There is an actual performance
benefit, I suppose, in that local interfaces and home objects don't throw
RemoteException, but personally, I think this is a sign that Sun was
serious when they put the black hole in .com.


-
Joseph B. Ottinger [EMAIL PROTECTED]
http://enigmastation.comIT Consultant

On Thu, 7 Mar 2002, Greg Matthews wrote:


 and can anyone shed some light on why this has even been put in the J2EE
 spec.

 Visibroker for Java automatically detected if the client was local and then
 handed out a client stub that did not do marshalling, i.e. performed an
 in-process local java method call.

 I would have thought that the whole concept of Local references was just an
 optimisation that a vendor provided based on common sense.

 Why is it in the spec?

 Greg.

 - Original Message -
 From: Eddie Post [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Thursday, March 07, 2002 4:54 AM
 Subject: Local interfaces difference ???


  Hellu,
 
  Can someone tell me what the performance boost is when you change your
  remote and home interfaces to local interfaces with Orion 1.5.4 ?
 
  I did this but I know that with Bea you could already indicate if your
 beans
  and clients were located on the same machine such that it already had some
  kind of local workaround. I was wandering how Orion did and does this ??
 
  Eddie
 
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 







Connection timeout of persistent connections (Keep-Alive)

2002-03-07 Thread Michal Palicka


Hello, 

is it possible to configure the connection timeout
for persistent HTTP connections?

When I use the Connection: keep-alive header
in my HTTP request, I always get the following
header field in the response from Orion HTTP server:

Keep-Alive: timeout=15, max=100

This indicates that the session is being kept alive 
for a maximum of 100 requests and a per-request 
timeout of 15 seconds.

I would need to keep the connection active for a longer 
period, but I could not find any configuration option in Orion.

Thanks in advance

Michal Palicka
Cleverlance
Prague, Czech Republic 







remove

2002-03-07 Thread Valentina Kateneva



Please remove me.
Thanks.








HTTP Reponse TimeOut Parameter in Orion

2002-03-07 Thread anandpt

Hi All,

How to configure http response time out parameter in OC4J?
By default it is getting timedout after 5 minutes.
Please advice.

Regards,
Anand




JDBC connection leak

2002-03-07 Thread Marc Lehnert

Hello!
I call the following code in a Message Driven Bean in Orion 1.5.2. After the
conn.close() all entity beans I created in some code before are destroyed.
The database is empty. The sql statement gets the right result but after the
close everything is lost. No error, nothing. Without the close statement
Orion says that there is a leaked connection and that I have to close it:
==
OrionCMTConnection not closed, check your code!
LogicalDriverManagerXAConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked connection
was created)
==

Can anybody help me?

Thanks in advance.

Marc Lehnert,.


The code:


PreparedStatement stmt = null;
java.sql.Timestamp siteEndDate;
java.sql.Timestamp siteBeginDate;

try {

  javax.sql.DataSource ds =
(javax.sql.DataSource)jndiContext.lookup(jdbc/sapdbDS);
  Connection conn = ds.getConnection();

  //Connection conn =
ConnectionFactory.getConnection(jdbc/sapdbDS);
  
  String sqlStatement = select max(rw_datetime),
min(rw_datetime) from logfilerow where rw_websiteid = ?;
  
  stmt = conn.prepareStatement(sqlStatement);
  stmt.setString(1, websiteid);
  ResultSet rs = stmt.executeQuery();
  rs.next();
  siteEndDate = rs.getTimestamp(1);
  siteBeginDate = rs.getTimestamp(2);

conn.close();
  
} catch (Exception e) {
  e.printStackTrace();
  throw e;
}




RE: remove

2002-03-07 Thread Madhavan, Manoj

It appears that you have sent your request to the wrong mailing list.
Please submit your request to a mailing list for contract killers and your
request may get carried out :-)

-Original Message-
From: Valentina Kateneva [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 12:36 PM
To: Orion-Interest
Subject: remove


Please remove me. 

Thanks. 


  

 





Performance declines after moving to a faster Server

2002-03-07 Thread Cugier (extern)

Hi, 

we are running a simple web applications - just servlets - on an older
Windows NT Server with two Pentium two 233 MHz CPUs. The performance on the
server was acceptable and pages showed up pretty quickly in the browsers. 

Now we bought a new server (still Windows NT) with two Pentium III Xeon 8xx
MHz CPUs (same amount of memory) and moved the application to the new
server. We expected that the performance would increase because of the
faster CPUs but the opposite happened. Our first tests showed a dramatic
increase of response time. Pages that showed up in just one or two seconds
on the old server, now take ten and more seconds to show up. 

We start Orion with the same java runtime parameters as on the old server.
Also the configuration of the Apache server that we use a front end to Orion
did not change. 

Does anyone have an idea how this performance decline is possible? Shouldn't
it be faster on fastes CPUs?








Dependent Object Relationship Fails in 1.5.4

2002-03-07 Thread Emil Goldfarb




I have Entity-DependentObject relationship that works fine on Orion 
1.5.3.

When the same application is Deployed in Orion 1.5.4, I get the following 
error:

Unknown relationship-role-source target in relationship role 
'ParameterDefinition-belongsto-Template': 'null', no entity 
correspondingto that ejb-name, see section 10.3.13 of the EJB 
specification

I have looked at the EJB spec section 10.3.13 but there is no helpful 
information there regarding this.

I have the following code in my ejb-jar.xml:

!-- The Template entity --
enterprise-beans
entity
description/description
 
abstract-schema-name/abstract-schema-name
ejb-nameTemplate/ejb-name
homecom.img.eye2eye.database.TemplateHome/home
remotecom.img.eye2eye.database.Template/remote
ejb-classcom.img.eye2eye.database.TemplateEJB/ejb-class
persistence-typeContainer/persistence-type
prim-key-classjava.lang.Integer/prim-key-class
reentrantFalse/reentrant
cmp-fieldfield-nameid/field-name/cmp-field
cmp-fieldfield-namename/field-name/cmp-field
cmp-fieldfield-namedescription/field-name/cmp-field
cmp-fieldfield-namefileType/field-name/cmp-field
cmp-fieldfield-nameowner/field-name/cmp-field
cmp-fieldfield-namegroup/field-name/cmp-field
cmp-fieldfield-nameparameterDefinitions/field-name/cmp-field
 
cmp-fieldfield-namesize/field-name/cmp-field
primkey-fieldid/primkey-field
/entity
/enterprise-beans


!--The Relation --

relationships
ejb-relation
 
ejb-relation-nameTemplate-ParameterDefinition/ejb-relation-name
 ejb-relationship-role
 
ejb-relationship-role-nameTemplate-has-ParameterDefinition/ejb-relationship-role-name
multiplicityone/multiplicity
relationship-role-sourceejb-nameTemplate/ejb-name/relationship-role-source
cmr-field
 
cmr-field-nameparameterDefinitions/cmr-field-name
cmr-field-typejava.util.Set/cmr-field-type
/cmr-field
/ejb-relationship-role
ejb-relationship-role
 
ejb-relationship-role-nameParameterDefinition-belongsto-Template/ejb-relationship-role-name
 
multiplicitymany/multiplicity
relationship-role-sourcedependent-nameParameterDefinition/dependent-name/relationship-role-source
cmr-field
 
cmr-field-nametemplate/cmr-field-name
 
cmr-field-typecom.img.eye2eye.database.Template/cmr-field-type
/cmr-field
 /ejb-relationship-role
/ejb-relation/relationships
!--The Dependent --
dependents
dependent
 
dependent-classcom.img.eye2eye.database.ParameterDefinition/dependent-class
 
dependent-nameParameterDefinition/dependent-name
cmp-fieldfield-nametemplate/field-name/cmp-field
 
cmp-fieldfield-nameid/field-name/cmp-field
cmp-fieldfield-namename/field-name/cmp-field
 
cmp-fieldfield-nametype/field-name/cmp-field
 
cmp-fieldfield-namedescription/field-name/cmp-field
 
cmp-fieldfield-nameoptions/field-name/cmp-field
/dependent
/dependents



Any ideas of what could be going on here?

Thanks

Emil


RE: Caching Group Information

2002-03-07 Thread Robert Moskal

That's what I do :).  The only thing you might need to worry about is that
the data in the security table changes after you load up the hash map.  What
I usually do is if the user is not found I reload the map and try one more
time.


Regards,


_
Robert Moskal
Most Media
Brooklyn, USA

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Stephen
Davidson
Sent: Thursday, March 07, 2002 7:12 AM
To: Orion-Interest
Subject: Re: Caching Group Information


Christian, Joanne wrote:
 Hi All,

 I am using a custom user manager that gets group and user information from
 the database.  I would like to cache the database information when the
user
 manager is initialized; and access the cache to get the user information.

 Can anyone suggest the best method for doing this?  I am thinking about
 using a hashmap, but I'm not quite sure what is the best option.


 Thanks,

 Joanne




Hi Joanne.

I am using an Entity EJB, and letting the Container worry about how to
handle the cache.
My UserEJB actually loads itself from several tables, and has two hashmaps
and some rather complex objects.  Of course, this has to be done using
BeanManaged
Persistance, but actually works quite smoothly.  Among other things, this is
key to how the security model for my application works.

In the EJB specs, there is a method called getHandle(), which returns a
small, serializable object, that can be passed around and/or stored in
Hashmaps or other
objects.  It can be used to obtain a remote interface to a specific EJB w/o
having to do a home lookup and a findByXXX call.  (userHandle.getEJBObject
does the
trick).

With this method, if the EJB is being used, container keeps it around.
If/when not being used, container releases it (supposedly).  And as this is
handled by
the container, you do not have to write the code to load/release the user
data.  And this method is also expandable into a cluster (only one instance
of Entity
EJB per cluster, + backup copies, with cluster worrying about how to keep
data syncronized, not you).

-Steve


--
Stephen Davidson
Java Consultant
Delphi Consultants, LLC
http://www.delphis.com
Phone: 214-696-6224 x208







How does passivation work?

2002-03-07 Thread Cristian Donciulescu



I am interested to know how does Orion Container treat the 
ejbPassivatemethod of an CMP entity-bean. Does it by any chance Deletes a 
record in theDB and then recreates it?The problem I'm facing is the 
following: I have a one-to-many relationshipin the DB. I have one entity 
bean (A) that has a List member. The listmember contains objects of class B. 
If I reinforce the FK constraint betweenthe tables entity A and class B are 
stored in, I get an Oracle error statingthe there was a FK violation, there 
were child records found. If I createthe child table with the ON DELETE 
CASCADE directive, the error dissapears,but in the DB the child record is 
deleted and only the parent remains. Theerror is thrown immediately after 
the ejbPassivate is called. This suggeststhat during passivation the parent 
record is deleted and recreated. When thetables are created with ON DELETE 
CASCADE this works, although the child ispermanently deleted. Otherwise, 
when trying to delete the parent Oraclereacts with an error that is caught 
by me.Is all this true? If yes, is there any way around 
it?Thanks,Cristi


Re: JDBC connection leak

2002-03-07 Thread Stephen Davidson

Hi Marc.

Maybe try a conn.commit() before conn.close()?

-Steve

Marc Lehnert wrote:
 Hello!
 I call the following code in a Message Driven Bean in Orion 1.5.2. After the
 conn.close() all entity beans I created in some code before are destroyed.
 The database is empty. The sql statement gets the right result but after the
 close everything is lost. No error, nothing. Without the close statement
 Orion says that there is a leaked connection and that I have to close it:
 ==
 OrionCMTConnection not closed, check your code!
 LogicalDriverManagerXAConnection not closed, check your code!
 (Use -Djdbc.connection.debug=true to find out where the leaked connection
 was created)
 ==
 
 Can anybody help me?
 
 Thanks in advance.
 
 Marc Lehnert,.
 
 
 The code:
 
 
 PreparedStatement stmt = null;
 java.sql.Timestamp siteEndDate;
 java.sql.Timestamp siteBeginDate;
 
 try {
 
   javax.sql.DataSource ds =
 (javax.sql.DataSource)jndiContext.lookup(jdbc/sapdbDS);
   Connection conn = ds.getConnection();
 
   //Connection conn =
 ConnectionFactory.getConnection(jdbc/sapdbDS);
   
   String sqlStatement = select max(rw_datetime),
 min(rw_datetime) from logfilerow where rw_websiteid = ?;
   
   stmt = conn.prepareStatement(sqlStatement);
   stmt.setString(1, websiteid);
   ResultSet rs = stmt.executeQuery();
   rs.next();
   siteEndDate = rs.getTimestamp(1);
   siteBeginDate = rs.getTimestamp(2);
 
 conn.close();
   
 } catch (Exception e) {
   e.printStackTrace();
   throw e;
 }
 
 
 



-- 
Stephen Davidson
Java Consultant
Delphi Consultants, LLC
http://www.delphis.com
Phone: 214-696-6224 x208





RE: JDBC connection leak

2002-03-07 Thread John Creaner

Hi,

Not sure if this is what your looking for but you should really close all
associations to the connection
cause I think that the way CMT works with orion is that the close method
merely returns it to the pool
so you should do the following before you close:

 stmt = conn.prepareStatement(sqlStatement);
  stmt.setString(1, websiteid);
  ResultSet rs = stmt.executeQuery();
  rs.next();
  siteEndDate = rs.getTimestamp(1);
  siteBeginDate = rs.getTimestamp(2);

// Here
rs.close ();
stmt.close ();

conn.close();

This means that the connection is now free for the CMT to use again (I THINK
;)


john


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Marc Lehnert
Sent: 07 March 2002 15:56
To: Orion-Interest
Subject: JDBC connection leak


Hello!
I call the following code in a Message Driven Bean in Orion 1.5.2. After the
conn.close() all entity beans I created in some code before are destroyed.
The database is empty. The sql statement gets the right result but after the
close everything is lost. No error, nothing. Without the close statement
Orion says that there is a leaked connection and that I have to close it:
==
OrionCMTConnection not closed, check your code!
LogicalDriverManagerXAConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked connection
was created)
==

Can anybody help me?

Thanks in advance.

Marc Lehnert,.


The code:


PreparedStatement stmt = null;
java.sql.Timestamp siteEndDate;
java.sql.Timestamp siteBeginDate;

try {

  javax.sql.DataSource ds =
(javax.sql.DataSource)jndiContext.lookup(jdbc/sapdbDS);
  Connection conn = ds.getConnection();

  //Connection conn =
ConnectionFactory.getConnection(jdbc/sapdbDS);

  String sqlStatement = select max(rw_datetime),
min(rw_datetime) from logfilerow where rw_websiteid = ?;

  stmt = conn.prepareStatement(sqlStatement);
  stmt.setString(1, websiteid);
  ResultSet rs = stmt.executeQuery();
  rs.next();
  siteEndDate = rs.getTimestamp(1);
  siteBeginDate = rs.getTimestamp(2);

conn.close();

} catch (Exception e) {
  e.printStackTrace();
  throw e;
}






remove

2002-03-07 Thread Steve Heidebrink

Please remove me.

Thanks,
Steve





Re: Performance declines after moving to a faster Server

2002-03-07 Thread Curt Smith

NT offers a near infinate number of causes for slowness.

Start by installing a good defrag'er and defrag all disks.

Your new box may have dog slow disks? Eh?

How about size of L2 Cache?  Do the PIII's have same size L2 cach
as the PII's which I think where all 256Kb... Or maybe there where a
bread of early PII's that had 512Kb?

Your new box may have a slow as molasis NIC or a crapie driver with
your new install of NT.

Here's a set of tools to test:

- Ftp to both boxes from a 3rd box of a large file (50Mb) time it.
This will test both the NIC the LAN and a much lesser extent the
disks.

- find iozone  it's a common tool on unix, I found a copy for NT.
It's great a measuring disk io.

- Check that your NIC is hard set to full or half duplex.  Don't let
it choose via auto.

* This might be your problem.  *

Good luck, curt

Cugier (extern) wrote:

 Hi, 
 
 we are running a simple web applications - just servlets - on an older
 Windows NT Server with two Pentium two 233 MHz CPUs. The performance on the
 server was acceptable and pages showed up pretty quickly in the browsers. 
 
 Now we bought a new server (still Windows NT) with two Pentium III Xeon 8xx
 MHz CPUs (same amount of memory) and moved the application to the new
 server. We expected that the performance would increase because of the
 faster CPUs but the opposite happened. Our first tests showed a dramatic
 increase of response time. Pages that showed up in just one or two seconds
 on the old server, now take ten and more seconds to show up. 
 
 We start Orion with the same java runtime parameters as on the old server.
 Also the configuration of the Apache server that we use a front end to Orion
 did not change. 
 
 Does anyone have an idea how this performance decline is possible? Shouldn't
 it be faster on fastes CPUs?
 
 


-- 

Curt Smith
[EMAIL PROTECTED]
(w) 404-463-0973
(h) 404-294-6686







Re: How does passivation work?

2002-03-07 Thread Scott Farquhar

Probably the easiest way to solve this would be to turn database logging 
on, and then see what SQL statements are being run on your db when Orion 
runs.

Cheers,
Scott

Cristian Donciulescu wrote:

 I am interested to know how does Orion Container treat the ejbPassivate
 method of an CMP entity-bean. Does it by any chance Deletes a record in the
 DB and then recreates it?
 The problem I'm facing is the following: I have a one-to-many relationship
 in the DB. I have one entity bean (A) that has a List member. The list
 member contains objects of class B. If I reinforce the FK constraint between
 the tables entity A and class B are stored in, I get an Oracle error stating
 the there was a FK violation, there were child records found. If I create
 the child table with the ON DELETE CASCADE directive, the error dissapears,
 but in the DB the child record is deleted and only the parent remains. The
 error is thrown immediately after the ejbPassivate is called. This suggests
 that during passivation the parent record is deleted and recreated. When the
 tables are created with ON DELETE CASCADE this works, although the child is
 permanently deleted. Otherwise, when trying to delete the parent Oracle
 reacts with an error that is caught by me.
 Is all this true? If yes, is there any way around it?
 
 Thanks,
 Cristi
 


-- 
Scott Farquhar :: [EMAIL PROTECTED]

Atlassian :: http://www.atlassian.com
  Supporting YOUR J2EE World






Accessing Orion EJB from Weblogic JSP

2002-03-07 Thread Vidur Dhanda

Hello,

Has anyone successfully used an EJB running in Orion from a JSP running
in Weblogic?  I have tried several things but can not get Weblogic to
connect to Orion   I was hoping it would be as simple as creating a JNDI
context with the Orion provfider URL and RMI context factory, but that
does not help.

Thanks,
Vidur

--
Vidur Dhanda
Epistemic Corporation
tel: 617/566-1252
fax: 509/693-1248
cell: 617/821-7115
ICQ: 129193878
[EMAIL PROTECTED]
www.epistemic.com






Tomcat with Orion /Apteach with Orion

2002-03-07 Thread sachin mahajan

Hello,
Can any one explain me how to configure
Orion as a application server And 
Tomcat /Aptech as a web server.
does It require any plugin.
If can one know pl reply me  fast .
Its very important

sachin

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/