RE: How do you tell orion not to autocommit?

2002-05-26 Thread Alex Paransky

Wrap a transaction around your operation.  This way, the transaction will
begin when your operation starts, and commits only when your operation is
complete.  Unless, you are accessing your entity beans from a client layer.
This is one of the reasons why you need to use Stateless session beans to
wrap your model.

You should never have to touch the autoCommit property of a connection.

-AP_
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of prasanth sb
Sent: Saturday, May 25, 2002 10:44 PM
To: Orion-Interest
Subject: Re: How do you tell orion not to autocommit?


Hi Keith,
 If you are using Bean managed persistence, then get the connection
object using jndi lookup, then use connection.setAutocommit(false). I am not
aware how to do this in container managed persistence.Can some great guys
explain this?Wish you a good day.
thanks,
Prasanth
God gives you more than you expect




From: Keith Kwiatek [EMAIL PROTECTED]
Reply-To: Orion-Interest [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Subject: How do you tell orion not to autocommit?
Date: Wed, 17 Apr 2002 07:16:48 -0400

Hello,

I am running orion with a datasource and  some jsp's with some jdbc beans.
When I insert/update/delete it seems to be set to autocommit. How do I tell
orion not to autocommit?

Thanks,
Keith





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com







RE: Initial context problem.

2002-05-01 Thread Alex Paransky

Not sure if the code you pasted is correct, however, you are missing a new
keyword in front of the InitialContext().  Also, in your second try/catch
block you are missing a call to new InitialContext().  I might be picky, but
the source code you posted is not at all the source code that you are using
(unless are you using a strange version of the Java Complier).

Can you isolate your problem into a small piece of code that works, and try
to post again?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jesper
Rasmussen
Sent: Wednesday, May 01, 2002 3:10 AM
To: Orion-Interest
Subject: Initial context problem.


Hi all,
Im trying to make an application which askes for the login and password
to connect to the application deployed on 1.5.4 orion server.

It works fine if i specify the correct login(admin). However if I uses
some wrong cridentials(admin1) i get an exception which also is fine.

HOWEVER when i try to login again, without restarting the application)
using the correct info I still get the old exception
(javax.naming.AuthenticationException: Invalid username/password for
beansApp (admin1)).

If i close the app and login again with the correct it works fine.

to me it seems like the enviroment i pass to the constructor of
InitialContext is ignored the second time.

I have tried to use close() to no avail.

Does anyone have a clue?? Thanks!

cheers
JEsper

--more or less the code that cause the bug!
server=ormi://127.0.0.1/beansApp;
login=admin1;
password=123;
env = new java.util.Hashtable();
env.put(java.naming.provider.url,server);
env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
env.put(java.naming.security.principal,login);
env.put(java.naming.security.credentials,password);
InitialContext initial;

try {
   initial = InitialContext(env);
catch(NamingException e) {
   try {
  login=admin;
  env = new java.util.Hashtable();
  env.put(java.naming.provider.url,server);

env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
  env.put(java.naming.security.principal,login);
  env.put(java.naming.security.credentials,password);
   } catch(NamingException ex) {
//ACK. chould not get here!!!
   }






RE: How can I simplify a URL?

2002-04-22 Thread Alex Paransky

I decided to take Scott's Farquhar approach to url simplification, here is
what I decided on:

http://www.myprofiles.com/member/profile/apara_personal

Other options were viable but I did not choose them for the following
reasons:

1. A filter would have difficulties distinguishing between IMG and other
types of requests

2. Using HTTP error 404 page to attempt to read the profile did not seem
clean

3. Using a virtual server along with response.sendRedirect(new server) would
have exposed the
virtual server to the user.  I did not want to do this, since once the user
gets to the virtual server it's difficult to return back to the original.
Besides, now I would have to maintain two different applications.

Thanks for all your help.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scott Farquhar
Sent: Thursday, April 18, 2002 3:04 AM
To: Orion-Interest
Subject: Re: How can I simplify a URL?


Just have one directory level.

eg:
http://view.myprofiles.com/p/127

Then map the servlet to /p*

That avoids problems with images.

Cheers,
Scott

Alex Paransky wrote:
 I have a url which looks like this:

 http://www.myprofiles.com/view.do?profileId=127

 I would like to be able to replace it with:

 http://view.myprofiles.com/127

 I know how to create a new website with view.myprofiles being serviced by
 orion.  I am just not sure how to map the /127 to execute
 /view.do?profileId=127.

 I was thinking of mapping a servlet to / context, however, the concern I
 have is that if there are any images I don't want to servlet to process
 them.  Also, will the jsp:include work correctly with this scenario?

 Thanks for any suggestions.

 -AP_
 http://www.alexparansky.com
 Java/J2EE Architect/Consultant
 http://www.myprofiles.com/member/view.do?profileId=127





--
Scott Farquhar :: [EMAIL PROTECTED]

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







How can I simplify a URL?

2002-04-18 Thread Alex Paransky

I have a url which looks like this:

http://www.myprofiles.com/view.do?profileId=127

I would like to be able to replace it with:

http://view.myprofiles.com/127

I know how to create a new website with view.myprofiles being serviced by
orion.  I am just not sure how to map the /127 to execute
/view.do?profileId=127.

I was thinking of mapping a servlet to / context, however, the concern I
have is that if there are any images I don't want to servlet to process
them.  Also, will the jsp:include work correctly with this scenario?

Thanks for any suggestions.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127





RE: distribute beans in different jars

2002-04-05 Thread Alex Paransky

One immediate way to speed your deployment time up, is to switch to using
Jikes as your compiler.  We have done this recently and it takes seconds to
redeploy entire application.  Afterwards, you can look in to splitting
session beans from entity beans.

-
-AP_
See my profile at
http://www.myprofiles.com/member/view.do?profileId=128


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matthias
Gottschlich
Sent: Friday, April 05, 2002 5:09 AM
To: Orion-Interest
Subject: distribute beans in different jars


Hi,

i am new in development of j2ee-applications, so i think my question could
be too stupid..

We have 70 entity-beans with local and remote interfaces and 5 session
beans (will be more in future)
in one ejb-jar-file.  The session-beans reference the entity beans with
local interfaces!
The entity-beans are very stable ( because we are developing the session
beans now).
The ejb-jar-file resides in addition with an client.jar-file in on ear-file.
The deployment time is very long ( a few minutes ).
I think the time is very long, because orion test the entity-beans on
changes (which never occure in the moment).
Is there any way to speed up the deployment time?
Could we divide the entity-beans and the session-beans in two different
jar, to speed up? (i think the local references could be a problem)


best regards

Matthias Gottschlich



mail: [EMAIL PROTECTED]







ejbStore not getting called! Please provide any comments you have...

2002-03-20 Thread Alex Paransky

Dear OrionServer group,

I know this is a far shot, but I am hoping that someone had a similar
experience.

The ejbStore method is not being called for an CMP2.0 entity bean.  Not all
beans, just this one!  The record is updated, and seems to be correct
somewhere in memory, but it's never written out to disk.  If I restart
orion, the record is back to what it is on disk.  The only time I see
ejbStore IS called is on initial create.  Again, this is happening on only 1
bean.  Here is the trace:

rejecting: 714 note: asdfasdfasdfasdfasdf
request.MemberRequestServiceBean (?:?) - rejectRequest: 714
note:asdfasdfasdfasdfasdf
request.RequestEntityBean (?:?) - reject request begin: 714 with note:
asdfas current status: 1
request.RequestEntityBean (?:?) - reject request end: 714 with note: asdfas
current status: 3

In the following code sample setStatus and setNote are both abstract
functions (CMP2.0).  The setStatus is changing the state of the object since
I print it out in the second log statement.

The code:

public void ejbStore() {
  log.debug(ejbStore:  + getKey().getId());
}

public void ejbLoad() {
  super.ejbLoad();
  log.debug(ejbLoad:  + getKey().getId());
}

public void reject(final String note) {
  if (log.isDebugEnabled())
log.debug(reject request begin:  + getKey().getId() +  with note:  +
note +  current status:  + getStatus());

  //Assure proper status
  //
  if (getStatus() != RequestEntity.STATUS_PENDING)
throw
  new EJBException(Cannot reject request in non-pending status);

  //Configure new status
  //
  setStatus(RequestEntity.STATUS_REJECTED);

  //Configure note
  //
  setNote(note);

  //Debug
  //
  if (log.isDebugEnabled())
log.debug(reject request end:  + getKey().getId() +  with note:  +
getNote() +  current status:  + getStatus());
}

Thanks.
-AP_





RE: ejbStore not getting called! Please provide any comments youhave...

2002-03-20 Thread Alex Paransky

I did not mention that I am running Orion 1.5.3 (I cannot switch to 1.5.4)
because I have too many entity objects with relations already implemented in
1.5.3).  This used to work before, but is not working now.  I am not sure
what could have changed to cause such a problem.

I have already tried the exclusive-write-access=false but that did not
help at all.  I am also running on RedHat 7.1 Linux, and using java version
1.3.1_01.

Thanks for any help you can offer.

-AP_
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Wednesday, March 20, 2002 5:07 AM
To: Orion-Interest
Subject: ejbStore not getting called! Please provide any comments you
have...


Dear OrionServer group,

I know this is a far shot, but I am hoping that someone had a similar
experience.

The ejbStore method is not being called for an CMP2.0 entity bean.  Not all
beans, just this one!  The record is updated, and seems to be correct
somewhere in memory, but it's never written out to disk.  If I restart
orion, the record is back to what it is on disk.  The only time I see
ejbStore IS called is on initial create.  Again, this is happening on only 1
bean.  Here is the trace:

rejecting: 714 note: asdfasdfasdfasdfasdf
request.MemberRequestServiceBean (?:?) - rejectRequest: 714
note:asdfasdfasdfasdfasdf
request.RequestEntityBean (?:?) - reject request begin: 714 with note:
asdfas current status: 1
request.RequestEntityBean (?:?) - reject request end: 714 with note: asdfas
current status: 3

In the following code sample setStatus and setNote are both abstract
functions (CMP2.0).  The setStatus is changing the state of the object since
I print it out in the second log statement.

The code:

public void ejbStore() {
  log.debug(ejbStore:  + getKey().getId());
}

public void ejbLoad() {
  super.ejbLoad();
  log.debug(ejbLoad:  + getKey().getId());
}

public void reject(final String note) {
  if (log.isDebugEnabled())
log.debug(reject request begin:  + getKey().getId() +  with note:  +
note +  current status:  + getStatus());

  //Assure proper status
  //
  if (getStatus() != RequestEntity.STATUS_PENDING)
throw
  new EJBException(Cannot reject request in non-pending status);

  //Configure new status
  //
  setStatus(RequestEntity.STATUS_REJECTED);

  //Configure note
  //
  setNote(note);

  //Debug
  //
  if (log.isDebugEnabled())
log.debug(reject request end:  + getKey().getId() +  with note:  +
getNote() +  current status:  + getStatus());
}

Thanks.
-AP_







RE: ejbStore not getting called! Please provide any comments youhave...

2002-03-20 Thread Alex Paransky

I seem to have solved my problem.  It had to do with boolean isModified()
function call.  I accidentally added this function to my base class and
defaulted the return value to false.

Thanks to all that responded.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Wednesday, March 20, 2002 8:35 AM
To: Orion-Interest
Subject: RE: ejbStore not getting called! Please provide any comments
you have...


I did not mention that I am running Orion 1.5.3 (I cannot switch to 1.5.4)
because I have too many entity objects with relations already implemented in
1.5.3).  This used to work before, but is not working now.  I am not sure
what could have changed to cause such a problem.

I have already tried the exclusive-write-access=false but that did not
help at all.  I am also running on RedHat 7.1 Linux, and using java version
1.3.1_01.

Thanks for any help you can offer.

-AP_
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Wednesday, March 20, 2002 5:07 AM
To: Orion-Interest
Subject: ejbStore not getting called! Please provide any comments you
have...


Dear OrionServer group,

I know this is a far shot, but I am hoping that someone had a similar
experience.

The ejbStore method is not being called for an CMP2.0 entity bean.  Not all
beans, just this one!  The record is updated, and seems to be correct
somewhere in memory, but it's never written out to disk.  If I restart
orion, the record is back to what it is on disk.  The only time I see
ejbStore IS called is on initial create.  Again, this is happening on only 1
bean.  Here is the trace:

rejecting: 714 note: asdfasdfasdfasdfasdf
request.MemberRequestServiceBean (?:?) - rejectRequest: 714
note:asdfasdfasdfasdfasdf
request.RequestEntityBean (?:?) - reject request begin: 714 with note:
asdfas current status: 1
request.RequestEntityBean (?:?) - reject request end: 714 with note: asdfas
current status: 3

In the following code sample setStatus and setNote are both abstract
functions (CMP2.0).  The setStatus is changing the state of the object since
I print it out in the second log statement.

The code:

public void ejbStore() {
  log.debug(ejbStore:  + getKey().getId());
}

public void ejbLoad() {
  super.ejbLoad();
  log.debug(ejbLoad:  + getKey().getId());
}

public void reject(final String note) {
  if (log.isDebugEnabled())
log.debug(reject request begin:  + getKey().getId() +  with note:  +
note +  current status:  + getStatus());

  //Assure proper status
  //
  if (getStatus() != RequestEntity.STATUS_PENDING)
throw
  new EJBException(Cannot reject request in non-pending status);

  //Configure new status
  //
  setStatus(RequestEntity.STATUS_REJECTED);

  //Configure note
  //
  setNote(note);

  //Debug
  //
  if (log.isDebugEnabled())
log.debug(reject request end:  + getKey().getId() +  with note:  +
getNote() +  current status:  + getStatus());
}

Thanks.
-AP_









How can I reload (stop/start) an application-client with startup=true property set?

2002-03-11 Thread Alex Paransky

I have an application client which starts up when server is started.  This
client is a timer which causes certain session to execute every 30 seconds
or so.

The problem occurs when I redeploy my application by dropping a new .EAR
file.  While the application is re-deployed, the old client continues to run
along with the instance of the new client.  How can I terminate the old
client when the server re-deployes the application?

I have been thinking about a couple ways, but have not tried any of these
yet:

1. Perhaps the client's main thread will get an InterruptedException when
the server re-deploys.  I can use this to terminate the old client.  This is
just a guess.  I am not sure if this indeed happends.

2. I could setup a socket listener in the client to listen on a particular
port for a quit command.  The new instance would first post a quit command
on that port, and then proceed to take over and listen.  This way, each new
instance will signal to the old one to stop before starting.

Are there better ways to stop an old client?  Hopefully, they will also be
portable.

Thanks.

-
-AP_
See my profile at
http://www.myprofiles.com/member/view.do?profileId=128






How can I perform an action when web user is first logged on?

2002-03-03 Thread Alex Paransky

I would like to keep lastLogonDate for my users.  However, with the J2EE
security model it does not appear that I can inject any processing between
the time when user is authenticated and a forward to the target url occurs.

Did anyone solve this problem.  If so, could you share your solution?

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant





RE: Orion 1.5.4 - M-N Relationship chokes (?)

2002-02-16 Thread Alex Paransky

I got the same result.  At first, I thought it had something to do with the
fact that I was still using non Local interfaces (since 1.5.3 does not have
support for Local interfaces yet), however, trying a small example returned
the same exception.  I am not sure how these guys tested their N-M
relationship support, but it does not appear to be working as of yet.

For now, I am sticking with 1.5.3.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Phillip Ross
Sent: Friday, February 15, 2002 9:25 PM
To: Orion-Interest
Subject: Re: Orion 1.5.4 - M-N Relationship chokes (?)


Yeah i get the same thing... was wondering if i was just doing something
wrong.

I'll send an update when i get it working.


--- Ray Harrison [EMAIL PROTECTED] wrote:
 Resend - it didn't post the first

time:---
-


---

 Hello -
 For the hell of it I decided to test M-N relationships in the latest
release
 of Orion (1.5.4). I
 started by trying to work with some of Monson-Haefel's examples - the
result
 was the same as that
 below. To simplify it, I just created a couple of test entities, each with
a
 collection based
 reference to the other entity. Using local interfaces. The 1-N
relationships
 seem to work just
 fine. I am wondering if I am missing something in the M-N relationship
 construction.

 otest1Local:
 // Collection ref to otest2
 public Collection getOtest2s( );
 public void setOtest2s(Collection otest2s);

 otest1EJB:

 // abstract methods
 public abstract Collection getOtest2s( );
 public abstract void setOtest2s(Collection otest2s);

 There is a similar setup for the other entity. The relationship references
 are (from ejb-jar.xml):


 relationships
 ejb-relation
   ejb-relation-nameotest1-otest2/ejb-relation-name
   ejb-relationship-role
  ejb-relationship-role-name
otest1-has-many-otest2
/ejb-relationship-role-name
   multiplicityMany/multiplicity
   relationship-role-source
 ejb-nameotest1/ejb-name
   /relationship-role-source
   cmr-field
   cmr-field-nameotest2s/cmr-field-name
 cmr-field-typejava.util.Collection/cmr-field-type
   /cmr-field
 /ejb-relationship-role

 ejb-relationship-role
   ejb-relationship-role-name
   otest2-has-many-otest1
   /ejb-relationship-role-name
   multiplicityMany/multiplicity
   relationship-role-source
 ejb-nameotest2/ejb-name
   /relationship-role-source
   cmr-field
cmr-field-nameotest1s/cmr-field-name
   cmr-field-typejava.util.Collection/cmr-field-type
   /cmr-field
   /ejb-relationship-role
  /ejb-relation
 /relationships



 As I said earlier, the faithful 1-many relationships work. When changed to
an
 m-n relationship, as
 the entity jar is being deployed it comes back with the following:


 Auto-deploying testorion (New server version detected)...
 Auto-deploying server.jar (No previous deployment found)...
 java.lang.NullPointe
 rException
 at com.evermind._eh._hg(.:120)
 at com.evermind._eh._de(.:173)
 at com.evermind._ef._de(.:292)
 at com.evermind._em._nvc(.:395)
 at com.evermind._eq.init(.:63)
 at com.evermind._ed._aa(.:186)
 at com.evermind._ai._kmd(.:526)
 at com.evermind._aj._kmd(.:287)
 at com.evermind._aj._vxb(.:119)
 at com.evermind.server.ApplicationServer._sxc(.:1308)
 at com.evermind.server.ApplicationServer._ige(.:1265)
 at com.evermind.server.ApplicationServer._vxb(.:1003)
 at com.evermind._cxb.run(.:89)
 at java.lang.Thread.run(Thread.java:536)
 at com.evermind._bt.run(.:47)


 =
 and then doesn't deploy of course. Before I submit a bug for this - did I
 miss something somewhere
 or is this legit?

 Cheers!
 Ray

 __
 Do You Yahoo!?
 Yahoo! Sports - Coverage of the 2002 Olympic Games
 http://sports.yahoo.com



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com






RE: Orion 1.5.4 - M-N Relationship chokes (?)

2002-02-16 Thread Alex Paransky

I was able to use M-N relationship in 1.5.3, although it did create 2
different tables and did not act as expected.  But, I was able to have it
working.  With this version (1.5.4) it does not work, period.  So, I cannot
really move onto the 1.5.4 version until this problem is fixed.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ray Harrison
Sent: Saturday, February 16, 2002 5:10 PM
To: Orion-Interest
Subject: RE: Orion 1.5.4 - M-N Relationship chokes (?)


I think 1.5.4 has enough stable changes in it to move forward (I was
particularly interested in
the JMS changes and a few other items), and the 1-N relationships still seem
to work, but I would
like to know how they tested the N-M feature. I used local interfaces, and
ejb2.0 style CMP/R.

Ray
--- Alex Paransky [EMAIL PROTECTED] wrote:
 I got the same result.  At first, I thought it had something to do with
the
 fact that I was still using non Local interfaces (since 1.5.3 does not
have
 support for Local interfaces yet), however, trying a small example
returned
 the same exception.  I am not sure how these guys tested their N-M
 relationship support, but it does not appear to be working as of yet.

 For now, I am sticking with 1.5.3.

 -AP_
 http://www.alexparansky.com
 Java/J2EE Architect/Consultant

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Phillip Ross
 Sent: Friday, February 15, 2002 9:25 PM
 To: Orion-Interest
 Subject: Re: Orion 1.5.4 - M-N Relationship chokes (?)


 Yeah i get the same thing... was wondering if i was just doing something
 wrong.

 I'll send an update when i get it working.


 --- Ray Harrison [EMAIL PROTECTED] wrote:
  Resend - it didn't post the first
 

time:---
 -
 
 --
--
 ---
 
  Hello -
  For the hell of it I decided to test M-N relationships in the latest
 release
  of Orion (1.5.4). I
  started by trying to work with some of Monson-Haefel's examples - the
 result
  was the same as that
  below. To simplify it, I just created a couple of test entities, each
with
 a
  collection based
  reference to the other entity. Using local interfaces. The 1-N
 relationships
  seem to work just
  fine. I am wondering if I am missing something in the M-N relationship
  construction.
 
  otest1Local:
  // Collection ref to otest2
  public Collection getOtest2s( );
  public void setOtest2s(Collection otest2s);
 
  otest1EJB:
 
  // abstract methods
  public abstract Collection getOtest2s( );
  public abstract void setOtest2s(Collection otest2s);
 
  There is a similar setup for the other entity. The relationship
references
  are (from ejb-jar.xml):
 
 
  relationships
  ejb-relation
ejb-relation-nameotest1-otest2/ejb-relation-name
ejb-relationship-role
   ejb-relationship-role-name
 otest1-has-many-otest2
 /ejb-relationship-role-name
multiplicityMany/multiplicity
relationship-role-source
  ejb-nameotest1/ejb-name
/relationship-role-source
cmr-field
cmr-field-nameotest2s/cmr-field-name
  cmr-field-typejava.util.Collection/cmr-field-type
/cmr-field
  /ejb-relationship-role
 
  ejb-relationship-role
ejb-relationship-role-name
otest2-has-many-otest1
/ejb-relationship-role-name
multiplicityMany/multiplicity
relationship-role-source
  ejb-nameotest2/ejb-name
/relationship-role-source
cmr-field
 cmr-field-nameotest1s/cmr-field-name
cmr-field-typejava.util.Collection/cmr-field-type
/cmr-field
/ejb-relationship-role
   /ejb-relation
  /relationships
 
 
 
  As I said earlier, the faithful 1-many relationships work. When changed
to
 an
  m-n relationship, as
  the entity jar is being deployed it comes back with the following:
 
 
  Auto-deploying testorion (New server version detected)...
  Auto-deploying server.jar (No previous deployment found)...
  java.lang.NullPointe
  rException
  at com.evermind._eh._hg(.:120)
  at com.evermind._eh._de(.:173)
  at com.evermind._ef._de(.:292)
  at com.evermind._em._nvc(.:395)
  at com.evermind._eq.init(.:63)
  at com.evermind._ed._aa(.:186)
  at com.evermind._ai._kmd(.:526)
  at com.evermind._aj._kmd(.:287)
  at com.evermind._aj._vxb(.:119)
  at com.evermind.server.ApplicationServer._sxc(.:1308)
  at com.evermind.server.ApplicationServer._ige(.:1265)
  at com.evermind.server.ApplicationServer._vxb(.:1003)
  at com.evermind._cxb.run(.:89)
  at java.lang.Thread.run(Thread.java:536)
  at com.evermind._bt.run(.:47)
 
 
  =
  and then doesn't deploy of course. Before I submit a bug for this - did
I
  miss something somewhere
  or is this legit?
 
  Cheers!
  Ray
 
  __
  Do You Yahoo!?
  Yahoo! Sports

RE: IllegalStateException

2002-01-28 Thread Alex Paransky



You 
mention that one of the entity beans contains a timer, but you have not 
mentioned how are you holding on to that timer. Is it a "Static" reference 
in the entity bean or is it a Member of the EJB? Container could 
physically remove the EJB from memory at any time, how are you dealing with 
this?

A 
typical Timer implementation uses a thread. You cannot start or stop 
threads in an EJB object. If you want to use a timer, you might want to 
consider using an external object that lives outside of EJB and triggers events 
on a periodic basis. If you need access to that object you might want to 
create an RMI object, and deploy it into the orion JNDI tree so you can have 
access to it from EJB.

-AP_

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus 
  HoemSent: Monday, January 28, 2002 3:33 AMTo: 
  Orion-InterestSubject: 
  IllegalStateExceptionHi!I have a strange problem 
  which I can't find a solution to. I am running a system with a two 
  message-driven beans and a couple of entity beans. They are all listening to 
  (and able to publish messages to) the same Topic. One of the entity beans 
  contains a Timer with a couple of TimerTasks that publish messages to the 
  topic that tells to mdb:s to do different things. I also have a jsp that 
  refreshes itself every couple of minutes. When the system has been up and 
  running for a while I suddenly get a very strange error. When the 
  self-refreshing jsp-page (or load any other jsp-page connected to the system) 
  is loaded I get 
  "java.lang.IllegalStateException: 
  Transaction expired (Committed)" and a reference to the 
  line in the jsp where I try to connect to the Home interface and run the 
  create(), findByPrimaryKey() or findAll() methods. Does anybody know why this 
  happens and have a sollution?I log all the messages sent to the topic, and 
  the timer-bean keeps sending messages after the error 
  occurs...Thanks,Magnus--Magnus 
  Hoem[EMAIL PROTECTED]Phone: +46-8-343206Cell: 
  +46-733-343206


RE: javax.naming.NameNotFoundException

2002-01-23 Thread Alex Paransky

Well, from CMSAuthorisationEJB, the ejb-ref-name is CMSUsersEntityEJB but
in your code you are using CMSUsersEntityEJBHome
(CMSAuthorisationEJBClass.java).

-AP_

-Original Message-
From: Chris Francis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 4:39 AM
To: 'Alex Paransky'; Orion-Interest
Cc: Chris Francis
Subject: RE: javax.naming.NameNotFoundException




OK here's some of the relevant files. Lookups are fine from the
web service but I included web.xml aswell...
ejb-jar.xml does include the ejb-ref tags. I also deploy an
application-client.xml. Maybe I shouldn't do this?

Chris.


-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: 23 January 2002 00:14
To: Orion-Interest
Cc: [EMAIL PROTECTED]
Subject: RE: javax.naming.NameNotFoundException


Yes, you do (bean to bean as well)

Show some code of how you are trying to lookup the bean, and something from
your deployment descriptor (ejb-jar.xml)...

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Chris Francis
Sent: Tuesday, January 22, 2002 7:55 AM
To: Orion-Interest
Subject: RE: javax.naming.NameNotFoundException



I meant within the session tag in ejb-jar.xml I shouldn't need
something like the following:
ejb-ref
ejb-ref-nameblah/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homeblahHome/home
remoteblahEJB/remote
/ejb-ref
I should only need this if I'm trying to refer to an EJB in a different
jar file? I might then need the ejb-link tag aswell.
But anyhow, I did put these in just to check, but it didn't make any
difference.

I guess I didn't explain things very well below. The beans all work,
I can look them all up and use them from the associated web application
and Orion doesn't grumble about anything on start up. It's only the bean
to bean lookup that fails. This is why I'm confused as to what is going on.

Chris.


-Original Message-
From: Magnus Rydin [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 12:00
To: Orion-Interest
Subject: SV: javax.naming.NameNotFoundException


Hi Chris,

You only need a application-client.xml for your application-clients.

Your EJBs DO want to have references to any resources they are to use in
their ejb-jar.xml entries.
Why did you NOT put them there (ie what are you refering when you say that
you dont need to) ?

WR

 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]För Chris Francis
 Skickat: den 22 januari 2002 12:21
 Till: Orion-Interest
 Ämne: FW: javax.naming.NameNotFoundException




 Hi All,
 I'm tearing my hair out trying to get this to work.
 I have a couple of entity beans and a session bean.
 Everything deploys OK. The session needs to access the
 two entities. I've seen the examples but they look to be
 the same as what I've got. The ejb's are not in a jar but
 all live in the same package hence directory. This means
 I shouldn't need ejb-ref tags within my ejb-jar.xml, and
 I shouldn't need a application-client.xml at all. However,
 it appears to make little difference as to whether they are
 there or not. So it's something else. The only thing is,
 I've run out of ideas! Anyone out there suggest something?

 Chris.






RE: Client access to UserTransaction

2002-01-23 Thread Alex Paransky
Transactions on the client are an optional feature which Orion chooses not
to support.  In general, client transactions are dangerous since they could
lock up the server for a long time.  Instead of doing client transactions,
create a session bean, and wrap that with the transaction attribute of your
choice.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Shawn Pourchot
Sent: Wednesday, January 23, 2002 11:08 AM
To: Orion-Interest
Subject: Client access to UserTransaction


I sent this to support but maybe someone on this list has already come
across this problem:

I'm having problems getting the UserTransaction for external clients. The
following is basically how I'm trying to get at it:

env.put(Context.PROVIDER_URL,"ormi://localhost/app");
Context ctx = new InitalContext(env);

UserTransaction ut =
(UserTransaction)ctx.lookup("java:comp/UserTransaction");

I've noticed via running the console ("java -jar orion.jar -console") that
the local server does have a UserTransaction listed for my app, but the
"ormi//localhost/app" does not.  Is there a way to remotely get a hold of
the UserTransaction?


FW: Integrating LOG4J into Orion...

2002-01-18 Thread Alex Paransky

One more time, the last one did not show up

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 11:09 AM
To: Orion-Interest
Subject: Integrating LOG4J into Orion...


I have a full EJB/JSP application running with Orion.  Is there a preferred
method of initializing LOG4J in this situation?

Looking at the LOG4J documentation, they mention using a startup servlet to
do the initialization.  I am concerned as to how this would work with the
CLASSLOADER hierarchy.  If I initialize my LOG4J at the servlet (WEB) layer,
will the EJB's be able to see the initialized LOG4J or will they attempt to
re-initialize due to the different classloader?

Thanks.
-AP_





RE: can't figure out this one. need help: logging, reloading custom usermanager class

2002-01-14 Thread Alex Paransky

Can you be a little bit more specific as to what is not working?  I just
spend 2 days trying to get EJBUserManager to work, and I am happy to report
that I was successful.  I assume your functions are getting called, so you
have properly registered your user manager is the orion-application.xml.
What specifically is not working?

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jesse Schoch
Sent: Friday, January 11, 2002 11:21 AM
To: Orion-Interest
Subject: can't figure out this one. need help: logging, reloading custom
usermanager class


ok so i tried to write a custom usermanager but it will not work and will
not give me any clue as to why.  I have followed the directions on the
support site, and have turned on -verbosity 10, i think i may have had it
wrong the first time i compiled it but i don't know how to find out what
version of my class i am using.

Is there a way to see the date of the class file that's loaded?  how do you
insure that it is reloaded?  i've done touch application.xml web.xml and
every other xml that i can think of.

here is my code. it compiles fine, and this is from my active login system
so i'm pretty sure the code works.  how do i get the damn logging to work?
System.out.println() does not show up on my logs or STDOUT from running
orion.jar

package jesse;

import java.util.*;
import com.orionsupport.security.SimpleUserManager;
import java.sql.*;
import java.io.*;
import javax.sql.*;
import javax.naming.*;
//
// fuck some shit up with da user manager.
//

public class uM extends SimpleUserManager
{
private Map users  = new HashMap();
protected boolean userExists( String username )
{
boolean result = false;
try
{
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jdbc/mysql);
Connection con = ds.getConnection();
Statement st = con.createStatement();
Statement st2 = con.createStatement();
String q = select count(*) from stamps.users where
username='+username+';
ResultSet rs = st.executeQuery(q);
int test = rs.getInt(1);
if (test == 1)
{
result = true;
}
if (result){}
else {System.out.println(user:  +username+ does not 
exist\n);}
con.close();
}
catch (SQLException e)
{System.out.println(SQL error: +e);}
catch (NamingException er)
{System.out.println(jndi naming error+ er);}
return result;

}

  protected boolean checkPassword( String username, String password )
{
boolean result = false;
try
{
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jdbc/mysql);
Connection con = ds.getConnection();
Statement st = con.createStatement();
Statement st2 = con.createStatement();
if (userExists(username))
{
String q = select password user_id from stamps.users where
username='+username+';
ResultSet rs = st.executeQuery(q);
while (rs.next())
{
String u = rs.getString(2);
String p = rs.getString(1);
String q2 = select password('+password+');
ResultSet rs2 = st2.executeQuery(q2);
rs2.next();
String enpass = rs2.getString(1);
if (p.equals(enpass))
{
result = true;
users.put(username,u);
}
}
}
if (result){}
else {System.out.println(user:  +username+ failed pass check\n);}
con.close();
}
catch (SQLException e)
{System.out.println(SQL error: +e);}
catch (NamingException er)
{System.out.println(jndi naming error+ er);}
return result;
}
  protected boolean inGroup( String username, String groupname )
{
return true;
}
  protected String getUID(String username)
{
String result = (String)users.get(username);
return result;
}
}





RE: deploying ejb without jar'ing

2002-01-09 Thread Alex Paransky

Yes you can,

1. Configure an application deployment at directory app with app/META-INF
(I'll call my app directory app for this example)
2. Inside of app/META-INF/application.xml add your ejb module, let's call it
model
3. Create a directory app/model
4. Create a directory app/model/META-INF and put ejb-jar.xml in it
5. Update orion-application.xml and put a librarty path=path to your
classes pointing to where your EJB classes live

Follow standard procedures to deploy an application (i.e. updating
server.xml etc...)

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Morten Wilken
Sent: Wednesday, January 09, 2002 1:10 AM
To: Orion-Interest
Subject: deploying ejb without jar'ing


im sure ive come across this... can i deploy ejb's directly from a
filestructure instead fo jarring them first? and if so how?

sincerely
Morten Wilken





RE: Help!

2002-01-09 Thread Alex Paransky
Title: Message



Most 
likely, your .jsp page is too large. I think there is a limit of 64K per 
method, and since the JSP page all get's generated into a single method, you 
might be exceeding that. Try using dynamic includes instead of static 
includes, or if you are not using includes at all, try to break up the page and 
use dynamic includes.

-AP_

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of 
  NihilistSent: Wednesday, January 09, 2002 6:41 AMTo: 
  Orion-InterestSubject: Help!
  Can anybody explain this error to me:
  
  Error parsing JSP page /process/index.jsp Error creating jsp-page 
  instance: java.lang.VerifyError: (class: __jspPage1_process_index_jsp, method: 
  _jspService signature: 
  (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) 
  Illegal target of jump or branch
  
  It 
  can't be replicated on a consistent basis, it seems to pop up, then go away, 
  all by itself. And that's disturbing... Gotta be able to trust the 
  app server!
  
  Thanks,
  Michael
  
  -Michael LaccettiDeveloper, Eldan 
  Software[EMAIL PROTECTED]
  


How to get target page on the loginError page...

2002-01-09 Thread Alex Paransky

After the user has entered improper login information, I want the loginError
page to contain a link to the page that the user was going to along with all
the necessary parameters.  Is there a way to get this target information
from the errorPage and generate a link?

I am trying to avoid having the user to press the back button to attempt
re-login again.

Thanks.
-AP_





Best way to add user records to EJBUserManager...

2002-01-07 Thread Alex Paransky

I am using EJBUserManager for security in Orion.  What is the best way to
update users?  Should I directly use EJBUser EJB or use the API's in the
UserManager.  If UserManager is the answer, then how do I get access to it
while running in Orion?

Thanks

-AP_





Using RMI objects with Orion...

2001-12-21 Thread Alex Paransky

In one instance, I have created an RMI object (extending Remote and using
RMIC to compile), put it into the Orion hosted JNDI tree, and was able to
use it from a SessionObject running in Orion.

In another instance, I need Orion to callback onto my client.  So I
created another RMI object in the client (so the client is acting as a
server, in a way):

Remote:
public interface EventListener extends Remote {
  public void event(int status) throws RemoteException;
}

Implementation (in the client side):
public class Listener extends UnicastRemoteObject implements EventListener {
  public Listener() throws RemoteException {
  }

  public void event(int status) {
System.out.println(Event:  + status +  recevied on the client!);
  }
};

Attempting to call server (session is Stateless Session Bean) from client:
session.play(1, content.mpg, new Listener());

Trying to pass this RMI object from the client to the server I get the
following exception:

Exception in thread main com.evermind.server.rmi.OrionRemoteException:
Error (de-)serializing object: __Proxy0
at com.evermind.server.ejb.EJBUtils.cloneObject(.:352)
at
ControlSession_StatelessSessionBeanWrapper0.play(ControlSession_StatelessSes
sionBeanWrapper0.java:101)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._dr._fm(.:79)
at com.evermind._bs.run(.:62)
at connection to individualmusic.com/64.172.193.203 as admin
at
com.evermind._dn.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(.:1446)
at com.evermind._dn.invokeMethod(.:1369)
at com.evermind._yd.invoke(.:53)
at __Proxy2.play(Unknown Source)
at com.indnet.enseo.server.test.Client.main(Unknown Source)

Nested exception is:
java.io.NotSerializableException: __Proxy0
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at com.evermind.server.ejb.EJBUtils.cloneObject(.:340)
at
ControlSession_StatelessSessionBeanWrapper0.play(ControlSession_StatelessSes
sionBeanWrapper0.java:101)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._dr._fm(.:79)
at com.evermind._bs.run(.:62)
at connection to individualmusic.com/64.172.193.203
at com.evermind.server.rmi.OrionRemoteException._ge(.:130)
at com.evermind._dn._cte(.:1556)
at com.evermind._dn.run(.:475)
at java.lang.Thread.run(Thread.java:484)

Any idea?

Thanks.
-AP_





Various levels of security, how do you do it?

2001-11-13 Thread Alex Paransky

We are in a process of developing an application, and are looking for ways
to implement security, we have the following requirements:

1. There are operations that certain members cannot perform in general
2. There are operations that certain members cannot perform relative to an
object (owner vs non-owner)

What are some of the mechanims that you are using to deal with these
problems.  I assume, in the first case you can use deployment descriptor.
Also isInRole query can be made to determine if particular option should be
shown to the user during the .JSP processing.

The second option is a bit more difficult to implement, since a particular
user can be an owner of some objects but not others.  How can this
requirement be implemented?

Thanks.
-AP_





RE: 1.5.3 is out, but what is so new?

2001-10-17 Thread Alex Paransky

These are really MINOR changes for 4 months of development.  I have reported
a pretty serious bug (#599) with stack traces, and instructions on how to
duplicate, and that's not fixed.  For all this time, these changes seem
superficial.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Russell White
Sent: Wednesday, October 17, 2001 6:11 AM
To: Orion-Interest
Subject: 1.5.3 is out, but what is so new?


I am somewhat disapointed in the new release. My EJB 2.0 local interfaces
are
still not supported. Bummer. Still at least there are some bug fixes.

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com





RE: problem using primary key class with orion

2001-10-11 Thread Alex Paransky

And if you are using EJB 2.0 style CMP, hopefully, the primaryKey is defined
as:

public abstract String getPrimaryKey();
public abstract void setPrimaryKey(String key);

or as a

public String primaryKey;

in a 1.0 style CMP.

Methods.

Right?

-AP_



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jack C. Miller
Sent: Thursday, October 11, 2001 2:32 PM
To: Orion-Interest
Subject: problem using primary key class with orion



I am having some difficulty getting orion to use my primary key class
during deployment.  I have an EJB AnyPerson with which I use a primary key
class AnyPersonKey that has a public java.lang.String primaryKey field.
During deployment, I get a compilation error that looks like the CMP isn't
being generated properly.

The orion-ejb-jar.xml file looks fine, as does the ejb-jar file.  I get
this error on deploy:

Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling
C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for
prim-key-class and type of the specified primkey-field: Cannot convert
from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class
java.lang.String

It doesn't seem to recognize that I'm using a primary key class at all,
even though it is mapped in the orion-ejb-jar.xml file.

Has anyone got a working example of this?  I'm tired of tweaking the
orion-ejb-jar to try and get it working.

 Here's a snippet from my orion-ejb-jar.xml:

enterprise-beans
entity-deployment name=AnyPerson location=AnyPerson
wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3
table=AnyPerson data-source=jdbc/SQLServerDSCore
primkey-mapping
cmp-field-mapping
fields
cmp-field-mapping
name=primaryKey persistence-name=primaryKey /
/fields
/cmp-field-mapping
/primkey-mapping
cmp-field-mapping name=FirstName
persistence-name=FirstName /
cmp-field-mapping name=LastName
persistence-name=LastName /
cmp-field-mapping name=Salutation
persistence-name=Salutation /
cmp-field-mapping name=Username
persistence-name=Username /
cmp-field-mapping name=Password
persistence-name=Password /
cmp-field-mapping name=Address1
persistence-name=Address1 /
cmp-field-mapping name=Address2
persistence-name=Address2 /
cmp-field-mapping name=City
persistence-name=City /
cmp-field-mapping name=StateProvId
persistence-name=StateProvId /
cmp-field-mapping name=PostalCd
persistence-name=PostalCd /
cmp-field-mapping name=Country
persistence-name=Country /
cmp-field-mapping name=HomePhone
persistence-name=HomePhone /
cmp-field-mapping name=Fax
persistence-name=Fax /
cmp-field-mapping name=Email
persistence-name=Email /
cmp-field-mapping name=LastModTime
persistence-name=LastModTime /
cmp-field-mapping name=ModifiedBy
persistence-name=ModifiedBy /


and the matching ejb-jar.xml file:

ejb-jar
   descriptionGenerated deployment descriptors/description
  enterprise-beans
entity
ejb-nameAnyPerson/ejb-name

homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home

remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote

ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class
persistence-typeContainer/persistence-type

prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class
reentrantfalse/reentrant
cmp-fieldfield-nameprimaryKey/field-name

cmp-fieldfield-nameFirstName/field-name/cmp-field

cmp-fieldfield-nameLastName/field-name/cmp-field

cmp-fieldfield-nameSalutation/field-name/cmp-field

cmp-fieldfield-nameUsername/field-name/cmp-field

cmp-fieldfield-namePassword/field-name/cmp-field

cmp-fieldfield-nameAddress1/field-name/cmp-field

cmp-fieldfield-nameAddress2/field-name/cmp-field

cmp-fieldfield-nameCity/field-name/cmp-field

cmp-fieldfield-nameStateProvId/field-name/cmp-field

cmp-fieldfield-namePostalCd/field-name/cmp-field

cmp-fieldfield-nameCountry/field-name/cmp-field

cmp-fieldfield-nameHomePhone/field-name/cmp-field

cmp-fieldfield-nameFax/field-name/cmp-field

cmp-fieldfield-nameEmail/field-name/cmp-field

cmp-fieldfield-nameLastModTime/field-name/cmp-field

cmp-fieldfield-nameModifiedBy/field-name/cmp-field
primkey-fieldprimaryKey/primkey-field
/entity

Thanks!

Jack Miller







RE: How to access Orion EJBs from C++ ?

2001-10-04 Thread Alex Paransky

There is no direct way that I know of, however, there are a lot of indirect
ways. For example:

1. Wrap a JSP/XML layer around the beans, so that you can submit requests
via http, this providing a WEB service type of an approach to your
interface.  You can then use HTTP from C to execute calls.

2. Wrap your stateless session beans with a CORBA wrapper using a TIE
approach, then you can use CORBA to interface to the beans.

3. You can always use JNI to start a runtime in your C environment, and
proceed to call various functions, kind of cumbersome, but possible if you
need to do this.

Quite frankly, I prefer method (1), since after you are done with it, you
can use the services from different environments including Visual Basic,
C/C++.  We are using the above mechanism as an interface from Flash, since
our client is written in Flash and we need to talk to our EJB services.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of J.D. Bertron
Sent: Thursday, October 04, 2001 5:30 AM
To: Orion-Interest
Subject: How to access Orion EJBs from C++ ?
Sensitivity: Private


I need a way to access my EJBs on Orion using C++.
Normally I would try RMI over IIOP, but Orion doesn't support that.
Should I look into OC4J ?

Thanks.





RE: Help with HTTP Internal Server Error

2001-10-04 Thread Alex Paransky

Disable IE's friendly error messages, then you should see a stack trace...

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 7:09 AM
To: Orion-Interest
Subject: Help with HTTP Internal Server Error





Hi

I'm getting a HTTP 500 Internal Server error when I try to access one of my
JSP
pages.

The following is written to the web-access.log file, but no other errors are
reported anywhere.

GET /budgeting/Test?event=accountSummaryaccType=SAVNG HTTP/1.1 500 482

Does the 482 at the end mean something or is there anywhere else where I
could
get more information about the error.

Just to make things interesting, the page works fine if I run it through
Tomcat.

Thanks

Derek Hardy







E-mail communication is not secure and may be intercepted by a third party.
This
message is confidential to the intended addressee. If you are not the
intended
addressee, please inform us immediately and then delete this message. Virgin
Direct does not accept responsibility for changes made to this message after
it
was sent. Although Virgin Direct believes this e-mail is free of any virus
or other
defect which may affect a computer, it is the responsibility of the
recipient to ensure
that it is virus free and Virgin Direct does not accept any responsibility
for any loss
or damage arising in any way from it's use.

Virgin Direct Personal Financial Service Ltd is regulated by the Personal
Investment Authority for life insurance, pension and unit trust business and
represents only the Virgin Direct marketing group. Registered office:
Discovery
House, Whiting Road, Norwich NR4 6EJ, UK. Registered in England No. 3072766.

The Virgin One account is a secured personal bank account with The Royal
Bank
of Scotland plc. It is provided by Virgin Direct Personal Finance Ltd which
is
a representative only of Virgin Direct Personal Financial Service Ltd.
Registered office: Waterhouse Square, 138-142 Holborn, London EC1N 2TH, UK.
Registered in England no 3414708.

The Virgin Deposit Account is a personal deposit account with The Royal Bank
of
Scotland plc administered by Virgin Direct Personal Financial Service Ltd.

All telephone calls are recorded and may be monitored.









RE: EJB Primary Key of int

2001-10-04 Thread Alex Paransky

User Integer...

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Marc Rabil
Sent: Thursday, October 04, 2001 1:56 PM
To: Orion-Interest
Subject: EJB Primary Key of int


I can not figure out how to get Orion's EJB CMP to work when the primary key
is an 'int'.  In the deployment descriptor (ejb-jar.xml), the code is:

prim-key-classint/prim-key-class

When starting up Orion, I get:

Class 'int' not found

Any help will be greatly appreciated,

Marc





RE: OR mapping (1/* relationship between 2 entity beans)

2001-10-03 Thread Alex Paransky

Orion is pretty good as far as keeping the relationships in
orion-ejb-jar.xml current.  We have not been using BMP, but mostly 2.0 style
CMP, and this particular area has been working for us without a flaw.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of George Mardale
Sent: Wednesday, October 03, 2001 2:18 AM
To: Orion-Interest
Subject: OR mapping (1/* relationship between 2 entity beans)


Hello everyone,

I have an OR mapping that involves 2 entity beans, named Group and User,
like in the following example:

public class GroupBean implements EntityBean
{
...
List users;



public addUser(User user)
{

users.add(user);
}
}

So, I have an 1/* relationship.

What I want to know is what modifications do I have to made to
orion-ejb-jar.xml to reflect this OR mapping? On the orionsupport site,
there are 2 example for advanced OR mapping, one involving a relationship
between 2 entity bean, but in an one/one relationship (one entity bean has
as an attribute other entity bean, not a list of them), and one involving a
relationship between an entity bean and a regular JavaBean (not an entity
bean). I tried to combine those two to solve my situation, but it didn't
worked out.

If you are kind enough to give me an example, I will greatly appreciated.

Thanks for listening,

George.








RE: Design strategy

2001-10-03 Thread Alex Paransky

Yes, I have noticed the same behavior in 2.0 CMP style beans.  What I have
been doing is simply alerting orion-ejb-jar.xml, and changing one of the
tables into another one.  So, instead of 2 tables, there is actually 1
table.  I am not sure, if this is working correctly during transaction, in
other words, I think orion still keeps two separate relationships in memory
until a commit is done.  So GroupBean.add(user), will not find group in
the user entity until a commit and update to the relational table.  This
is somewhat frustrating and I am hoping will get fixed with the next release
of Orion (not clear when that will happen since we have not seen any updates
for over 9 months now!).

-AP_



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of George Mardale
Sent: Wednesday, October 03, 2001 5:49 AM
To: Orion-Interest
Subject: Re: Design strategy


Hello Daniel,

What I said about those 2 tables, was strictly Orion-related. You are right,
in designing relational databases, a n-m relationship will be normalized by
introducing 1 (one) table and two 1-n relationships between the existing 2
tables (Group, User) and the new one (let's say GroupUser). Thus, we will
avoid redundancy.

In Orion, as far as I know, if I use something like this:

public class GroupBean 
{
...
List users;
...
}

public class UserBean...
{
...
List groups;

}

to simulate a *-* relationship, Orion will create, by OR mapping, a table
for my first 1-* relationship Group-User (let's say the table is named
Group_users) and another table for my other 1-* relationship User-Group
(let's say the table is named Users_group). Of course, these 2 tables
(Group_users and Users_group) are identical, but I think Orion will not know
that these two 1-n relationships represent in fact one n-m relationship.

Please be advised that his is only my supposition about Orion. I don't know
if I'm right about this one but I'll be glad if someone can clarify this
issue for me. I was trying to find out for some days, how Orion handles *-*
relationships, but I wasn't lucky to find something useful.

best regards,
George.

- Original Message -
From: Daniel Lopez [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 5:04 PM
Subject: Re: Design strategy


 Hi George,

 I don't know about EJB, as we don't use them, but having an extra table to
 represent an n-m relationship is a well stablished technique when
designing
 relational databases. AFAIK there's no other way to do that while
providing
 db-enforced consistency and avoiding redundancy. You represent a logical
n-m
 relationship, you create a new table that implements two real 1-n
relationships,
 thus creating one extra table. I don't see where you get two extra tables
per
 relationship from.
 regards,
 D.

 George Mardale wrote:

  Hello Owen,
 
  Thank you for your kind response. Yesterday, while waiting for a
response on
  the Orion mailing list, we thought of a design somehow close to yours.
We
  thought that using 3 different tables (ClassRoles, GroupRoles,
UserRoles)
  was a good ideea.
 
  But today, we came up with a solution that we thought would benefit of
  Orion's powerful features. Thanks to Alex Paransky who helped us a lot,
we
  tried to redesign the system, using OR mapping. So, we designed
something
  like this:
 
  public class GroupBean implements EntityBean
  {
  ...
  List users; //1..* relationship with UserBean
  }
 
  public class UserBean implements EntityBean
  {
  
  List groups; //1..* relationship with GroupBean
  }
 
  Practically, we broke every  *..* relationship (in this case Group(*) -
  User(*)) into two 1..* relationships. And so on, for every relationship
that
  we have:
  Class(1) - Group(*)
  User(*) - Role(*)
  Group(*) - Role(*)
  Class(*) - Role(*)
 
  As far as I know, Orion will create an additional table in the database
that
  will store the relationship. For example, for users attribute in
GroupBean,
  it will create a new table Group_users, besides the existing Group and
User
  tables. Practically, for every *-* relationship will have 2 more tables
in
  the database. Is that correct?
 
  What I want to know is if this design is correct. Are there any
drawbacks
  that would make this system work unproperly (may be some OR mapping
  problems)?
 
  Tkanks,
  George.
 
  - Original Message -
  From: Owen Fellows [EMAIL PROTECTED]
  To: Orion-Interest [EMAIL PROTECTED]
  Sent: Tuesday, October 02, 2001 10:58 AM
  Subject: RE: Design strategy
 
   Hello,
  
   We have done a similar thing were we don't know the type of class
assign
  the
   role except at runtime.
  
   The solution we used was to have an Object Type table (contain Class,
  Group,
   User).
   Then created a interface which was Roleable (i.e. this class can have
a
  role
   assigned).
   In the database you can store each assignment in a different table

RE: Design strategy

2001-10-02 Thread Alex Paransky

1) It seemed to me that a class was merely a container of N groups.  From
your example, it seems that group (chemistry professor) was just a
sub-group of a group called (Professor).  In other words:

Professor
 |
 +-- Chemistry Professor

I was not aware of other fields in the Class, and this was the reason for
the suggestion.  Since you can still attach roles to the groups, from the
example above Chemistry Professor could inherit the roles from the
Professor Group

2) You can use standard many/many relationships for this.  I have had
limited success with this.

-AP_


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of George Mardale
Sent: Monday, October 01, 2001 10:06 PM
To: Orion-Interest
Subject: RE: Design strategy


Hello Alex,

Thank you for your prompt response. Your suggestions are excellent.

You're right, the analysis is not correct. I tried to reduce the problem to
a
simple example. To avoid complexity, I just limited the relationships to
1..*.
Maybe the example is not the best, but I only wanted to know if I could
model
the Abstract being bean in Orion.

There are still 2 issues we are unclear about:
1. what are the advantages of dumping entity Class? (Class has specific
fields
that Group does not have)
2. could you please detail the best way to implement  a *-* relationship in
Orion?

Thanks,
George.





ejbLoad is getting called during a transaction

2001-10-02 Thread Alex Paransky

I have a piece of code that looks like this:

debug(Before);

for (int i = 0; i  values.length; i++)
  programValueEntityHome.create(us, attribute, values[i]);

debug(After);

For some reason an ejbLoad is sneaking into the picture.  As you can see
from the following output, when Before prints the size of certain
collection 1 (because I just added something to it), then before the
ejbCreate is called in responce to programValueEntityHome.create(...) an
ejbLoad sneaks in.  The ejbLoad, clears the collection again because it
refreshes from disk.  Now during the operation and after, the collection
remains EMPTY.

Before Object: ProgramEntityBean_PersistenceManager812@5bfb5d values
collection: [com.indnet.common.model.base.EntityKey@268 id: 616] size: 1
ejbLoad: ProgramEntityBean_PersistenceManager812@5bfb5d
During create of value Object:
ProgramEntityBean_PersistenceManager812@5bfb5d values collection: [] size: 0
After Object: ProgramEntityBean_PersistenceManager812@5bfb5d values
collection: [] size: 0

Does any one have any ideas why would an ejbLoad sneak in?  The entire
operation is done in a single transaction.  I am puzzled as to why this
might be happening?

This all is occuring during the create operation here is a stack trace
when excpetion occurs because the collection is EMPTY:

javax.ejb.EJBException: Attribute: Actors not a valid attribute for program:
3971
at
com.indnet.symbiosis.model.entity.program.ProgramEntityBean.setValues(Progra
mEntityBean.java:344)
at
com.indnet.symbiosis.model.entity.program.ProgramEntityBean.createDefaultVal
uesFor(ProgramEntityBean.java:196)
at
com.indnet.symbiosis.model.entity.program.ProgramEntityBean.addProgramType(P
rogramEntityBean.java:157)
at
com.indnet.symbiosis.model.entity.program.ProgramEntityBean.ejbPostCreate(Pr
ogramEntityBean.java:63)
at
ProgramEntityHome_EntityHomeWrapper813.create(ProgramEntityHome_EntityHomeWr
apper813.java:806)
at
com.indnet.symbiosis.service.programmanagement.ProgramManagementServiceBean.
createProgram(ProgramManagementServiceBean.java:50)
at
ProgramManagementService_StatelessSessionBeanWrapper26.createProgram(Program
ManagementService_StatelessSessionBeanWrapper26.java:70)
at
com.indnet.symbiosis.client.jsp.admin.programadmin.pagegen.beans.ProgramCrea
teBean.initialize(ProgramCreateBean.java:106)
at com.slsideas.pagegen.beans.Bean.processRequest(Bean.java:106)

Thanks.
-AP_





RE: Design strategy

2001-10-01 Thread Alex Paransky



I am 
not sure if your analysis is quite correct. The Group(1)-User(*) 
relationship is not quite correct, since User might want to be in two groups at 
the same time. For example, John can be in the group of Chemistry 
Professor, as well as Substitute Teacher. Your relationship implies that a 
user can ONLY be in 1 group. Similarly, your relationships to the Role 
imply that the same Role cannot be shared among various 
entities.

In fact, most of the relationships are N-to-N type of 
relationships. A User CAN be in more than one Group, and the same Role CAN 
be applied to more than 1 
User/Group.

So here is my 
suggestion:

1. Dumpeither Class or 
Group
2.Assuming you dump Class, add a parent/children 
relationships to Group as inGroup(1)-Group(*), to indicate that one parent 
group can contain multiple children groups.
3. Add a Group(*)-Role(*) relationship to indicate that 
a group can have many roles and a single role can be in many 
groups
4. Add a User(*)-Role(*) relationship to indicate that 
a user can have multiple roles, and a role can accommodate many 
users
5. Finally, add a Group(*)-User(*) relationship to 
indicate that a user can be a part of many groups and a group can contain many 
users

Your Group will contain a method called getRoles() as 
well as getAllRoles() which would scan up the Group tree and return a set of all 
the Roles assigned. Finally, your user would have a method called 
getRoles() and getAllRoles() to return just the roles assigned directly to the 
user, or all the roles that the user has access to through the assignment to a 
Group(s) or otherwise.

You can also keep a side entity called UserRole which 
would be maintained as you change the Group/User/Role relationships 
dynamically. This will allow you to quickly answer the question 
isInRole(User, Role).

This can be done with 
OrionServer.

-AP_


  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of George 
  MardaleSent: Monday, October 01, 2001 8:29 AMTo: 
  Orion-InterestCc: [EMAIL PROTECTED]Subject: Design 
  strategy
  Hi everybody,
  
  During our last application design, I have 
  encountered the following issue and I don't know ifOrion can handled it 
  in a specific manner:
  
  I have a hierarchy of users that consists of 3 
  levels: Class, Group, User. A class can contain one or more groups, a group 
  can contain one or more users. For instance, an instance of Class can be 
  "professor", an instance of Group can be "chemistry professor", and an 
  instance of User can be "John" (John is a chemistry professor). We have 1..* 
  relationship for each of the 3 levels. Of course, theseare entity beans. 
  Furthermore, we have another entity bean, called Role. The ideea is that every 
  User canhave a Role in an application (for instance, John can be a 
  SystemAdmin inan application), but also, a Group or a Class 
  canhave one or moreRoles (instead of assigning a Role to every 
  User in a Group or a Class, we assign the Role to the whole Group or 
  Class,saving a lot of time this way, thus all the User in the respective 
  Group or Classwill have that Role). For all the Roles, we need to 
  keepthe id of the person(s) to whomthe Role was assigned.But 
  only at run-time Ican find out the type of the component in the user 
  hierarchy (either Class, Group, or User), to which the rolehas 
  beenassigned.In other words, an attribute in class Role has to 
  store a value that is sometimes an instance of Class, sometimes an instance of 
  Group and sometimes an instance of User.
  
  Analyzing this issue, we came along with this 
  diagram:
  

  
  1  *
  Abstract being -- 
  Role

   | inherits
  --
  |  
   |   
  |
  |  
   |   
  |
  Class Group 
  User
  1--- * 
  1- *
  
  How can we achieve this in Orion? Is it 
  possible?
  
  Thank you for your time,
  best regards,
  George.
  


RE: STRANGE (and BIG!!!) PROBLEM

2001-09-27 Thread Alex Paransky



Try 
this:

java -Xmx128M 
-Dcom.slsideas.pagegen.SystemRoot=. -jar %ORION_HOME%\orion.jar 


-AP_


  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of OMurchu, 
  OisinSent: Thursday, September 27, 2001 12:53 AMTo: 
  Orion-InterestSubject: RE: STRANGE (and BIG!!!) 
  PROBLEM
  check in the orion-application.jar file in your 
  application-deployments\APP_NAME directory - I tend to get multiple 
  library path="./lib" / tags in it, which causes Orion to hang. 
  (Orion adds these into tags in itself upon deployment for some strange 
  reason.)
  
-Original Message-From: Magnus Rydin 
[mailto:[EMAIL PROTECTED]]Sent: 26 September 2001 
20:17To: Orion-InterestSubject: SV: STRANGE (and 
BIG!!!) PROBLEM
My 
bet is that you have something strange in your ejb-jar.xml that causes Orion 
to start eating memory like popcorn.
It 
would be great to hear the typo that led to this situation once you've found 
it.
WR

  -Ursprungligt meddelande-Från: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]För Mirel 
  RataSkickat: den 26 september 2001 18:50Till: 
  Orion-InterestÄmne: Re: STRANGE (and BIG!!!) 
  PROBLEM
  
  
It's a little bit strange... I'm implementing security 
on my application and customizing my xml descriptors. All went ok (I had 
Basic Authentication) and I wanted to implement security also in the 
EJBs methods. I change the ejb-jar.xml source and this text appears 
:

Auto-deploying UbicuaCMP.jar (Classes were 
updated)... The compiler has run outof memory. Consider using 
the "-J-mxnumber" command line option to increase the 
maximum heap size.Error compiling D:\Orion155\ubicua/UbicuaCMP.jar: 
Syntax error in sourceOrion/1.5.2 initialized

I work with 512MB memory... so I don´t think is a 
problem of lack of memory... I try to use also the 
"-J-mxnumber" command but it doesnt work !. Can anybody 
explain where and how works this command ? (a sample example will be 
wellcomed 
!)


RE: External EJB Client

2001-08-28 Thread Alex Paransky

Make sure your default directory (the directory you are in) is JUST above
the META-INF where the application-client.xml resides.  So if you are in the
default directory, and do a ls or DIR you will see META-INF.  Then, start
your client from this directory regardless of where the client is located.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ed Brown
Sent: Monday, August 27, 2001 8:44 PM
To: Orion-Interest
Subject: External EJB Client



I'm trying to call an EJB from outside of the Orion enviornment.

I get the following stack trace:

javax.naming.NamingException: META-INF/application-client.xml resource not
found
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(JAX)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.init(InitialContext.java:198)
at
com.ekb.email.ReceiptMailServer.getContext(ReceiptMailServer.java:62)
at com.ekb.email.ReceiptMailServer.init(ReceiptMailServer.java:85)
at com.ekb.email.ReceiptMailServer.main(ReceiptMailServer.java:224)

-

I'm using ant to build and deploy. I defined the following in the build.xml
file:
   target name=ejb-meta-inf depends=prepare
  copy file=${etc.dir}/ejb-jar.xml
tofile=${lib.dir}/ejb/META-INF/ejb-jar.xml /
  copy file=${etc.dir}/application-client.xml
tofile=${lib.dir}/ejb/META-INF/application-client.xml /
   /target


Does anyone know why I'm still getting the exception?

Thanks in advance.



Ed Brown


_
This mail sent via toadmail.com, web e-mail @ ToadNet - want to go fast?
http://www.toadmail.com





RE: List rant (was RE: Virtual DirecTory -- Help)

2001-08-26 Thread Alex Paransky

You are missing the point.  The list is broken most of the time.  You send
your message at 6:21am, I get it at 7:32am.  More than 1 hour later.
Sometimes, I get at 2 hours later, 20 hours later, 24 hours later.  Many
times I don't get it at all.  What good is it to have a list that you cannot
rely on.  If you have a problem which needs addressing fast, you don't want
to wait for 24 or 48 hours while the list sends the question to all the
people.  Sometimes, it does not send at all.  So many of us have been making
1, 2, 3, or more postings to the list, just to PUSH the damn message
through.

Furthermore, I hate having to type a long detailed response, only to not
have it go through on the list.  It's a waste of my time.

So, I think, this list should be closed, and people redirected to the Yahoo
list.

By the way, I just posted to the Yahoo list and I see the message in my mail
box 3 minutes later.  That's response time!

-AP_

PS:  Let's see how long it takes this message to get propagated.  It's
Sunday, August 26th, 2001 8:28am PST.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Hani Suleiman
Sent: Sunday, August 26, 2001 6:21 AM
To: Orion-Interest
Subject: List rant (was RE: Virtual DirecTory -- Help)


I have to add my voice to this. This is just an example of the problems
that can happen when a lot of well meaning and eager people do what seems
to be a good idea, yet turns out to do nothing beyond make the problem
they're trying to fix even worse.

The people who end up suffering are those who need actual help with Orion,
as every new mailing list further dilutes the pool of competent
knowledgable people present on any given resource that can provide help.

I for one will NOT be joining any orion related mailing lists other o-i,
and I would go so far as asking you all to likewise resist the temptation
of 'encouraging' these other lists, for the following reasons:

- Any individual list is 'worth less', as it's only a subset of the
community.

- The barrier of entry to Orion is higher (who wants to join 4 mailing
lists just to ask a simple question?)

- Bias that is very likely to occur (MY support site/list/whatever is
cooler/better/richer than yours!)

- Turf issues. (don't crosspost to our list! Go away and ask *that*
list! Oh now you come to us after you failed on *that* list?)

- Same old same old. Does anyone truly think the rash of 'is Orion
dead/gone/sold out' and 'have Magnus/Karl given up/died/become
hermits/taken up fishing/sold out' questions that pop up every couple of
months iks going to dimish? On the contrary, now you get per-list
threads about the exact same thing! Wheee!

Of course, feel free to ignore all this and join six orion related lists
and sign up with four orion support websites. More power to you.

Hani

On Sun, 26 Aug 2001, Mike Cannon-Brookes wrote:

 Guys,

 I'm both for and against this new Orion list, but surely we're solving
 NOTHING other than creating more email if we send support messages to both
 lists? (Meaning everyone subscribes to both lists, everyone get's
everything
 twice)

 Is there a sensible way we can resolve this? Personally I'd say use o-i
when
 it's up, only use the egroups list when there's a problem.

 -mike


 Mike Cannon-Brookes :: [EMAIL PROTECTED]

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



  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Daniele
  Arduini
  Sent: Sunday, August 26, 2001 7:14 PM
  To: Orion-Interest
  Subject: Re: Virtual DirecTory -- Help
 
 
  Eddie Post wrote:
Hellu,
   
I am trying to exculde my JSP files from the war file, such that the
designer can easily change them without my help (withoud deployment,
etc...).
   
Anyone any idea/advice how to do that as I tried many things, but
appearantly am not able to succeed ?
   
 
  1. create an orion user and an orion group.
  2. chown -R orion:orion /opt/orion
  3. Run Orion as orion user from a shell script:
  ...
  umask 002   # IMPORTANT!
  cd /opt/orion
  java -jar orion.jar $@
  ...
 
  4. add your designer to the orion group.
  in /etc/group:
  ...
  orion::204:designer
  ...
 
  5. use symbolic links to enable access .jsp pages from
  designer's home.
 
 
  bye,
  Daniele Arduini
 
 
What I tried  (I am running on a linux box, RedHat 7.0, Orion
  1.5.1, JDK
1.3) ?
- First I changed the jsp entry in my web.xml, from a relative
  path to a
absolute path, that doesn't work, as he always starts looking
  from within
the web application:
---
 servlet
  servlet-nameMainWebShop/servlet-name
  display-nameMain page of web-shop/display-name
  description/description
   
   
  jsp-file/home/development/vwr/web-client/jsp/webwinkel/html/main
  .jsp/jsp-
file
 /servlet
--
- I did add a virtual directoy entry in 

I think, I will start a support site too....

2001-08-22 Thread Alex Paransky

(in style of Andy Rooney)

I see everyone is starting their support sites for Orion.  I think it's a
poor solution for something that's broken, mainly, this mailing list.  How
many support sites do we actually have now?  Why is it such a problem to
keep the mailing list up and running?

Now, we need to post the message to at least 3 places to make sure it gets
maximum exposure.  I think I will start a support site, that posts to all
other support sites, just so that people don't have to search various
support sites for help.

I don't mind so many support sites starting up, I just think they are
starting up for poor reasons and fragmenting what little knowledge we
already have about this product.

What is the problem with the list?  Why is it down half the time? I hope
it's not running under Orion...

-AP_





RE: ORA-01000: maximum open cursors exceeded Exception

2001-08-15 Thread Alex Paransky

Denis, the code you were looking at was not posted by me.  In the case of
ORA-01000 we have a system built entirely with CMP beans and Orion 1.5.2.
We have a program, we call the loader, which loads a number of entities into
the database after initial database refresh.  It is during the execution of
the loader, that we get this error.  The loader, is doing a lot of
ejbCreate() and finds to create the relationships between the entities.  So
to answer your original question, there is only 1 user.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS
STRAIGHT
Sent: Tuesday, August 14, 2001 5:45 PM
To: Orion-Interest
Subject: Re: ORA-01000: maximum open cursors exceeded Exception


Then again, it could be normal operation and we just need to increase the
number
of cursors allowed.

This is possible but I doubt it.  Setting up the limit seems like a
cheap way to fix the problem... for now.  How many concurrent users are
executing this code?  And how long does it take for the error to occur?

I also noticed that your closing everything in its own try block inside
the finally block.  Of course you realize that if the line  rs.close();
for example, causes an error (because rs == null for example) then the
code would get thrown into the catch block and nothing else would get
closed.  At the very least I would remove the try - catch that is inside
the finally block.

Cheers,
Dennis



Alex Paransky wrote:

 We are not using any direct connections to the database.  We only use CMP
 beans.  So there might be something wrong in the way I am using the beans,
 or the could be a bug in Orion which is leaving a lot of cursors open.
Then
 again, it could be normal operation and we just need to increase the
number
 of cursors allowed.

 -AP_

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of The
 elephantwalker
 Sent: Tuesday, August 14, 2001 10:55 AM
 To: Orion-Interest
 Subject: RE: ORA-01000: maximum open cursors exceeded Exception

 Here's a bit of code I use alot in ejb's. The handler interface only has
one
 method, processResultSet. The getDBConnection is a helper method. Notice
how
 the connection, resultset and statement are closed. If these are'nt
executed
 in the proper order, and within a finally clause, oracle will glorck on
you
 with the 01000 error.

 If you have many cmp beans, it could be that your maximum's for open
cursors
 is like 50 or so. It should be up around 300. This can be modified in the
 ora.ini file.

 Regards,

 the elephantwalker

 private void executeStatement(String statement, Handler handler)
throws
 RemoteException {

 Connection con = null;
 ResultSet rs = null;
 Statement stmt = null;

   try{
 con = getDBConnection();
 stmt = con.createStatement();
 rs = stmt.executeQuery(statement);
 handler.processResultSet(rs);

 } catch (Exception ex){

throw new EJBException( ex.getMessage());
 }  finally {

try{
   rs.close();
   stmt.close();
   con.close();
   rs = null;
   stmt = null;
   con = null;
 } catch (SQLException se){

throw new EJBException( se.getMessage());

 }

}
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar
 Sent: Tuesday, August 14, 2001 10:26 AM
 To: Orion-Interest
 Subject: RE: ORA-01000: maximum open cursors exceeded Exception

 This is because you have too many opened statements and Resultsets.  Make
 sure that you close your statements and resultsets properly.  Try to debug
 the jdbc activity by setting the following properties.

 jdbc.debug=true
 debug.jdbc.check=true
 jdbc.connection.debug=true

 Kesav Kumar Kolla
 Voquette Inc
 650 356 3740(W)
 510 889 6840(R)
 VoquetteDelivering Sound Information
 -Original Message-
 From: Alex Paransky [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 13, 2001 6:51 PM
 To: Orion-Interest
 Subject: ORA-01000: maximum open cursors exceeded Exception

 We have been using the server more frequently now, and are getting this
 exception from time to time.  Does any one know why does this exception
 occur and what to do about it?  Could I be doing something wrong in my CMP
 2.0 Entity Beans?  I am using Orion Server 1.5.2.
 Thanks.
 -AP_

 Embedded Exception -
 com.evermind.server.rmi.OrionRemoteException: Database error:
 at

InterestEntityHome_EntityHomeWrapper532.findExistingEntity(InterestEntityHom
 e_EntityHomeWrapper532.java:54)
 at

InterestEntityHome_EntityHomeWrapper532.findByPrimaryKey(InterestEntityHome_
 EntityHomeWrapper532.java:269)
 at

com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
 n.getValue(InterestManagementServiceBean.java:229

RE: ORA-01000: maximum open cursors exceeded Exception

2001-08-15 Thread Alex Paransky

It is a fairly small number of objects, but about 30 CMP's or so.  At the
time we are loading general things into our database (Lookup beans) such as
Languages, States, Countries, Gender, Income, Interests, and other such
objects which later act as Lookup or relational objects.  It could very
well be, that we are running out of cursors on the Oracle's side, and we
need to increase the count.

When a user is created, this is when the actual problem occurs, we are doing
ejbFinds all over the place for all of these entities.  So for example, to
create a user, there would be an EJB find executed on Languages, States,
Countries, Gender, Income, Interests, and a whole bunch of other things.
How long do cursors stay open?  Is Orion using cursors? When do they get
closed?

It is quite silly at this point, but we are not using transactions for our
Loads, so there is A LOT OF UPDATE/SELECT type of calls going out to the
database.  I am sure, if we wrap all the loaders into a single transaction
this problem might go away.

At this point, I am not sure if I want to open a bug, since it's so
difficult to reproduce, and I am not even sure if it is a bug.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of The
elephantwalker
Sent: Wednesday, August 15, 2001 2:56 PM
To: Orion-Interest
Subject: FW: ORA-01000: maximum open cursors exceeded Exception


resend, first one didn't catch...

-Original Message-
From: The elephantwalker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 12:46 AM
To: Orion-Interest
Subject: RE: ORA-01000: maximum open cursors exceeded Exception


Alex and Dennis,

This is from experience with oracle. The try/catch in the finally is
necessary for these statements, or they won't compile.

Also, it looks like Alex's problem has to do with the number of open cursors
with cmp's and orion. I would be interested in the cmp.size() for a
findAll() on this just to see what the maximum problem could be. It could be
that his maximum cursor can't handle 1000 simulataneous open cursors, even
though his application is regularly producing this activity.

If its a small number of cmp's, then Karl and Magnus need to know...its a
bug.

Regards,

the elephantwalker


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS
STRAIGHT
Sent: Tuesday, August 14, 2001 5:45 PM
To: Orion-Interest
Subject: Re: ORA-01000: maximum open cursors exceeded Exception


Then again, it could be normal operation and we just need to increase the
number
of cursors allowed.

This is possible but I doubt it.  Setting up the limit seems like a
cheap way to fix the problem... for now.  How many concurrent users are
executing this code?  And how long does it take for the error to occur?

I also noticed that your closing everything in its own try block inside
the finally block.  Of course you realize that if the line  rs.close();
for example, causes an error (because rs == null for example) then the
code would get thrown into the catch block and nothing else would get
closed.  At the very least I would remove the try - catch that is inside
the finally block.

Cheers,
Dennis



Alex Paransky wrote:

 We are not using any direct connections to the database.  We only use CMP
 beans.  So there might be something wrong in the way I am using the beans,
 or the could be a bug in Orion which is leaving a lot of cursors open.
Then
 again, it could be normal operation and we just need to increase the
number
 of cursors allowed.

 -AP_

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of The
 elephantwalker
 Sent: Tuesday, August 14, 2001 10:55 AM
 To: Orion-Interest
 Subject: RE: ORA-01000: maximum open cursors exceeded Exception

 Here's a bit of code I use alot in ejb's. The handler interface only has
one
 method, processResultSet. The getDBConnection is a helper method. Notice
how
 the connection, resultset and statement are closed. If these are'nt
executed
 in the proper order, and within a finally clause, oracle will glorck on
you
 with the 01000 error.

 If you have many cmp beans, it could be that your maximum's for open
cursors
 is like 50 or so. It should be up around 300. This can be modified in the
 ora.ini file.

 Regards,

 the elephantwalker

 private void executeStatement(String statement, Handler handler)
throws
 RemoteException {

 Connection con = null;
 ResultSet rs = null;
 Statement stmt = null;

   try{
 con = getDBConnection();
 stmt = con.createStatement();
 rs = stmt.executeQuery(statement);
 handler.processResultSet(rs);

 } catch (Exception ex){

throw new EJBException( ex.getMessage());
 }  finally {

try{
   rs.close();
   stmt.close();
   con.close();
   rs = null;
   stmt = null;
   con = null

RE: ORA-01000: maximum open cursors exceeded Exception

2001-08-14 Thread Alex Paransky

I am using CMP beans only, so i am not controlling any connections directly.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS
STRAIGHT
Sent: Tuesday, August 14, 2001 10:55 AM
To: Orion-Interest
Subject: Re: ORA-01000: maximum open cursors exceeded Exception


I've seen this before with my code.  It has nothing to do with Orion.
Make sure you are closing your Connections, Statements,
PreparedStatements, CallableStatements and ResultSets.  The proper place
to do this is in a finally statement so the code will always get
executed, even if an exception is thrown.

BTW:  SQL Server seems to allow you to be sloppy in closing
connections.  I guess (think) SQL Server somehow closes them for you.
Oracle, however, does not :)

-DStraight



 Nusairat, Joseph F. wrote:

 I believe u get this error when you are opening tooo many connections.
 (duh)

 In other words make sure you are closing your Statements or
 PreparedStatements.

 If you are, then check with your DBA to see how many current cursors
 you are allowed and see if you could get that increased.

 Joseph Faisal Nusairat, Sr. Project Manager
 WorldCom
 tel: 614-723-4232
 pager: 888-452-0399
 textmsg: [EMAIL PROTECTED]

 -Original Message-
 From: Alex Paransky [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 13, 2001 6:51 PM
 To: Orion-Interest
 Subject: ORA-01000: maximum open cursors exceeded Exception

 We have been using the server more frequently now, and are getting
 this
 exception from time to time.  Does any one know why does this
 exception
 occur and what to do about it?  Could I be doing something wrong in my
 CMP
 2.0 Entity Beans?  I am using Orion Server 1.5.2.

 Thanks.
 -AP_

 Embedded Exception -
 com.evermind.server.rmi.OrionRemoteException: Database error:

 at

InterestEntityHome_EntityHomeWrapper532.findExistingEntity(InterestEntityHom

 e_EntityHomeWrapper532.java:54)
 at

InterestEntityHome_EntityHomeWrapper532.findByPrimaryKey(InterestEntityHome_

 EntityHomeWrapper532.java:269)
 at

com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea

 n.getValue(InterestManagementServiceBean.java:229)
 at

com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea

 n.getValue(InterestManagementServiceBean.java:254)
 at

com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea

 n.getTree(InterestManagementServiceBean.java:193)
 at

com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea

 n.getTrees(InterestManagementServiceBean.java:202)
 at

com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea

 n.getRootTrees(InterestManagementServiceBean.java:218)
 at

InterestManagementService_StatelessSessionBeanWrapper8.getRootTrees(Interest

 ManagementService_StatelessSessionBeanWrapper8.java:849)
 at

com.indnet.symbiosis.client.jsp.pagegen.services.UserMaintenanceService.init

 ialize(UserMaintenanceService.java:291)
 at

com.slsideas.services.GenericServiceManager.initialize(GenericServiceManager

 .java:99)
 at
 com.slsideas.pagegen.contexts.ServerContext.init(ServerContext.java:197)

 at

com.slsideas.pagegen.servlets.BaseControllerServlet.doGet(BaseControllerServ

 let.java:238)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
 at com.evermind._cxb._abe(Unknown Source)
 at com.evermind._cxb._uec(Unknown Source)
 at com.evermind._io._twc(Unknown Source)
 at com.evermind._io._gc(Unknown Source)
 at com.evermind._if.run(Unknown Source)





RE: ORA-01000: maximum open cursors exceeded Exception

2001-08-14 Thread Alex Paransky

We are not using any direct connections to the database.  We only use CMP
beans.  So there might be something wrong in the way I am using the beans,
or the could be a bug in Orion which is leaving a lot of cursors open.  Then
again, it could be normal operation and we just need to increase the number
of cursors allowed.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of The
elephantwalker
Sent: Tuesday, August 14, 2001 10:55 AM
To: Orion-Interest
Subject: RE: ORA-01000: maximum open cursors exceeded Exception


Here's a bit of code I use alot in ejb's. The handler interface only has one
method, processResultSet. The getDBConnection is a helper method. Notice how
the connection, resultset and statement are closed. If these are'nt executed
in the proper order, and within a finally clause, oracle will glorck on you
with the 01000 error.

If you have many cmp beans, it could be that your maximum's for open cursors
is like 50 or so. It should be up around 300. This can be modified in the
ora.ini file.

Regards,

the elephantwalker


private void executeStatement(String statement, Handler handler) throws
RemoteException {

Connection con = null;
ResultSet rs = null;
Statement stmt = null;


  try{
con = getDBConnection();
stmt = con.createStatement();
rs = stmt.executeQuery(statement);
handler.processResultSet(rs);

} catch (Exception ex){

   throw new EJBException( ex.getMessage());
}  finally {

   try{
  rs.close();
  stmt.close();
  con.close();
  rs = null;
  stmt = null;
  con = null;
} catch (SQLException se){

   throw new EJBException( se.getMessage());

}

   }
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar
Sent: Tuesday, August 14, 2001 10:26 AM
To: Orion-Interest
Subject: RE: ORA-01000: maximum open cursors exceeded Exception


This is because you have too many opened statements and Resultsets.  Make
sure that you close your statements and resultsets properly.  Try to debug
the jdbc activity by setting the following properties.

jdbc.debug=true
debug.jdbc.check=true
jdbc.connection.debug=true

Kesav Kumar Kolla
Voquette Inc
650 356 3740(W)
510 889 6840(R)
VoquetteDelivering Sound Information
-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 6:51 PM
To: Orion-Interest
Subject: ORA-01000: maximum open cursors exceeded Exception


We have been using the server more frequently now, and are getting this
exception from time to time.  Does any one know why does this exception
occur and what to do about it?  Could I be doing something wrong in my CMP
2.0 Entity Beans?  I am using Orion Server 1.5.2.
Thanks.
-AP_


Embedded Exception -
com.evermind.server.rmi.OrionRemoteException: Database error:
at
InterestEntityHome_EntityHomeWrapper532.findExistingEntity(InterestEntityHom
e_EntityHomeWrapper532.java:54)
at
InterestEntityHome_EntityHomeWrapper532.findByPrimaryKey(InterestEntityHome_
EntityHomeWrapper532.java:269)
at
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
n.getValue(InterestManagementServiceBean.java:229)
at
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
n.getValue(InterestManagementServiceBean.java:254)
at
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
n.getTree(InterestManagementServiceBean.java:193)
at
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
n.getTrees(InterestManagementServiceBean.java:202)
at
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
n.getRootTrees(InterestManagementServiceBean.java:218)
at
InterestManagementService_StatelessSessionBeanWrapper8.getRootTrees(Interest
ManagementService_StatelessSessionBeanWrapper8.java:849)
at
com.indnet.symbiosis.client.jsp.pagegen.services.UserMaintenanceService.init
ialize(UserMaintenanceService.java:291)
at
com.slsideas.services.GenericServiceManager.initialize(GenericServiceManager
.java:99)
at
com.slsideas.pagegen.contexts.ServerContext.init(ServerContext.java:197)
at
com.slsideas.pagegen.servlets.BaseControllerServlet.doGet(BaseControllerServ
let.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind._cxb._abe(Unknown Source)
at com.evermind._cxb._uec(Unknown Source)
at com.evermind._io._twc(Unknown Source)
at com.evermind._io._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)





NullPointerException during deployment...

2001-08-08 Thread Alex Paransky

I just spent 3 hours tracking a NullPointerException which occured during
deployment of an ejb-jar.xml (Orion 1.5.2 Windows 2000, JDK 1.3.1).  For the
benefit of everyone else:

If you get a NullPointerException without any other messages from orion
during deployment, check to make sure that any bean entities which are
referenced from deployed beans are also deployed.

For example (EJB2.0 CMP), if you have UserEntityBean which references
AddressEntity, as in:

class UserEntityBean ... {
  public abstract AddressEntity getAddress();
  public abstract void setAddress(AddressEntity address);
}

Make sure that you have also deployed AddressEntity bean in ejb-jar.xml The
same goes for orion-ejb-jar.xml.  Any beans that you reference which are not
deployed might cause a NullPointerException to occur during deployment.

-AP_





having to specify location attribute in orion-ejb-jar.xml...

2001-08-06 Thread Alex Paransky

For some reason, I always have to specify the location= attribute on every
ejb-ref-name in orion-ejb-jar.xml.  If I don't do this, the beans cannot
find each other through an ejb-ref tag.  I am using the link tag in
ejb-jar.xml, but that does not translate into a location attribute in
orion-ejb-jar.xml.

Has anyone else seen this problem.  Is this a bug?

Thanks.
-AP_





Difference between default-web-app and web-app with root attribute??

2001-08-05 Thread Alex Paransky

Inside of default-web-site.xml, what is the difference between indicating:

default-web-app application=default name=defaultWebApp /

AND

web-app application=default name=defaultWebApp root=/ /

Is there a functional difference between these two specifications?

Thanks.
-AP_





RE: Disappearing env-entry-mapping from orion-ejb-jar.xml

2001-07-21 Thread Alex Paransky

That's strange, we have made extensive modifications to our orion-ejb-jar in
the area of query specifications, and they seem to persist ok.  The thing we
could not get working is the max-tx-retry parameter keeps resetting to 3,
but Magnus said it was fixed in the next release, 1.5.3 I assume.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of elephantwalker
Sent: Friday, July 20, 2001 9:59 PM
To: Orion-Interest
Subject: RE: Disappearing env-entry-mapping from orion-ejb-jar.xml


not just env-entry-mapping, its just about everything in the
orion-ejb-jar.xml file.

This is bug 512. I had the problem with group-role mapping. Buts its the
same thing, when server restarts or redeploys the app the orion-ejb-jar.xml
is GENERATED and not COPIED.

You will have to regress to version 1.5.1 as a workaround.

Regards,

the elephantwalker


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Rian Schmidt
Sent: Friday, July 20, 2001 9:21 PM
To: Orion-Interest
Subject: Disappearing env-entry-mapping from orion-ejb-jar.xml


Hi,

Does anyone have any idea why we would be seeing an env-entry-mapping
disappear from orion-ejb-jar.xml upon deployment?  There is a stateless
session bean that reads a value
env-entry-mapping name=databaseTypeMSSQL/env-entry-mapping
from a stateless session beans entry in orion-ejb-jar.xml.
And upon deployment the first time, it spits out the right value over and
over (we're forcing it to read the value each time another bean uses the
stateless session bean to read it).  But when we restart the server, the
bean reports the default value instead of the mapped one.  What's more, the
entry is completely gone from the orion-ejb-jar.xml file.

I can provide more information, but I thought I'd check first if this smacks
of anything obvious.

Thanks,
Rian







RE: best way to build a link to work in different deploymentconfigurations??

2001-07-20 Thread Alex Paransky

Instead of deploying on different path, how about deploying in a different
website on a different port?

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian Thompson
Sent: Friday, July 20, 2001 8:02 AM
To: Orion-Interest
Subject: best way to build a link to work in different deployment
configurations??


I have an application that during development is deployed multiple times
with the following...
http://devwebsite/customerApp1
http://devwebsite/customerApp2

In production, I'd like to deploy the applications as...
http://customerApp1
http://customerApp2

In the first case file references would look like the following
img src=/customerApp1/images/logo.gif
while in the second case it should be
img src=/images/logo.gif

My question is what is the best way to handle file references (links,
images, etc) within the application to support both deployments. We could
use the request.getContextPath() as a prefix to all file references
img src=%=request.getContextPath()%/images/logo.gif
but to do this across an entire application seems like extra overhead. It
seems like there should be a more elegant solution. I've scoured the orion
doc to see if there is a way to do this through configuring websites and
webapps, but with no success. Has anyone discovered a better way??

Thanks.







RE: Bi-directional N-to-N support does it work in orion?

2001-07-03 Thread Alex Paransky

I believe bi-directional relationships were in the initial draft of the 2.0
EJB spec.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scot Weber
Sent: Tuesday, July 03, 2001 7:14 AM
To: Orion-Interest
Subject: Re: Bi-directional N-to-N support does it work in orion?


Current OrionServer 1.5.2 is EJB2.0PFD1 compliant, not EJB2.0PFD2.  Not
speaking for the developers, but merely surmising, I would suspect that
it will remain PFD1 until the spec is in final.  No sense chasing a
rabit down the hole! =)

- scot

Alex Paransky wrote:

 I read some time ago that Orion does not support bi-directional N-to-N
 relationships.  Recently (1.5.2) I created such a relationship and
initially
 Orion created TWO relationship tables.  Afterwards, I removed one of the
 tables, and updated orion-ejb-jar.xml to use the same table for both sides
 of the relationship.

 Question:  Is this type of usage supported in Orion 1.5.2?  Am I asking
for
 trouble?  Is anyone aware of any problems with using orion-ejb-jar.xml to
 manipulate the deployment descriptor in such a way?

 Thanks.
 -AP_

--

  scot weber - [EMAIL PROTECTED]
  -
  Given a choice between a folly and a sacrament, one should
  always choose the folly -- because we know a sacrament
  will not bring us closer to God and there's always a chance
  that a folly will. - Erasmus

  The only man who never makes a mistake is the man who
  never does anything. - Theodore Roosevelt.





RE: Question about port listener

2001-07-01 Thread Alex Paransky

Not everything using EJB has to BE an EJB.  In your example, any kind of EJB
would be a poor choice for a port listener, due to the
passivation/activation constraints that you have to deal with.  So:

a. If you choose to create a stateless session bean, the container could
create a number of them, causing all but the first one to fail (since only
one can really listen to the port at the same time).  Also, you have little
control over how a particular container will choose to create/remove your
stateless session beans.

b. If you create a statefull session bean, you might have a similar problem.
Also, someone has to create the bean to start the process.  Something has to
bootstrap the create mechanism.

c. Using Entity is out of the question since this is not what they were
created for.

What you really want to do, is write a small client application which does
what you need (i.e. listens on a port), and then posts a message into some
queue/topic.  At this point you can have an MDB listening on the port to
perform some action.  In the script to start your server, you can also start
up the client application which goes along with the server.

Weblogic allows you to register startup/shutdown classes, you can use this
facility to start your client automatically.

As far as creating a connection only once, you can use statics to initialize
the collection, and expose the functionality through stateless session
beans.  In this scenario EACH of your EJB servers in the cluster will open
such a connection (since they are not aware of each other).

The other way, is to create a RMI object, and put this object into the JNDI
name space.  Then some stateless session deployed on various servers could
all lookup this SINGLE RMI object and invoke methods on it.  This
introduces a single point of failure, but you need to decide if this is
acceptable to your implementation.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews
Sent: Sunday, July 01, 2001 3:54 PM
To: Orion-Interest
Subject: Re: Question about port listener



yes, but theoretically, EJBs aren't supposed to interact with the real
world, i.e. they're not supposed to manipulate files, open sockets, or do
anything useful unless it's through the container's services.

you're choices are:
1. do what you said, i.e. open a socket. it would be against the spec but
who cares if it works right?
2. if everyone's on the same network, look at using JMS, and then getting
your client to put a message in the JMS
3. open the socket from a servlet, not a bean, which is sort of the same as
option 1 but within the EJB spec.


- Original Message -
From: Karri Niemelä [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Saturday, June 30, 2001 3:03 AM
Subject: Question about port listener


 Question 1) Is it possible to build an bean, which is some sort of tcp
port
 listener?
 Idea is to listen for traffic on port and then fire an even/send a msg to
 queue if something is received

 Question 2) What if we have an 3rd party java api to connect some server
 using rmi
 (for an example an api which builds up an connection to short message
 center)
 Would it be possible to create an bean which builds up this connection(and
 does this only once),
 keeps it up and listens for method calls from clients and then sends them
 away










How to reference arrays when creating finders in orion-ejb-jar.xml???

2001-06-30 Thread Alex Paransky

I have a home finder method with the following signature:

Collection findByTypes(TypeEntity[] types) throws RemoteException;

Is there a way to implement this method using CMP by either directly writing
the query in ejb-jar.xml, or using orion-ejb-jar.xml method?  I am using
Orion 1.5.2.

Thanks.
-AP_





BUG: Show stopper!!!!! max-tx-retries

2001-06-22 Thread Alex Paransky

There seems to be a SERIOUS bug in Orion 1.5.2.  It turns out that you
cannot disable the max-tx-retries AT ALL!!!  Setting it to 0 removes it as
a TAG from orion-ejb-jar.xml.  The next time around, it adds
max-tx-retries=3.  There is NO WAY to disable the max-tx-retries.  This
seems like a serious problem, since there are cases when I do not want to
retry a transaction.

-AP_





Is location attribute always necessary in orion-ejb-jar.xml for properlookup operation?

2001-06-21 Thread Alex Paransky

Every time I deploy a bean, I seem to have to go into orion-ejb-jar and
update every new ejb-ref-name with the location attribute indicating where
on the naming tree the home can be found.  If I don't do this, I get all
kind of lookup errors.

Is there a solution to this, or is this normal?

-AP_
www: http://www.standardset.com
resume: http://www.standardset.com/resume_body.jsp





Question regarding usage of the transaction context...

2001-06-16 Thread Alex Paransky

In HTTP world a single HttpServletRequest ties together execution of
multiple Servlets on the same http request.  It is similar to the way a
Transaction ties together multiple API calls to various EJB objects.  Like a
common thread, both HttpServletRequest and a Transaction meander through
various servlets or APIs respectively.

Is there a way to achieve something similar to
HttpServletRequest.getAttribute/setAttribute functionality in the EJB world
in relation to Transactions?

In other words, I would like to attach some values to existing transaction,
and be able to retrieve these values in other methods (executing inside of
the transaction boundry) without having to explicitly alter the interfaces
of the EJBs.

Thanks.
-AP_






How to execute a SUM function???

2001-05-31 Thread Alex Paransky

I need to do something like this:

select sum(price) from lineitem;

I have an entity bean called LineItem, with a field called price
(getPrice()/setPrice(float)).  How can I make this work with Orion?

Thanks.
-AP_





Is ejbSelect supported in Orion 1.5.1???

2001-05-31 Thread Alex Paransky

I am trying to use ejbSelect method, but getting the following exception:

Auto-deploying model (ejb-jar.xml had been touched since the previous
deployment)... Error compiling
C:\work\individualnetwork\deployment\development\symbiosis\enterprise\server
\model: Illegal abstrac
t method in dependent class
com.indnet.symbiosis.service.adpricingplacement.strategy.user.saturation.Use
rSaturationEntityBean: public abstract double
com.indnet.symbiosis.service.adpricingplacement.st
rategy.user.saturation.UserSaturationEntityBean.ejbSelectTotalSaturation(com
.indnet.symbiosis.model.entity.user.UserEntity,java.util.Date,java.util.Date
)
Orion/1.5.1 initialized

My code looks like this:


  public abstract double ejbSelectTotalSaturation(UserEntity user, Date
fromDate, Date toDate);

The exception talks about dependent class, but this is a regular EJB CMP
bean (2.0 style).

Thanks.
-AP_





Colon missing from the Content-Location, in HTTP header...

2001-05-08 Thread Alex Paransky

We are looking at the header which orion returns, and it appears that there
is a : missing after the http//.  Is this a bug.  Is there something I can
do to put the colon after content location?

HTTP/1.1 200 OK
Date: Tue, 08 May 2001 16:52:18 GMT
Server: Orion/1.4.7
Content-Location: http//www.wilson.com:444/wilson/page1.jsp
Content-Length: 617
Set-Cookie: JSESSIONID=KLKOCNBKDAKB; Path=/
Cache-Control: private
Connection: Close
Content-Type: text/vnd.wap.wml


Thanks.
-AP_





RE: Simple Java Doubts

2001-05-08 Thread Alex Paransky

1. Use synchronization with the synchronized keyword

2. Since a server cannot open an http port to the remote client, I don't
think HTTP can be used from the server side to notify client of changes.
Client would have to either:
   a. Use polling, by making http requests every so often
   b. Use persistent socket connection to the server
   c. Use open http request strategy to always keep an http request
outstanding

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Santosh Kumar
Sent: Tuesday, May 08, 2001 8:17 AM
To: Orion-Interest
Subject: Simple Java Doubts


Question 1:
How does an elementary Singleton pattern based Object behave
in a multi-threaded environment? What is this phenomenon called? How do you
make such a Singleton Object thread safe?

Question 2: What are the two methods typically employed to notify remote
clients distributed over the Internet of events that take place on a
central server?  Like changes in the price of options, market depth, or an
order
execution?  What are the relative advantages/disadvantages of each of
these strategies?  Specifically, how can they be implemented in Java to
allow
for firewall tunneling over HTTP?










RE: Colon missing from the Content-Location, in HTTP header...

2001-05-08 Thread Alex Paransky

OOps, once more I spoke before looking.  Orion 1.4.8 corrected this
problem

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Tuesday, May 08, 2001 10:02 AM
To: Orion-Interest
Subject: Colon missing from the Content-Location, in HTTP header...


We are looking at the header which orion returns, and it appears that there
is a : missing after the http//.  Is this a bug.  Is there something I can
do to put the colon after content location?

HTTP/1.1 200 OK
Date: Tue, 08 May 2001 16:52:18 GMT
Server: Orion/1.4.7
Content-Location: http//www.wilson.com:444/wilson/page1.jsp
Content-Length: 617
Set-Cookie: JSESSIONID=KLKOCNBKDAKB; Path=/
Cache-Control: private
Connection: Close
Content-Type: text/vnd.wap.wml


Thanks.
-AP_





RE: Advanced OR mapping

2001-04-30 Thread Alex Paransky

I have been able to do amazing things with Orion's OR mapping.  What
specific problem are you having?  As you have described:

Product - ProductType
Product - Supplier - Country
Product - Packing Unit
Attribute - AttributeType
Media - MediaType
Price - Currency
Price - ClientType
Price - SalesTax


Are all unidirectional relationships and are supported directly by Orion.
The finders such as findProductsBy(ProductType),
findProductsBySupplier(Supplier) and findProductsBy(PackingUnit) are
directly supported by orion using EJB-QL (supplier = ?1, for example).

Product - Attribute(s)
Product - Price(s)
Product - Media(s)
Product - AccessoryProduct(s) (Product and AccessoryProduct as two
different ejbs)

is a 1-n relationship, and is also directly supported by Orion (in
ejb-jar.xml).

I belive all of these are supported by Orion, and you can write finder
methods for any of these using orion-ejb-jar.xml.  Please note that some of
the more complicated finder methods are NOT supported through ejb-jar.xml
(because ORION does not implement full EJB-QL, however, you can always use
orion-ejb-jar.xml to do such a find).

Here is an example of a more complicated finder that I have manged to get
working:

finder-method query=SELECT i.* FROM model_entity_Interest i,
symbiosis_model_entity_Node n WHERE i.nodeEntityId = n.id AND n.id = (SELECT
nn.parentNodeId FROM model_entity_interest ii, symbiosis_model_entity_Node
nn WHERE ii.nodeEntityId = nn.id AND ii.id = $1) partial=false
  !-- Generated SQL: SELECT i.* FROM model_entity_Interest i,
symbiosis_model_entity_Node n WHERE i.nodeEntityId = n.id AND n.id = (SELECT
nn.parentNodeId FROM model_entity_interest ii, symbiosis_model_entity_Node
nn WHERE ii.nodeEntityId = nn.id AND ii.id = ?) --
  method
ejb-namecom.indnet.symbiosis.model.entity.Interest/ejb-name
method-namefindParentByChild/method-name
method-params

method-paramcom.indnet.symbiosis.model.entity.interest.InterestEntity/met
hod-param
/method-params
  /method
/finder-method

This method will find a parent for a child in a tree (circular relationship
through external nodes).

-AP_






-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Joerg
Weishaupt
Sent: Sunday, April 29, 2001 10:42 AM
To: Orion-Interest
Subject: Advanced OR mapping


Hi,

I'm having some problems with the OR mapping, especially for
entity bean reference mappings.
Although I've gone thru the Advanced Object-Relational mapping
topic on orionsuppurt.com, I'm unable to transfer this to our
object model, i.e.:

EJB Product has references to
  - ProductType
  - Supplier which references to
  - Country
  - PackingUnit
and also has Collections of
  - Attributes which references to
  - AttributeType
  - Prices which references to
  - Currency
  - ClientType
  - SalesTax
  - Medias which references to
  - MediaType
  - AccessoryProducts which are of the same type as the Product itself.

So it's quite complicated and maybe someone can give me some
directions of what to do.
For me it's very important to see, whether for this model
Orion CMP works better (in regard to performance) than the
existing BMP, as I've seen that it's faster for simple EJB's

TIA
Joerg





Does Orion support container managed relationships among entities inmultiple EJB-JAR files???

2001-04-27 Thread Alex Paransky

I am trying to breakup my one giant ejb-jar file into different multiple
ejb-jar files, and I was wondering if Orion supports relationships between
two Container Managed Entity beans in different ejb-jar files.  Is there a
section in the SPEC that talks about this?

Thanks.
-AP_





Is this a 1.4.8 bug??

2001-04-27 Thread Alex Paransky

The following exception occurs when I move to 1.4.8, but DOES NOT occur in
1.4.7:

Exception in thread main com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back: java.lang.InternalError: Was not in used mode
at
ContentManagementService_StatelessSessionBeanWrapper4.createVideoContent(Con
tentManagementService_StatelessSessionBeanWrapper4.java:758)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._hw._oa(Unknown Source)
at com.evermind._jw.run(Unknown Source)
at connection to localhost/127.0.0.1 as admin
at
com.evermind._br.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(Unknown Source)
at com.evermind._br.invokeMethod(Unknown Source)
at com.evermind._di.invoke(Unknown Source)
at __Proxy2.createVideoContent(Unknown Source)
at
com.indnet.symbiosis.service.contentmanagement.test.Client.main(Client.java:
62)

Nested exception is:
java.lang.InternalError: Was not in used mode
at com.evermind.server.ejb.DataSourceConnection.release(Unknown
Source)
at
OptionEntityHome_EntityHomeWrapper390.findDefaultsByGroup(OptionEntityHome_E
ntityHomeWrapper390.java:654)
at
com.indnet.symbiosis.service.optionmanagement.common.Utility.findDefaultsByG
roup(Utility.java:106)
at
com.indnet.symbiosis.service.optionmanagement.contentoption.ContentOptionSer
viceBean.findLanguageDefaultOptions(ContentOptionServiceBean.java:54)
at
ContentOptionService_StatelessSessionBeanWrapper14.findLanguageDefaultOption
s(ContentOptionService_StatelessSessionBeanWrapper14.java:66)
at
com.indnet.symbiosis.service.contentmanagement.ContentManagementServiceBean.
setContentValue(ContentManagementServiceBean.java:363)
at
com.indnet.symbiosis.service.contentmanagement.ContentManagementServiceBean.
setVideoContentValue(ContentManagementServiceBean.java:481)
at
com.indnet.symbiosis.service.contentmanagement.ContentManagementServiceBean.
createVideoContent(ContentManagementServiceBean.java:101)
at
ContentManagementService_StatelessSessionBeanWrapper4.createVideoContent(Con
tentManagementService_StatelessSessionBeanWrapper4.java:708)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._hw._oa(Unknown Source)
at com.evermind._jw.run(Unknown Source)
at connection to localhost/127.0.0.1
at com.evermind.server.rmi.OrionRemoteException._ny(Unknown Source)
at com.evermind._br._mh(Unknown Source)
at com.evermind._br.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

Is this a 1.4.8 bug?  I am just calling a finder, and getting this
exception.

Thanks.
-AP_





Does any one else see any problems with latest PDF2?

2001-04-27 Thread Alex Paransky

Looking at the latest spec PFD2, it appears that it is not possible to
establish a unidirectional relationship between two entity beans in separate
ejb-jar.xml files.  With the removal of remote-ejb-name as a possible value
for role-souce it makes integration of two packages impossible without the
mess of taking and trying to merge two ejb-jar files into one.

Scenario 1:
We are developing an general accounting package.  Our clients need to
integrate with our package by establishing uni-directional relationships
from their CMP Entities into what we provide them.  Since they will not be
altering our ejb-jar (except for deployment) how can they reference our
beans?

Scenario 2:
Our accounting package contains a good number of CMP Entity beans.  Since
EJB A relates to B, and B relates to C, and C relates to D and E, and E
relates to G and so on. It is not possible to separate the ejb-jar into
multiple, smaller, ejb-jar files for the purpose of managing and controlling
change.  With over 100 EJBs a single ejb-jar becomes very unmanageable.

Are there any solutions to these problems?

Thanks.
Alex Paransky
Individualnetwork.com





RE: ejb 2.0 proposed final draft #2 is out

2001-04-27 Thread Alex Paransky
Title: RE: ejb 2.0 proposed final draft #2 is out



Ooops, 
my bad.

-AP_

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Alex 
  ParanskySent: Friday, April 27, 2001 12:37 PMTo: 
  Orion-InterestSubject: RE: ejb 2.0 proposed final draft #2 is 
  out
  I 
  read the spec, and still saw the Dependent Objects in there. Where does 
  it say that the DOs are gone?
  
  -AP_
  
-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of Russ 
WhiteSent: Friday, April 27, 2001 9:53 AMTo: 
Orion-InterestSubject: RE: ejb 2.0 proposed final draft #2 is 
out
Am 
I the only one that think the following makes more 
sense?

EJBObject - Local interface
RemoteEJBObject - Remote interface

as 
opposed to

EJBObject - Remote interface
EJBLocalObject - Local interface

Isn't is the more natural state for an object to be 
local?

I 
am gladthe whole DO thing is gone. It made no good sense at 
all.

Just my 2C

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Tim 
  DrurySent: Friday, April 27, 2001 9:14 AMTo: 
  Orion-InterestSubject: RE: ejb 2.0 proposed final draft #2 is 
  out
  Here is the section that says what is different 
  between PFD 1 and 2: 
  E.12 Proposed Final Draft 2 Introduced local interfaces and local home interfaces for entity 
  beans and session beans. Added characterization of 
  local client view. Added subclasses of 
  EJBException for systems exceptions thrown from local interface 
  methods. Revisions to architecture for container 
  managed persistence: * Shifted container managed 
  relationships among entity beans from remote interfaces to local 
  interfaces. * Removed dependent 
  object classes. * Removed remote relationships 
  among entity beans. 



Can any one be so kind to help me with this problem...

2001-04-27 Thread Alex Paransky

In this example, I have followed a one-to-one unidirectional relationship to
AddressEntity type.  I seem to get a valid reference, but when I proceed to
execute a method (AddressEntity.getId() in this case), I get
NoSuchObjectException.  The second time, it works correctly and I do not get
an exception.

Nested exception is:
java.rmi.NoSuchObjectException: com.indnet.common.model.base.EntityKey@49d
at
AddressEntityHome_EntityHomeWrapper734.findExistingEntity(AddressEntityHome_
EntityHomeWrapper734.java:40)
at
AddressEntity_EntityBeanWrapper28.reActivate(AddressEntity_EntityBeanWrapper
28.java:3163)
at
AddressEntity_EntityBeanWrapper28.getId(AddressEntity_EntityBeanWrapper28.ja
va:395)
at
com.indnet.symbiosis.service.common.address.ServiceAddressHelper.getValue(Se
rviceAddressHelper.java:43)
at
com.indnet.symbiosis.service.companymanagement.CompanyManagementServiceBean.
getValue(CompanyManagementServiceBean.java:685)
at
com.indnet.symbiosis.service.companymanagement.CompanyManagementServiceBean.
getValue(CompanyManagementServiceBean.java:661)
at
com.indnet.symbiosis.service.companymanagement.CompanyManagementServiceBean.
findContactByAliasLogin(CompanyManagementServiceBean.java:244)
at
CompanyManagementService_StatelessSessionBeanWrapper2.findContactByAliasLogi
n(CompanyManagementService_StatelessSessionBeanWrapper2.java:2389)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.bd.dr(JAX)
at com.evermind.util.f.run(JAX)
at connection to localhost/127.0.0.1
at com.evermind.server.rmi.OrionRemoteException.ib(JAX)
at com.evermind.server.rmi.bb.h4(JAX)
at com.evermind.server.rmi.bb.run(JAX)
at java.lang.Thread.run(Thread.java:484)

I have done some more investigation, and it seems to have to do with the
finder I execute.  The first function always works correctly, the second
function fails the first time (with above exception) and then proceeds to
work correctly.  If I call the first function, followed by the second, then
everything works fine.  It's like something is dirty and then gets set
correctly.

  public Contact findContactById(final Long contactId) throws
RemoteException, NamingException, FinderException, FieldException {
return
  getValue(
ContactEntityHomeFinder.getHome().findByPrimaryKey(new
EntityKey(contactId))
  );
  }

  public Contact findContactByAliasLogin(final String alias, final String
login) throws RemoteException, NamingException, FinderException,
FieldException {
return
  getValue(
ContactEntityHomeFinder.getHome().findByAliasLogin(alias, login)
  );
  }

The actual lines of code that fails is:

  public static Address getValue(final AddressEntity entity) throws
RemoteException, FieldException {
Address value = null;
if (entity != null) {
  value = new Address();
  value.set(Address.FIELD_ID, entity.getId()); //-- this line fails
}
return value;
  }


Does any one have any ideas?

Thanks.
-AP_





RE: Null pointer bug?

2001-04-15 Thread Alex Paransky

Can you post some code?  The code of your Control bean, and the code of the
TestBean that you are creating.  Also post the code for your primary key
classes.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Chris
Bergstresser
Sent: Sunday, April 15, 2001 10:48 AM
To: Orion-Interest
Subject: Null pointer bug?


   I think I've found a bug in Orion.  I've created a primary key for an EJB
which contains only an int.  However, when this class is deployed, I get the
following stack trace on the server:

java.lang.NullPointerException
at
TestBeanHome_EntityHomeWrapper73.hashCode(TestBeanHome_EntityHomeWrapper73.j
ava:112)
at com.evermind.util.ExternalHashSet.get(JAX)
at
TestBeanHome_EntityHomeWrapper73.create(TestBeanHome_EntityHomeWrapper73.jav
a:544)
at com.testing.ControlEJB.ejbPostCreate(ControlEJB.java:97)
at
ControlHome_EntityHomeWrapper69.create(ControlHome_EntityHomeWrapper69.java:
422)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.bd.dr(JAX)
at com.evermind.util.f.run(JAX)

And the following on the client:

Exception in thread "main" javax.ejb.EJBException
at com.evermind.server.rmi.bb.invokeMethod(JAX)
at com.evermind.server.rmi.a2.invoke(JAX)
at com.evermind.server.rmi.a3.invoke(JAX)
at __Proxy2.create(Unknown Source)
at com.testing.InitializeSystem.main(InitializeSystem.java:52)

The client code creates a "Control" Bean and, in the ejbPostCreate of that
bean I lookup the home of the "TestBean" and create it.  The null pointer
isn’t happening in my code -- in fact, everything executes successfully
until the thread leaves the ejbCreate method in the TestBean but before it
calls the ejbPostCreate method.  Then it blows up.  Any ideas?

-- Chris






RE: How to enable UserManager support for arbitrary user...

2001-04-14 Thread Alex Paransky

Here is the problem that I am not sure how to really fix.

Our EJB application is wrapped with a number of "command" URL's which return
XML results.  For example:
http://localhost/getAccountInformation.jsp?account=2234 would return an XML
representation of an account.  An
http://localhost/addUserToAccount?account=2234userName=test... would add a
user to a particular account.  A Visual Basic client, then uses these
"command" URLs and resulting XML to present a user interface.

Given the above scenario, what would be your recommendation for
authenticating the user starting right after I accept the user/password from
the VB form (I don't much care for VB specifics, just the part which deals
with EJB/JSP/J2EE security).

After accepting user authentication information from a VB dialog, what
should I do next.  How do I get this information "registered" with Orion or
any j2ee application server so that the deployment descriptor information
works correctly.

Is this the way J2EE security was meant to be used.  A non super-user
account, cannot execute a setSuperuser(boolean) function on the User bean.
Is this how I should be controlling this?  Is this the proper method?  I was
reading the J2EE EJB spec which states that coding security should be the
last resort.

I am not clear on how to execute the above scenario.

Thanks to all the people who have already posted in regards to this issue.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Schnitzer
Sent: Friday, April 13, 2001 10:09 PM
To: Orion-Interest
Subject: RE: How to enable UserManager support for arbitrary user...


I suggest using an MVC (aka "Model 2") approach, separating your view
from your controller.  One of the controller's responsibilities can be
to check for authentication and provide to the user either the requested
page or the login page.

If you use a dispatcher-servlet-action framework for your controller,
you typically will only need to put the authentication checking code in
a base action class from which all protected action classes derive.  If
you use JSPs as controllers you'll need some sort of code in every one
(you can use @include for this).

You will be much happer if you use an MVC appraoch, trust me.  The J2EE
automatic form-based authentication is very crude and fails to
accomodate simple use cases like automatically logging in new users.

You might want to look at WebWork:
http://www.sourceforge.net/projects/webwork.

BTW, if you use the Orion UserManager (and RoleManager), you should not
do your own database lookup.  Calling RoleManager.login() causes methods
to be called on the UserManager, which can either be your class or one
of the UserManagers that ship with Orion.  DataSourceUserManager looks
up password and group information in a table.

Jeff

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 3:20 PM
To: Orion-Interest
Subject: RE: How to enable UserManager support for arbitrary user...


Tim, this IS what I am looking for, but does it mean that I
need to put this
into every .JSP page that I have?  Then, somehow (according to
J2EE spec)
Orion will forward this information to all EJB calls and
properly make use
of the deployment descriptor stuff?  So every .JSP page will check the
session, find the User object which I stored in there, and
execute this call
with the user.login and user.password?

Thanks.
-AP_

-Original Message-
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 3:04 PM
To: Orion-Interest
Cc: Alex Paransky
Subject: Re: How to enable UserManager support for arbitrary user...


Is this what you are looking for?

   RoleManager roleMgr = (RoleManager)
  (new InitialContext()).lookup( "java:comp/RoleManager" );
   roleMgr.login( "user", "pass" );

Unfortunately, I think that can only run in the container. To
accomodate
multiple logins under a servlet, we used to use a new InitialContext on
every servlet request and set the appropriate JNDI properties for each
InitialContext construction.

tim.

 We have developed a web application with our own user/group schema.
 Creating a UserManager to map our schema seems pretty
trivial.  What we
are
 NOT clear on is how to tell Orion that a particular user has
logged in.

 For example, we start our application with a LOGIN.JSP page,
which accepts
 user name/password, and proceeds to find the user in the
database.  After
 the user is found/authenticated, we create an HTTP session,
and store a
 certain User object in the session to tell us who the user
is on the next
 http request.

 How do we introduce J2EE security into this picture.  In
other words, how
do
 we tell Orion which user is logged on so that it starts
using the security
 attributes/group/rights of the deployment descriptors?  Do
we need to put
a
 special attribute into the HTTPSession so that Orion knows
on behalf of
what
 user the request is running?

 Thanks.
 -AP_










How to enable UserManager support for arbitrary user...

2001-04-13 Thread Alex Paransky

We have developed a web application with our own user/group schema.
Creating a UserManager to map our schema seems pretty trivial.  What we are
NOT clear on is how to tell Orion that a particular user has logged in.

For example, we start our application with a LOGIN.JSP page, which accepts
user name/password, and proceeds to find the user in the database.  After
the user is found/authenticated, we create an HTTP session, and store a
certain User object in the session to tell us who the user is on the next
http request.

How do we introduce J2EE security into this picture.  In other words, how do
we tell Orion which user is logged on so that it starts using the security
attributes/group/rights of the deployment descriptors?  Do we need to put a
special attribute into the HTTPSession so that Orion knows on behalf of what
user the request is running?

Thanks.
-AP_





RE: How to enable UserManager support for arbitrary user...

2001-04-13 Thread Alex Paransky

Tim, this IS what I am looking for, but does it mean that I need to put this
into every .JSP page that I have?  Then, somehow (according to J2EE spec)
Orion will forward this information to all EJB calls and properly make use
of the deployment descriptor stuff?  So every .JSP page will check the
session, find the User object which I stored in there, and execute this call
with the user.login and user.password?

Thanks.
-AP_

-Original Message-
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 3:04 PM
To: Orion-Interest
Cc: Alex Paransky
Subject: Re: How to enable UserManager support for arbitrary user...


Is this what you are looking for?

   RoleManager roleMgr = (RoleManager)
  (new InitialContext()).lookup( "java:comp/RoleManager" );
   roleMgr.login( "user", "pass" );

Unfortunately, I think that can only run in the container. To accomodate
multiple logins under a servlet, we used to use a new InitialContext on
every servlet request and set the appropriate JNDI properties for each
InitialContext construction.

tim.

 We have developed a web application with our own user/group schema.
 Creating a UserManager to map our schema seems pretty trivial.  What we
are
 NOT clear on is how to tell Orion that a particular user has logged in.

 For example, we start our application with a LOGIN.JSP page, which accepts
 user name/password, and proceeds to find the user in the database.  After
 the user is found/authenticated, we create an HTTP session, and store a
 certain User object in the session to tell us who the user is on the next
 http request.

 How do we introduce J2EE security into this picture.  In other words, how
do
 we tell Orion which user is logged on so that it starts using the security
 attributes/group/rights of the deployment descriptors?  Do we need to put
a
 special attribute into the HTTPSession so that Orion knows on behalf of
what
 user the request is running?

 Thanks.
 -AP_







RE: W3C Log Format

2001-04-12 Thread Alex Paransky

Hitesh, if you look at the documentation located at
http://www.orionserver.com/docs/web-site.xml.html you will notice that there
are few options available for the formatting of the output log.  Here is
some text from this file:

access-log format="$ip - $user - [$time] '$request' $status $size"
path="./access.log" split="none|hour|day|week|month" suffix="-n-y" /
  Relative/absolute path to the access-log for this site, this is where
incoming requests will be logged.

format - Optional formatting of the log entries. $ prefixes vars, the
available vars are: $time, $request, $ip, $host, $path, $size, $method,
$protocol, $user, $status, $referer, $time, $agent.
path - The path to the logfile.
split - When (if) to split the access logs, the default is NONE.
suffix - The text to append to the log if splitting is used to make up the
unique name for a timezone. The format used is that of
java.text.SimpleDateFormat.


Perhaps you can configure your web-site.xml with the proper logging options
to match as close as possible (if not exact) to those defined by the W3C Log
format.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Hitesh Patel
Sent: Thursday, April 12, 2001 5:41 PM
To: Orion-Interest
Subject: W3C Log Format


does orion support W3C Extended Format (like IIS)?
http://www.w3.org/TR/WD-logfile.html

if not, what can I do to change it?

thanks folks!

hitesh

___
hitesh r. patel
213.639.8837
ticketmaster online
ticketmaster.com~citysearch.com~match.com








Slow performance with large EJB-JAR.XML file...

2001-04-11 Thread Alex Paransky

We have been putting all our beans in a single ejb-jar.xml.  However, it's
taking Orion noticably slower to deploy new changes.  I am wondering what
(if any) problems associated with splitting each bean into it's own
ejb-jar.xml and treating it as an independent module.  Any help would be
appreciated.

-AP_





Callbacks on session beans... are they legal?

2001-04-09 Thread Alex Paransky

Is it legal for session bean A to create session bean B, and pass it to
session bean C so that C can call on B?

For example, if A is acting as a controller, B is acting as a factory, and C
is acting as an algorithm.  So a controller needs to execute an algorithm
which requires a factory as one of it's parameters.  As the algorithm runs,
it calls on the factory to create the resources it needs.

Thanks.
-AP_





Home methods...

2001-04-09 Thread Alex Paransky

Does Orion support user home methods?  I am trying to create a method in my
session bean, but I get the following exception from orion:

Error compiling
file:/C:/work/individualnetwork/deployment/development/symbiosis/enterprise/
server/service/: Invalid session-EJBHome interface method defined in
com.indnet.symbiosis.service.usermanagement.UserManagementServiceHome: test

-AP_





RE: Home methods...

2001-04-09 Thread Alex Paransky

Sorry, my bad.  No home methods for sessions.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Monday, April 09, 2001 5:13 PM
To: Orion-Interest
Subject: Home methods...


Does Orion support user home methods?  I am trying to create a method in my
session bean, but I get the following exception from orion:

Error compiling
file:/C:/work/individualnetwork/deployment/development/symbiosis/enterprise/
server/service/: Invalid session-EJBHome interface method defined in
com.indnet.symbiosis.service.usermanagement.UserManagementServiceHome: test

-AP_





Various levels transaction support on Orion...

2001-04-06 Thread Alex Paransky

Somewhere I read that Orion does not support client starting transactions.
Is my web-application considered a client?  Can I start a transaction inside
of my web-application?  What if web application is running on a server
different from my EJB application (using the RMI.XML configuration)?

Thanks.
-AP_





RE: Does any one has a solution for the domain was null message???

2001-04-04 Thread Alex Paransky

Just like I can write a client that can connect to any server (after
specifying proper values to new InitialContext), I should be able to do the
same thing from any Java Code (with certain limitations).  This should be
regardless of where the Java code is running.  Why should I get a
NullPointerException, trying to connect from one Orion Server to another
Orion Server.  People have been able to connect from Orion Server to
Weblogic server, just by creating a new InitialContext with proper
parameters for Weblogic.

I am developing a Web client application.  Along with the Web client
application I am providing the interfaces I need to communicate to the
outside world.  How can I generically connect my Web Client to a Server?  If
it is possible to create a new InitialContext onto a Weblogic server from
Orion, why should this fail from one Orion server to another?

On the other hand, I did read the spec.  Chapter 18 "Support for
Distribution and Interoperability" is devoted to this exact issue.  This
chapter places RMI-IIOP communication between two servers.  While I realize
that Orion's RMI-IIOP implementation is not there, I was hoping for a stop
gap measure of using InitialContext.

I guess, I'll give up at this point.  It's clear that an Orion server acting
as a client cannot talk to another Orion server acting as a EJB server using
InitialContext.

-AP_


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ray Harrison
Sent: Wednesday, April 04, 2001 5:31 AM
To: Orion-Interest
Subject: RE: Does any one has a solution for the "domain was null"
message???


From what I have seen, each app server is free to define its own specific
method for partitioning
functionality and is not hard wired into the spec. Orion, Weblogic, EA
Server, for instance, each
have their own protocol for intra/inter server communication. Jason has done
an excellent job in
describing how Orion operates (and Jason, you also cleared up an issue I was
having yesterday too
- thanks!). I am not always as careful as I should be when I read specs -
Alex, is there a section
of the specs that says that you should be able to accomplish what you want
to do from the approach
that you tried? Architecturally, it seems you have an orion server that is
acting as a web
container and an orion server that is acting as an EJB container and that
you want to use Orion's
protocols to have those two servers communicate appropriately.

Cheers
Ray

--- Jason Smith [EMAIL PROTECTED] wrote:
 Well, I agree that it would be nice if you could get access to servers
 outside of Orion using the "client" approach, I don't think it necessarily
 defined in the J2EE platform specs.  I took a look around the J2EE 1.3
 specification, and the section J2EE.2.8 "Flexibility of Product
 Requirements" states:
 "This specification doesn't require that J2EE product be implemented by a
 single program, a single server, or even a single machine.  In general,
this
 specification doesn't describe the partionining of services or functions
 between machines, servers, or processes.  As long as the requirements in
 this specification are met, J2EE Product Providers can partition the
 functionality however they see fit.  A J2EE product must be able to deploy
 application components that execute with the semantics described by this
 specification."

 In section J2EE.2.11.3 "Network Protocols" it says that "This
specification
 defines the mapping of application components to industry-standard network
 protocols.  The mapping allows client access to the application components
 that have not installed J2EE product technology".

 Finally, in J2EE.8.2.1 "Application Assembly" subpart 3ii says
"Dependencies
 that are not linked to internal components must be handled by the Deployer
 as external dependencies that must be met by resources previously
installed
 on the platform.  External resources must be linked to the resources on
the
 platform during deployment."

 From everything I have read, it seems that Orion isn't violating any
 specification rules, since they are allowed to partition functionality as
 they see fit.  Orion does allows multiple servers to intercommunicate, but
 it is the responsibility of the application deployer to specify those
links
 (and it is specific to Orion).  Since the web container is bundled as part
 of the J2EE Server, I don't think the specification requires that it has
 access to anything outside that specific server environment.

 I would like to hear the thoughts of others about this, and any
experiences
 they might have had with access with remote containers/servers.

 -jason




__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text





RE: Help me please domain was nul message is killing me here...

2001-04-03 Thread Alex Paransky

Ray, the problem is quite simple.  I have two Orion servers.  One server is
running an EJB application model, the other server is running JSP client
application.  From the JSP server, I try to access the EJB server, by
creating an InitialContext with the same parameters that I would if I was
trying to connect to the EJB application using a standalone client
(appplication-client.xml and ApplicationClientInitialContextFactory).  At
this point, I get a NullPointerException on the Client (JSP Server) side
telling me that the "domain was null".

The exact same code, works correctly when running as a standalone
application, however, when put into the JSP Server, produces this exception.
Some people suggested using ApplictionInitialContextFactory, however, since
ApplicationInitialContextFactory reads application.xml, I have no place to
put my ejb-ref tags to reference the objects in the EJB application.

Other people suggested playing around with rmi.xml.  This, however, hardly
seems standard.  I am trying to write code that is J2EE compliant without
having to use any of the Orion specific features.

So I am at a standstill.  It's hard to believe that no one ran into this
problem.  In many cases it does not make sense to deploy the client and
server on the same physical machine.  Our JSP clients are running on the
public internet while our EJB models are running on the private internet not
accessible from the outside.  Also, since we have many clients, we
anticipate having a "farm" of EJB servers running the model, and a "farm" of
JSP servers accessing this model. I am amazed that no one has stumbled onto
this problem.

If you have two Orion servers running, put the following code on one of the
servers:

Properties p = new Properties();
p.setProperty(Context.PROVIDER_URL,
"ormi://target-host/application-name");
p.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.ApplicationClientInitialContextFactory");
p.setProperty(Context.SECURITY_PRINCIPAL, "user");
p.setProperty(Context.SECURITY_CREDENTIALS, "password");
InitialContext ctx = new InitialContext(p);

You will need to replace target-host, application-name, user and
password with values for your system.  You will need to put the
application-client.xml in to the proper directory.  For a web application,
this file should go into WEB-INF/classes/META-INF/application-client.xml.


-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ray Harrison
Sent: Monday, April 02, 2001 8:16 PM
To: Orion-Interest
Subject: Re: Help me please "domain was nul" message is killing me
here...


Alex -
Is there any chance you could zip up a small amount of code that recreates
your problem? You had
better include examples of your orion config files too. Or at least if you
could provide lots of
information code snippets and the like - that would be great! Give us what
you can and we may be
able to help...

Cheers
Ray



--- Alex Paransky [EMAIL PROTECTED] wrote:
 Does anyone know what the "domain was null" message means?  How do I get
rid
 of it.  Where do I specify a domain?  HEELP, someone please.  I have
 been posting this question for the last 3 weeks, and still I have no
 answers.

 Please, please please, help.

 -AP_

 PS: Is this what it takes to get a question answered?  Is there a
different
 forum for paying customers?  If I pay $1500, will I get my questions
 answered faster?




__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text





RE: Does any one has a solution for the domain was null message???

2001-04-03 Thread Alex Paransky



Earl, 
I was only replying to your message where you indicate:

"I suggest you try the 
ApplicationInitialContextFactory instead of 
theApplicationClientInitialContextFactory in your situation."

I was 
only saying that using ApplicationInitialcontextFactory will not work in my 
case. There is no aspect that you do not understand. It's 
quite simple. Just try to create a new InitialContext(p) where p contains 
ApplicationClientInitialContextFactory. During the creation of 
InitialContext you will get a NullPointerException with the message of "domain 
was null". 

Jason 
Smith did a good job of documenting of how to connect two Orion servers together 
using RMI.XML file, however, this does not seem to be J2EE compliant. I 
still want to use the solution where InitialContext can be used to connect to a 
different server.

For 
now, we are deploying our application in the same server using the 
parent="application-name" tag. 

-AP_




  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Earl 
  MarwilSent: Tuesday, April 03, 2001 8:00 AMTo: 
  Orion-InterestCc: 
  [EMAIL PROTECTED]Subject: RE: Does any one has a 
  solution for the "domain was null" message???If you use 
  the ApplicationClientContextFactory it will read 
  META-INF/application-client.xml which is where you can specify the 
  ejb-ref and env-ref elements... There still must be some other 
  aspect of your situation that I don't understand.In answer to my 
  own question, I finally discovered how the rmi authentication works in 
  conjunction with an EJBUserManager. It was not clear from the error messages. 
  After reading the article at orionsupport on the DataSourceUserManager, 
  studying the orion examples and docs and an intuitive guess, I added the 
  permissions to a group in the application's principals.xml, 
  e.g.:group 
  name="RMIUsers"descriptionrmi 
  users/descriptionpermission 
  name="rmi:login" 
  /permission 
  name="com.evermind.server.rmi.RMIPermission" 
  //group(Can someone explain the permissions in 
  relation to the groups or point me to a reference? I'm still not sure which of 
  the two or whether both are required and why. It works for now...)This 
  group name is added in the orion-application.xml which also directs the 
  application to use the custom EJB user manager:user-manager 
  class="com.evermind.ejb.EJBUserManager"property 
  name="defaultGroups" value="ValidatedUsers" 
  /property 
  name="home" value="ejb/CustomEJBUserBean" 
  //user-manager...namespace-access 
  read-access 
  namespace-resource 
  root="" 
  security-role-mapping 
  group 
  name="RMIUsers" / 
  /security-role-mapping 
  /namespace-resource 
  /read-access 
  .../namespace-accessNow 
  my application client is successful in connecting to the rmi server, 
  authenticating a user account via the EJBUserManager and accessing my 
  application.At 18:37 3/30/2001 -0800, you wrote:
  The problem, is that I AM connecting to ANOTHER 
server from a client. It'sjust happends that the client is an 
Orion. UsingApplicationInitialContextFactory attempts to read 
META-INF/application.xml,but I need to specify ejb-ref, 
env-ref and other such entries which youcannot be put into 
application.xml.-AP_-Original Message-From: 
[EMAIL PROTECTED][mailto:[EMAIL PROTECTED]]On Behalf 
Of Earl MarwilSent: Friday, March 30, 2001 10:21 AMTo: 
Orion-InterestSubject: Re: Does any one has a solution for the "domain 
was null"message???There may be a clue to this question in 
the following error message that isgenerated when trying 
thecom.evermind.server.ApplicationInitialContextFactory from an 
applicationclient:"javax.naming.NamingException:com.evermind.server.ApplicationInitialContextFactory 
should only be usedinside Orion server environments. For 
clientcom.evermind.server.ApplicationClientInitialContextFactory 
orcom.evermind.server.rmi.RMIInitialContextFactory should be 
used"I suggest you try the ApplicationInitialContextFactory instead 
of theApplicationClientInitialContextFactory in your 
situation.Somewhat related, I have been trying to get an 
application client working.I have succeeded in connecting to the orion 
rmi server, looking up an ejb,and retrieving data. I would like to 
authenticate against theEJBUserManager that is configured for our web 
applications. However, itappears that the rmi authentication defaults to 
XMLUserManager - i.e., Ican only authenticate for users defined in the 
principals.xml file. Thiscould be related to the orion Bugzilla #374. 
Can anyone provide someinsight into the RMI authentication? 
Thanks.Regards,EarlAt 18:04 3/29/2001 -0800, you 
wrote:Could someone help me with this problem. When trying to 
create a newInitialContext with 
factorycom.evermind.server.ApplicationClientInitialContextFactory 
from inside ofOrionServer always throws a 

RE: JBoss verses Orion

2001-04-02 Thread Alex Paransky

I don't think that getting a NullPointerException when trying to use a
feature is complaint.  I feel that the support of such a product is almost
as important as the product it's self.  Any commercial company that cannot
support it's users, will fail.  If there is not enouph people to support the
product, then hire more.  If there is not enouph money to hire more people,
then increate the license fee for commercial deployment from $1500 to $3000.
It does not make sence to keep the fee so low, and at the same time provide
little or no support for the users.

I have been trying to resolve the issue with "domain was null"
NullPointerException in Orion for the last 4 weeks, with no repsonse. How am
I supposed to continue using this product?

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Hani Suleiman
Sent: Monday, April 02, 2001 6:28 AM
To: Orion-Interest
Subject: RE: JBoss verses Orion


Magnus and Karl both chip in now and then, they used to do that more in
the past I guess, but (understandably) realised that it's a far better use
of their time to ensure they have a stellar product, than to respond to
endless complaints. As Joseph said, it depends on what you want out of
your software. Killer performance, compliance to specs, excellent
development environment, easy deployment, or fuzzy feelgood social
aspects. The fuzzy stuff is nice, but given a choice

Hani

On Mon, 2 Apr 2001, Kemp Randy-W18971 wrote:

 But wouldn't you be just a bit curious to know more about Karl, or more
importantly, who the founding members of Ironflare are?  I would.  If you go
to visit the Resin site (www.caucho.com), which is a commercial site,
somewhere there is a blurb about Scott, the key architect.  And I have
noticed that Scott is actively answering questions in the Resin mailing
list, and Rickard and Marc are actively answering questions in the Jboss
mailing list, both on a regular basic.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 02, 2001 5:40 AM
 To: Orion-Interest
 Subject: Re: JBoss verses Orion


 Yes, the amount of charitable contributions made by the Orion team is of
the
 highest importance to me, too. And whether they supported Bush or Gore in
 Florida. And whether their favorite color is blue - if it's not, then I
HATE
 ORION! (And if it is, then why does their web site use red so much?)
 Technical issues are over-rated in technical fields, if you ask me.

 (On the other hand, I can think of a few VERY good reasons JBoss'
 performance was lower than Orion's - no explanation was made of the
specific
 setup.)

 On Sat, Mar 31, 2001 at 09:37:31AM -0600, Kemp Randy-W18971 wrote:
   Orion is definitely ahead of Jboss technically, but Jboss has more
people behind it, as far as development and debugging goes.  With Jboss, you
can get a profile of the founders and board members.  It would be nice to
have the same profile of some of the Orion founders and developers, so we
can know them a bit more personally.  Jboss has the potential to catch up to
Orion, given the number of people involved on the project.  So Orion needs
to keep in the technical groove, so to speak.  Remember the story of the
Turtle and the rabbit race?
 
  -Original Message-
  From: Fink, Paul
  To: Orion-Interest
  Sent: 3/30/01 2:52 PM
  Subject: JBoss verses Orion
 
 
  I ported our Orion application to JBoss. I love JBoss for
  usability, documentation and support. Unfortunately our application is
  very
  performance dependent the JBoss version ran very slow. After playing
  with
  cache setting, etc. It seemed like the communications was the main
  bottle
  neck.
  To test this I wrote a simple session bean with one get method that
  returns
  a Long.
 
  The client looped 10,000 times calling the getter. The Orion version was
  6
  times faster!
  Other tests we ran had Orion running 4x faster.
 
  It seems that JBoss certainly is performance limited.
 
  I'm running on a 900 MHz PIII under Linux with Sun's JDK 1.3
 
 
  Paul Fink







Finder queries...

2001-04-02 Thread Alex Paransky

I have defined the following finder for the relationship (Account has many
Users) - (User has One Account):

query
  query-method
method-namefindByAccountLogin/method-name
method-params
  method-paramjava.lang.String/method-param
  method-paramjava.lang.String/method-param
/method-params
  /query-method
  ejb-ql
FROM com.indnet.symbiosis.model.User u WHERE u.account.id = ?1 and
u.login = ?2
  /ejb-ql
/query

Here is what Orion generates in orion-ejb-jar.xml:

finder-method query=""
  !-- Generated SQL: "select Users.id, Users.firstName, Users.middleName,
Users.lastName, Users.birthDate, Users.gender, Users.userLogin,
Users.userPassword, Users.accountId, Users.scheduleId, Users.superuser from
Users" --
  method
ejb-namecom.indnet.symbiosis.model.entity.User/ejb-name
method-namefindByAccountLogin/method-name
method-params
  method-paramjava.lang.String/method-param
  method-paramjava.lang.String/method-param
/method-params
  /method
/finder-method

Thanks.
-AP_






RE: Does any one has a solution for the domain was null message???

2001-03-30 Thread Alex Paransky

The problem, is that I AM connecting to ANOTHER server from a client.  It's
just happends that the client is an Orion.  Using
ApplicationInitialContextFactory attempts to read META-INF/application.xml,
but I need to specify ejb-ref, env-ref and other such entries which you
cannot be put into application.xml.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Earl Marwil
Sent: Friday, March 30, 2001 10:21 AM
To: Orion-Interest
Subject: Re: Does any one has a solution for the "domain was null"
message???


There may be a clue to this question in the following error message that is
generated when trying the
com.evermind.server.ApplicationInitialContextFactory from an application
client:

"javax.naming.NamingException:
com.evermind.server.ApplicationInitialContextFactory should only be used
inside Orion server environments. For client
com.evermind.server.ApplicationClientInitialContextFactory or
com.evermind.server.rmi.RMIInitialContextFactory should be used"

I suggest you try the ApplicationInitialContextFactory instead of the
ApplicationClientInitialContextFactory in your situation.


Somewhat related, I have been trying to get an application client working.
I have succeeded in connecting to the orion rmi server, looking up an ejb,
and retrieving data. I would like to authenticate against the
EJBUserManager that is configured for our web applications. However, it
appears that the rmi authentication defaults to XMLUserManager - i.e., I
can only authenticate for users defined in the principals.xml file. This
could be related to the orion Bugzilla #374. Can anyone provide some
insight into the RMI authentication? Thanks.

Regards,

Earl

At 18:04 3/29/2001 -0800, you wrote:
Could someone help me with this problem.  When trying to create a new
InitialContext with factory
com.evermind.server.ApplicationClientInitialContextFactory from inside of
OrionServer always throws a NullPointerException, with message "domain was
null".  The same code works fine from external client.

Has anyone fixed this problem?  Has anyone seen this problem?  Is anyone
trying to deploy JSP and EJB parts on different Orion servers, or are all
people comfortable running their models in front of the firewalls?

Any help would be appreciated

Thanks for your help.
-AP_

Earl Marwil
SCIENTECH, Inc.
1690 International Way
Idaho Falls, ID 83402
208.525.3717





RE: Performance problems...

2001-03-25 Thread Alex Paransky

What is the maximum number of connections that you have configured your
database pool to?  Could you be running out of connections?  Are you
properly releasing the connections back to the pool, and closing results set
which might not be needed?  During the time that the site is "frozen" (as
you indicate 20 to 60 seconds) can you hit a page that is not database
related (a simple .JSP perhaps)?  Does that return fast (this would
determine if your problem is database or Orion related).  Have you tried to
examine what's happening on the database server side when this occurs?

Just some thoughts.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron
Tavistock
Sent: Sunday, March 25, 2001 7:09 PM
To: Orion-Interest
Subject: Performance problems...


I've been working on getting Orion running in a production environment for a
little while now and just when I thought everything was working fine I go to
push to production and something load/volume related is creating massive
slowdowns.

Basically every 250 database accesses or so there is a long pause (20 to 60
second), where nothing occurs.  During this pause the CPU load *drops* to
practically nothing and our entire site is frozen.  I'm not sure exactly
where the problem exists; it could be our code, our configuration, or even a
bug in Orion.

The environment is Redhat 6.2, JDK1.3, Oracle 8i.  Its a pure J2EE app, but
we're not using EJB.  I initially thought it might be a memory issue, but
I've played with the JDK heap size and carefully watched memory utilization
and thats also not the issue.  I even considered that maybe
Evermind/IronFlare might have a throttle (to push you to get a license) so I
put one of our production licenses on the QA box.

I've since gotten a load tester and can reproduce the problem.  Oddly, it
only happens on pages which require database access.  Even more interesting
is that it occurs more frequently on pages which utilize more than one
connection.  But thats about as far as I can narrow it.   I've tried the
8.15 and 8.17 type4 jdbc drivers from oracle and we've tried Oracles
ConnectionCacheImpl and Orions XADataSource implimentation, both show the
same behavior (though both are using the Oracle Driver).   I've also tried
Orions jdbc debug and it shows nothing of interest.

So far I've put about a week straight into finding it, and I've just about
run out of ideas. I'd really be appreciative if anyone has any good
suggestions on where to look.  ANyone seen behavior like this before?





Specification for java.naming.provider.url...

2001-03-23 Thread Alex Paransky

Orion's documentation talks about specifying the java.naming.provider.url in
the following format:

java.naming.provider.url=ormi://localhost/domain (application)

At a different time, I was having a problem trying to connect one Orion
Server (JSP) to another Orion Server using
ClientApplicationInitialContextFactory, but was getting a
NullPointerException with the message of "domain was null".  Is this the
domain it's refering to?  If so, what should be the domain? Where is it
configured? Is domain (application) a missprint, should it just be
application?

Thanks.
-AP_






RE: Orion Memory Configuration

2001-03-22 Thread Alex Paransky

Use java's runtime memory options to configure (-Xm -Xs).

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of McLellan,
Richard
Sent: Thursday, March 22, 2001 7:23 AM
To: Orion-Interest
Cc: Hogan, John
Subject: Orion Memory Configuration


Hello all,
I am having a problem when stress testing Orion.
I get an out of Memory error from orion.  I am running a sun 420R
with 2GB RAM with 2 - 500Mhz Processors.  As far as the system is concerned
there is still 1.7GB RAM available for use when orion dies.  I am simulating
5000 users hitting the site at once and as soon as about 64MB of ram is used
I get "java.lang.OutOfMemoryError: unable to create new native thread" I
have tried starting Orion with the command "java -Xms512m -Xmx1024m -jar
orion.jar" to try to allocate more memory to java from the machine and I
still get the same error at the same 64MB memory usage mark.
Is there a Memory setting in orion that is limiting the orion server
that I am missing.  If this is a default setting somewhere I hope someone
else has run into this.  I have looked at the archives and there are a few
pages of out of memory errors but None where there was still memory
available on the system.
I am using the Microsoft Web Application Stress 1.1, the same
product used by orion to benchmark the server.  I have 5 clients set up to
distribute the load of user simulation and I am only hitting one jsp page.
Thanks
Rich






RE: Question regarding servers as clients to other servers...

2001-03-22 Thread Alex Paransky

Hi Claudio, what makes Orion look into WEB-INF/classes?  To find the
META-INF?

Thanks
-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Claudio
Cordova
Sent: Thursday, March 22, 2001 4:30 PM
To: Orion-Interest
Subject: RE: Question regarding servers as clients to other servers...


Hey Alex...How are you

Have you tried in WEB-INF/classes/META-INF/application-client.xml


Claudio


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
 Sent: Thursday, March 22, 2001 3:58 PM
 To: Orion-Interest
 Subject: RE: Question regarding servers as clients to other servers...


 I have one application talking with another on a different server.  In the
 first application I try to create a new InitialContext() with proper
 parameters to talk to the other server, but Get the error saying that
 META-INF/application-client.xml is not found. I do not know where in the
 deployment of the first application I need to put a META-INF.

 Thanks.

 -AP_

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
 Sent: Thursday, March 22, 2001 12:41 PM
 To: Orion-Interest
 Subject: Question regarding servers as clients to other servers...


 I am configuring two Orion application servers.  The first server (JSP) is
 going to be a client of the second server (EJB).  In the
 application running
 on the first server, I try to create IntialContext with
 parameters pointing
 to the second server, but I get the following exception:

 javax.servlet.jsp.JspException: javax.naming.NamingException:
 META-INF/application-client.xml resource not found

 I understand that I need to have META-INF/application-client.xml,
 but where
 do I put it?

 I tried putting it:

 1. Directory where I start orion
 2. Directory under Application in which a call to new
 IntialContext is made
 3. Directory under Module in the Application in which the new
 IntialContext
 is made

 None of these worked.

 Any ideas?

 -AP_








RE: Question regarding servers as clients to other servers...

2001-03-22 Thread Alex Paransky

But it does work, except now, I am getting a ClassCastException where
before, when I deployed the web and ebj in the same server with the
parent="..." tag I was not getting a class cast exception.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Claudio
Cordova
Sent: Thursday, March 22, 2001 4:30 PM
To: Orion-Interest
Subject: RE: Question regarding servers as clients to other servers...


Hey Alex...How are you

Have you tried in WEB-INF/classes/META-INF/application-client.xml


Claudio


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
 Sent: Thursday, March 22, 2001 3:58 PM
 To: Orion-Interest
 Subject: RE: Question regarding servers as clients to other servers...


 I have one application talking with another on a different server.  In the
 first application I try to create a new InitialContext() with proper
 parameters to talk to the other server, but Get the error saying that
 META-INF/application-client.xml is not found. I do not know where in the
 deployment of the first application I need to put a META-INF.

 Thanks.

 -AP_

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
 Sent: Thursday, March 22, 2001 12:41 PM
 To: Orion-Interest
 Subject: Question regarding servers as clients to other servers...


 I am configuring two Orion application servers.  The first server (JSP) is
 going to be a client of the second server (EJB).  In the
 application running
 on the first server, I try to create IntialContext with
 parameters pointing
 to the second server, but I get the following exception:

 javax.servlet.jsp.JspException: javax.naming.NamingException:
 META-INF/application-client.xml resource not found

 I understand that I need to have META-INF/application-client.xml,
 but where
 do I put it?

 I tried putting it:

 1. Directory where I start orion
 2. Directory under Application in which a call to new
 IntialContext is made
 3. Directory under Module in the Application in which the new
 IntialContext
 is made

 None of these worked.

 Any ideas?

 -AP_








RE: Question regarding servers as clients to other servers...

2001-03-22 Thread Alex Paransky

It seems to be working now, but everytime I attempt to access another orion
server, from an orion server, I get a "domain was null" exception message.

Creating remote context to: ormi://sergio/symbiosis-server
java.lang.NullPointerException: domain was null at
com.evermind.server.rmi.RMIServer.fw(JAX)
at com.evermind.server.rmi.RMIServer.e7(JAX)
at
com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(JAX)
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(JAX)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.init(InitialContext.java:198)

Does any one know what is the problem.  The same exact code connects
correctly to the server, when running from a STANDALONE ejb client.  I am
not sure why this would not work from SERVER to SERVER, but works from
CLIENT to SERVER?

Any Ideas?

Thanks.
-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Claudio
Cordova
Sent: Thursday, March 22, 2001 5:54 PM
To: Orion-Interest
Subject: RE: Question regarding servers as clients to other servers...


META-INF is should be at the root of your client classes in the classpath.
claudio

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
 Sent: Thursday, March 22, 2001 5:25 PM
 To: Orion-Interest
 Subject: RE: Question regarding servers as clients to other servers...


 Hi Claudio, what makes Orion look into WEB-INF/classes?  To find the
 META-INF?

 Thanks
 -AP_

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Claudio
 Cordova
 Sent: Thursday, March 22, 2001 4:30 PM
 To: Orion-Interest
 Subject: RE: Question regarding servers as clients to other servers...


 Hey Alex...How are you

 Have you tried in WEB-INF/classes/META-INF/application-client.xml


 Claudio


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
  Sent: Thursday, March 22, 2001 3:58 PM
  To: Orion-Interest
  Subject: RE: Question regarding servers as clients to other servers...
 
 
  I have one application talking with another on a different
 server.  In the
  first application I try to create a new InitialContext() with proper
  parameters to talk to the other server, but Get the error saying that
  META-INF/application-client.xml is not found. I do not know where in the
  deployment of the first application I need to put a META-INF.
 
  Thanks.
 
  -AP_
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
  Sent: Thursday, March 22, 2001 12:41 PM
  To: Orion-Interest
  Subject: Question regarding servers as clients to other servers...
 
 
  I am configuring two Orion application servers.  The first
 server (JSP) is
  going to be a client of the second server (EJB).  In the
  application running
  on the first server, I try to create IntialContext with
  parameters pointing
  to the second server, but I get the following exception:
 
  javax.servlet.jsp.JspException: javax.naming.NamingException:
  META-INF/application-client.xml resource not found
 
  I understand that I need to have META-INF/application-client.xml,
  but where
  do I put it?
 
  I tried putting it:
 
  1. Directory where I start orion
  2. Directory under Application in which a call to new
  IntialContext is made
  3. Directory under Module in the Application in which the new
  IntialContext
  is made
 
  None of these worked.
 
  Any ideas?
 
  -AP_
 
 
 








What does domain was null message mean in the following exception???

2001-03-22 Thread Alex Paransky

java.lang.NullPointerException: domain was null
at com.evermind.server.rmi.RMIServer.fw(JAX)
at com.evermind.server.rmi.RMIServer.e7(JAX)
at
com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(JAX)
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(JAX)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.init(InitialContext.java:198)

This only happends when I connect from SERVER to SERVER, it does not occur
and works properly when I try CLIENT to SERVER.

Thanks.
-AP_





RE: Problems with JNDI lookups of ejb-ref-name defined inapplication-client.xml from a client application...

2001-03-16 Thread Alex Paransky

I think application-client.xml is broken in Orion.  The whole purpose of
having application-client.xml is to be able to map a client written by one
vendor, to the EJB written by another vendor.  Has any one been able to
"properly" use application-clientejb-ref to map ejb-ref-name to
ejb-link where both are NOT the same string?

Thanks.
-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Thursday, March 15, 2001 2:11 PM
To: Orion-Interest
Subject: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


I have a client application which has META-INF with the following
application-client.xml definition:

application-client
  ejb-ref
ejb-ref-nameejb/id/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homecom.indnet.model.id.IdSessionHome/home
remotecom.indnet.model.id.IdSession/remote
ejb-linkId/ejb-link
  /ejb-ref
/application-client

In the client, I attempt to do the following:

new InitialContext().lookup("ejb/id");

The above fails with the naming exception, telling me that ejb/id cannot be
found:

Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.naming.jz.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.indnet.model.id.test.Client.main(Client.java:16)

If I change my client line to read:

new InitialContext().lookup("Id");

Things work correctly.  "Id" is the ejb-name used for my object:

enterprise-beans
session
  ejb-nameId/ejb-name
  homecom.indnet.model.id.IdSessionHome/home
  remotecom.indnet.model.id.IdSession/remote
  ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
  session-typeStateless/session-type
...

What is the purpose of application-client.xml if I cannot create references
and use the name specified in ejb-ref-name to lookup the components?  Or
am I missing something?

Thanks.
-AP_







RE: Problems with JNDI lookups of ejb-ref-name defined inapplication-client.xml from a client application...

2001-03-16 Thread Alex Paransky

You are exactly correct.  This IS how it is working in Orion but this does
not seem to the correct.

Suppose you have an EJB that implements some STANDARD interface already
defined, deployed and used by many applications and from many places.  You
buy a client application from a vendor who has implemented a new GUI to work
with this STANDARD interface.  The vendor defines application-client.xml and
you need to augment it with ejb-link to point to the actual bean.  The
vendor DOES NOT know what is the REAL PHYSICAL name of the bean which
implemented the STANDARD interface in your environment, so there is no way
for the vendor to do a lookup based on "beanName".  The client vendor writes
his application to lookup on the value in ejb-ref-name.

If this is the way Orion is working, this appears to be somewhat of a
serious bug.

By the way, when I try to use "java:comp/env" from my client, I get the
following exception:

Exception in thread "main" javax.naming.NamingException: java:comp/env
namespace is only available from within a J2EE component
at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon
text.java:392)
at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at client.PersonClient.main(PersonClient.java:25)

Should I record this as a bug, or does any one have other ideas?

Thanks to all that replied
-AP_


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bruno Baloi
Sent: Friday, March 16, 2001 6:54 AM
To: Orion-Interest
Subject: RE: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


Hia guys,


Here is a bit of my experience with this stuff - I found out that if I
have a regular Java client it's the ejb-jar.xml's ejb-name that is
being used to lookup the bean name without the comp/env. The comp/env is
only to be used by J2ee clients i.e. servlets or JSPs. For the J2EE
clients, it is the ejb-ref name that is used in the lookup.

It's weird as all hell !! But that how  I found out about this. IN other
words whatever you are using for the Home's lookup will depend on the
type of client you are using. To recap - for Java clients use
lookup("beanName") for J2EE clients ("java:comp/env/beanName")

Try giving this a try 

Good Luck



-Original Message-
From:   Magnus Rydin [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, March 16, 2001 4:30 AM
To: Orion-Interest
Subject:SV: Problems with JNDI lookups of ejb-ref-name
defined in application-client.xml  from a client application...

Did you try looking up "java:comp/env/ejb/id" ?
WR

     -Ursprungligt meddelande-
 Frn: Alex Paransky [
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
 Skickat: den 15 mars 2001 14:11
 Till: Orion-Interest
 mne: Problems with JNDI lookups of ejb-ref-name defined in
 application-client.xml from a client application...


 I have a client application which has META-INF with the
following
 application-client.xml definition:

 application-client
   ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
   /ejb-ref
 /application-client

 In the client, I attempt to do the following:

 new InitialContext().lookup("ejb/id");

 The above fails with the naming exception, telling me that
 ejb/id cannot be
 found:

 Exception in thread "main"
 javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at
javax.naming.InitialContext.lookup(InitialContext.java:350)
 at
com.indnet.model.id.test.Client.main(Client.java:16)

 If I change my client line to read:

 new InitialContext().lookup("Id");

 Things work correctly.  "Id" is the ejb-name used for my
object:

 enterprise-beans
 session
   ejb-nameId/ejb-name
   homecom.indnet.model.id.IdSessionHome/home
   remotecom.indnet.model.id.IdSession/remote
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class

   session-typeStateless/session-type
   ...

 What is the purpose of application-client.xml if I cannot
 create references
 and use the n

RE: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-16 Thread Alex Paransky



I 
tried that before, and got the following exception:

Exception in thread "main" javax.naming.NamingException: java:comp/env 
namespace is only available from within a J2EE 
component at 
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLContext.java:392) 
at 
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51) 
at 
javax.naming.InitialContext.lookup(InitialContext.java:350) 
at client.PersonClient.main(PersonClient.java:25)
Is 
this a bug?

-AP_
 
 

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus 
  RydinSent: Friday, March 16, 2001 1:30 AMTo: 
  Orion-InterestSubject: SV: Problems with JNDI lookups of 
  ejb-ref-name defined in appli cation-client.xml from a client 
  application...
  Did you try looking up "java:comp/env/ejb/id" ? 
  WR 
   -Ursprungligt meddelande-  Från: Alex Paransky [mailto:[EMAIL PROTECTED]] 
   Skickat: den 15 mars 2001 14:11  Till: Orion-Interest  Ämne: Problems 
  with JNDI lookups of ejb-ref-name defined in  application-client.xml from a client application... 
 I have a client application which has META-INF with the 
  following  application-client.xml 
  definition:   
  application-client  
  ejb-ref  
  ejb-ref-nameejb/id/ejb-ref-name  
  ejb-ref-typeSession/ejb-ref-type  
  homecom.indnet.model.id.IdSessionHome/home  
  remotecom.indnet.model.id.IdSession/remote  ejb-linkId/ejb-link 
   /ejb-ref  /application-client  
   In the client, I attempt to do the 
  following:   new 
  InitialContext().lookup("ejb/id");  
   The above fails with the naming exception, 
  telling me that  ejb/id cannot be  found:   
  Exception in thread "main"  
  javax.naming.NameNotFoundException: ejb/id not  
  found  at 
  com.evermind.server.rmi.RMIContext.lookup(JAX)  at 
  com.evermind.naming.jz.lookup(JAX)  at 
  javax.naming.InitialContext.lookup(InitialContext.java:350)  at 
  com.indnet.model.id.test.Client.main(Client.java:16)   If I change my client line to 
  read:   new 
  InitialContext().lookup("Id");   Things work correctly. "Id" is the ejb-name used for 
  my object:   
  enterprise-beans  
  session  
  ejb-nameId/ejb-name  
  homecom.indnet.model.id.IdSessionHome/home  
  remotecom.indnet.model.id.IdSession/remote  
  ejb-classcom.indnet.model.id.IdSessionBean/ejb-class 
   
  session-typeStateless/session-type   ...  
   What is the purpose of application-client.xml if 
  I cannot  create references  and use the name specified in ejb-ref-name to lookup the 
   components? Or  
  am I missing something?   Thanks.  -AP_
  


RE: Problems with JNDI lookups of ejb-ref-name defined inapplication-client.xml from a client application...

2001-03-16 Thread Alex Paransky

Well, if that's the case, then what's the point of putting ejb-ref in to the
application-client?  The client can just always lookup by absolute name
inthe JNDI namespace.  And how would an independent client developer
possibly know the EJB names deployed in your custom environment?

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Hubbach
Sent: Friday, March 16, 2001 8:00 AM
To: Orion-Interest
Subject: Re: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


Just a sidenote, maybe it's your problem. From page 377 of Enterprise
JavaBeans, 2nd Edition (Oreilly):

"The ejb-link value must match one of the ejb-name values declared in the
same
deployment descriptor."

That is, it's only valid if you're using an ejb-jar.xml to define multiple
beans.

Jeff Hubbach.

Alex Paransky wrote:

 I have a client application which has META-INF with the following
 application-client.xml definition:

 application-client
   ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
   /ejb-ref
 /application-client

 In the client, I attempt to do the following:

 new InitialContext().lookup("ejb/id");

 The above fails with the naming exception, telling me that ejb/id cannot
be
 found:

 Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at com.indnet.model.id.test.Client.main(Client.java:16)

 If I change my client line to read:

 new InitialContext().lookup("Id");

 Things work correctly.  "Id" is the ejb-name used for my object:

 enterprise-beans
 session
   ejb-nameId/ejb-name
   homecom.indnet.model.id.IdSessionHome/home
   remotecom.indnet.model.id.IdSession/remote
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
   session-typeStateless/session-type
 ...

 What is the purpose of application-client.xml if I cannot create
references
 and use the name specified in ejb-ref-name to lookup the components?  Or
 am I missing something?

 Thanks.
 -AP_

--
Jeff Hubbach
Internet Developer
New Media Designs, Inc.
www.nmd.com








JNDI problems from client applications!!!

2001-03-16 Thread Alex Paransky

This error message occurs when I have an application-client.xml without any
ejb-ref entities in there and orion server has been restarted prior to start
up of client.  The second time around client works correctly.

Exception in thread "main" javax.naming.NamingException: Disconnected:
Unknown c
ommand: 7
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.naming.jz.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.indnet.model.user.test.Client.main(Client.java:22)

If on the other hand, I put a reference to the bean that the client is using
into the application-client using ejb-ref, I get the following exception
when the client first starts up after orion restart:

Exception in thread "main" javax.naming.NamingException: Error reading
application-client descriptor: No location specified and no suitable
instance of the type 'com.indnet.model.IdSession' found for the ejb-ref
com.indnet.model.Id
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(JAX)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.init(InitialContext.java:178)
at
com.indnet.model.common.InitialContextFinder.getContext(InitialContextFinder
.java:27)
at
com.indnet.model.common.InitialContextFinder.getInitialContext(InitialContex
tFinder.java:13)
at com.indnet.model.user.test.Client.main(Client.java:17)

The second time I run the client, it works!  What's going on?

-AP_





Questions regarding 1-n bi-directional relationships...

2001-03-16 Thread Alex Paransky

I have an entity called Account, and User.  One Account can have many Users
(bi-directional relationship).  When I add a new User to the Account, the
relationship table gets updated, but the AccountId field in the User table
is not updated.  Is this normal?  It thought that
account.getUsers().addUser(user) should BOTH update the relationship table
and configure the accountId field in the User table.

Can someone verify this?

Thanks.
-AP_





How to use CMP to find by custom types...

2001-03-15 Thread Alex Paransky



I am trying to implement Collection 
findByTarget(Target t) throws FinderException, RemoteException, method using 
Orion's CMP. My target is defined as follows:

public class Target implements java.io.Serializable 
{
 private long id;
 private String for;

 ...
 public long getId() {return 
id;}
 public String getFor() {return 
for;}
};

How can I tell Orion in orion-ejb-jar.xml to 
execute $1.getId() or $1.getFor() on the argument before using it in the 
query? The "spirit" of the query I really want to be generated 
is:

select * from myTable where myTable.i = (value of 
$1.getId()) and myTable.b = (value of $1.getFor())

Thanks.
-AP_


Exception occurs when client is first started after orion restart...

2001-03-15 Thread Alex Paransky

I start Orion 1.4.7 and then run my client.  I get an exception.  I run the
client again, this time it works correctly.  The client does not have any
persistent state, so the "SAME" code and functions are executed every time.
The following trace shows, the first time I run, and then the second time I
run.

Does anyone have any idea of what is going on?

C:\work\individualnetwork\model\user\testjava
com.indnet.model.user.test.Client
javax.naming.NamingException: Error reading application-client descriptor:
No location specified and no suitable instance of the type
'com.indnet.model.IdSession' found for the ejb-ref com.indnet.model.Id
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(JAX)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.init(InitialContext.java:178)
at
com.indnet.model.common.InitialContextFinder.getContext(InitialContextFinder
.java:26)
at
com.indnet.model.common.InitialContextFinder.getInitialContext(InitialContex
tFinder.java:13)
at com.indnet.model.common.HomeFinder.getHome(HomeFinder.java:28)
at
com.indnet.model.user.UserEntityHomeFinder.getHome(UserEntityHomeFinder.java
:20)
at com.indnet.model.user.test.Client.main(Client.java:16)
Exception in thread "main"
C:\work\individualnetwork\model\user\testjava
com.indnet.model.user.test.Client
156

C:\work\individualnetwork\model\user\test

The exception is talking about com.indnet.model.IdSession, but I am not even
using this in my client, here is how my application-client looks like:

application-client
  ejb-ref
ejb-ref-namecom.indnet.model.User/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homecom.indnet.model.user.UserEntityHome/home
remotecom.indnet.model.user.UserEntity/remote
ejb-linkcom.indnet.model.User/ejb-link
  /ejb-ref
/application-client

Any ideas?

Thanks.
-AP_






Common access method for homes...

2001-03-15 Thread Alex Paransky

I am trying to create a class than can be used to access the home of a
particular bean.  For example, if I have an EJB called UserEntity, I would
create a special class called UserEntityHomeFinder which can be used to
easily obtain a home:

public class UserEntityHomeFinder {
  private static final HomeFinder
homeFinder =
new HomeFinder("com.indnet.model.User", UserEntityHome.class);

  public static UserEntityHome getHome() throws NamingException {
return
  (UserEntityHome) homeFinder.getHome();
  }
};

As you can see, this class defines the name of the home interface.  I used
to use java:comp/env, however, the exception I got was that java:comp/env
was not available from a standalone client application.

So my question is this, is there a way to setup the naming conventions, so
that the CLIENT and SERVER can use uniform naming conventions to access the
homes of the bean?

Thanks.
-AP_





Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-15 Thread Alex Paransky

I have a client application which has META-INF with the following
application-client.xml definition:

application-client
  ejb-ref
ejb-ref-nameejb/id/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homecom.indnet.model.id.IdSessionHome/home
remotecom.indnet.model.id.IdSession/remote
ejb-linkId/ejb-link
  /ejb-ref
/application-client

In the client, I attempt to do the following:

new InitialContext().lookup("ejb/id");

The above fails with the naming exception, telling me that ejb/id cannot be
found:

Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.naming.jz.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.indnet.model.id.test.Client.main(Client.java:16)

If I change my client line to read:

new InitialContext().lookup("Id");

Things work correctly.  "Id" is the ejb-name used for my object:

enterprise-beans
session
  ejb-nameId/ejb-name
  homecom.indnet.model.id.IdSessionHome/home
  remotecom.indnet.model.id.IdSession/remote
  ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
  session-typeStateless/session-type
...

What is the purpose of application-client.xml if I cannot create references
and use the name specified in ejb-ref-name to lookup the components?  Or
am I missing something?

Thanks.
-AP_






Implementing CMP finders with non-native argument types...

2001-03-11 Thread Alex Paransky

I am creating a finder which takes a type of Target object to find.  So, my
home interface looks like this:

Collection findByTarget(Target o) 

The SQL I want to ultimately generate should look something like this:

select * from myTable where id = ?1.getId();

Please note, that what's stored in the table is something called id, but I
need to extract that id from the Target by using the Target.getId() API
before using it in the SQL.

Is there a way to do this, or are CMP finders always doomed to accept only
primitive types?

Thanks.
-AP_





EJB encapsulation (data hiding) pattern... Is there such a thing?

2001-03-11 Thread Alex Paransky

I am trying to model a Person having many Phones with two Entity beans.
Person and Phone are both entity beans.  But I do not want to allow anyone
to manipulate the Phone directly.  I only want Person to be able to:

Person.addPhone(PhoneValue)
Person.removePhone(PhoneKey)
Person.updatePhone(PhoneKey, PhoneValue)
Person.getPhones().

In other words, Phone is treated like a dependent (except on advice of
others, I have stopped using dependent objects).

Is there a way I can enforce this?  In other words, how can I stop any one
except Person, from using the PhoneHome/PhoneBean directly?  The reason I
need to do this, is because Person performs additional logic when phones are
added or removed or changed.  This logic, must always be performed, so I do
not want someone to use the PhoneHome to find the Phone and change it
without the person knowing.

-AP_
www: http://www.standardset.com
resume: http://www.standardset.com/resume_body.jsp
home: (818) 541-0029





Using Orion with Apache...

2001-03-07 Thread Alex Paransky

If I follow the documentation on http://orionsupport.com and configure
Apache as reverse proxy, how do I deal with SSL?  In other words, if user is
trying to access https://www.bigcorp.com/myapp/index.jsp which is configured
to proxy to ORION, do I still need to install the SSL on the Orion server,
or would Apache handle the SSL encryption when it forwards the request to
Orion?

Thanks.
-AP_





RE: Using Orion with Apache...

2001-03-07 Thread Alex Paransky

I am trying to put a together a proposal for a client using OrionServer, and
not sure about how SSL will work.  The client is already running Apache and
would like to continue using it.  Is it Apache, that's going to
encode/decode the SSL communication, or is it still the job of Orion do
this?

Thanks for your help.
-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Wednesday, March 07, 2001 12:10 AM
To: Orion-Interest
Subject: Using Orion with Apache...


If I follow the documentation on http://orionsupport.com and configure
Apache as reverse proxy, how do I deal with SSL?  In other words, if user is
trying to access https://www.bigcorp.com/myapp/index.jsp which is configured
to proxy to ORION, do I still need to install the SSL on the Orion server,
or would Apache handle the SSL encryption when it forwards the request to
Orion?

Thanks.
-AP_






  1   2   >