RE: Concurrent calls to Session bean methods

2002-03-21 Thread Djemal, Guy (TWIi London)

I was also wondering about this. Of course since the webcontroller is not an
EJB it is allowed to use the otherwise banned synchronized keyword!

Guy.

 -Original Message-
 From: The elephantwalker [mailto:[EMAIL PROTECTED]]
 Sent: 21 March 2002 04:48
 To: Orion-Interest
 Subject: RE: Concurrent calls to Session bean methods
 
 
 John,
 
 Here is the offending class, compliments of the Sun Blueprint team:
 
 public class ShoppingClientControllerWebImpl implements 
 WebClientController
 {
 
 private ShoppingClientControllerLocal sccEjb;
 private HttpSession session;
 
 public ShoppingClientControllerWebImpl() {
 }
 
 //   ... stuff...
 //
 
 // the important bit ...
 
 public synchronized EventResponse handleEvent(Event ev)
 throws EventException {
 return sccEjb.processEvent(ev);
 }
 
 }
 
 So you see that the webcontroller is the _only_ access to the 
 sfsb. And the
 only call is synchronized, thus preventing cocurrent calls to 
 the stateful
 session bean.
 
 regards,
 
 the elephantwalker
 www.elephantwalker.com
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, March 20, 2002 12:05 PM
 To: Orion-Interest
 Subject: RE: Concurrent calls to Session bean methods
 
 
 
 I haven't seen the history on this issue, but it interests 
 me.  I had a
 quick look at the ShoppingClientControllerEJB class that is 
 given as an
 example by Sun in the Session Facade design pattern, but 
 couldn't see where
 they are synchronizing calls.  Can you provide some more clues?
 
 Thanks,
 
 John H.
 
 
 
 The elephantwalker
 [EMAIL PROTECTED]   To:
 [EMAIL PROTECTED]
 Sent by: cc:
 owner-orion-interest@orion   Subject: RE:
 Concurrent calls to Session bean methods
 server.com
 
 
 03/19/02 10:31 PM
 Please respond to
 Orion-Interest
 
 
 
 
 
 
 Vani,
 
 You can use the petstore trick. Use a facade class which 
 sychronizes each
 call to your session bean. That should do the trick.
 
 This is a _famous_ problem with session beans.
 
 regards,
 
 the elephantwalker
 www.elephantwalker.com
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Vani H.S.
 Sent: Wednesday, March 20, 2002 12:04 AM
 To: Orion-Interest
 Subject: Concurrent calls to Session bean methods
 
 
 Hello All,
 
   I have been trying to deploy an application consisting of 
 session beans
 and mdbs onto orion1.5.4.
   But I seem to run into deadlocks, because my session bean 
 gets called
 concurrently. Please can anybody can tell me if there is a 
 setting to allow
 concurrent calls so that, when a session bean method is 
 called at one time,
 the EJB container blocks the concurrent method call and allows it to
 proceed
 when the previous call has completed?
   If not, how should this problem of concurrent calls be 
 handled in orion?
   Please help.
 Thanks,
 Vani
 
 
 
 
 
 The allow-concurrent-calls element specifies whether a 
 stateful session
 bean
 instance allows concurrent method calls. By default,
 allows-concurrent-calls
 is false. However, when this value is set to true, the EJB 
 container blocks
 the concurrent method call and allows it to proceed when the 
 previous call
 has completed.
 
 
 
 
 
 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.com
 
 
 
 
 
 
 
 


DISCLAIMER - The preceding e-mail message (including any attachments)
contains information that may be confidential, may be protected by the
attorney-client or other applicable privileges, or may constitute non-public
information.  It is intended to be conveyed only to the designated
recipient(s) named above.  If you are not an intended recipient of this
message, or have otherwise received it in error, please notify the sender by
replying to this message and then delete all copies of it from your computer
system.  Any use, dissemination, distribution, or reproduction of this
message by unintended recipients is not authorized and may be unlawful. The
contents of this communication do not necessarily represent the views of
this company.




Re: Concurrent calls to Session bean methods

2002-03-21 Thread Mike Conway

there is a controller webimpl that acts as a facade, and that method is 
synchronized...



[EMAIL PROTECTED] wrote:

I haven't seen the history on this issue, but it interests me.  I had a
quick look at the ShoppingClientControllerEJB class that is given as an
example by Sun in the Session Facade design pattern, but couldn't see where
they are synchronizing calls.  Can you provide some more clues?

Thanks,

John H.


  
 
The elephantwalker  
 
[EMAIL PROTECTED]   To: 
[EMAIL PROTECTED]
Sent by: cc:  
 
owner-orion-interest@orion   Subject: RE: Concurrent 
calls to Session bean methods 
server.com
 
  
 
  
 
03/19/02 10:31 PM 
 
Please respond to 
 
Orion-Interest
 
  
 
  
 




Vani,

You can use the petstore trick. Use a facade class which sychronizes each
call to your session bean. That should do the trick.

This is a _famous_ problem with session beans.

regards,

the elephantwalker
www.elephantwalker.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Vani H.S.
Sent: Wednesday, March 20, 2002 12:04 AM
To: Orion-Interest
Subject: Concurrent calls to Session bean methods


Hello All,

  I have been trying to deploy an application consisting of session beans
and mdbs onto orion1.5.4.
  But I seem to run into deadlocks, because my session bean gets called
concurrently. Please can anybody can tell me if there is a setting to allow
concurrent calls so that, when a session bean method is called at one time,
the EJB container blocks the concurrent method call and allows it to
proceed
when the previous call has completed?
  If not, how should this problem of concurrent calls be handled in orion?
  Please help.
Thanks,
Vani





The allow-concurrent-calls element specifies whether a stateful session
bean
instance allows concurrent method calls. By default,
allows-concurrent-calls
is false. However, when this value is set to true, the EJB container blocks
the concurrent method call and allows it to proceed when the previous call
has completed.





_
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com













What's the difference between Oracle 9i App Server Release @ and orion 1.5.4?

2002-03-21 Thread @Basebeans.com

Subject: What's the difference between Oracle 9i App Server Release @ and orion 1.5.4?
From: alt.cybercafes [EMAIL PROTECTED]
 ===
This is a multi-part message in MIME format.

--=_NextPart_000_0158_01C1D0CA.5046C130
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

What's the difference between Oracle 9i App Server Release @ and orion =
1.5.4? Do they support EJB2.0, etc.?




--=_NextPart_000_0158_01C1D0CA.5046C130
Content-Type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META http-equiv=3DContent-Type content=3Dtext/html; =
charset=3Diso-8859-1
META content=3DMSHTML 6.00.2713.1100 name=3DGENERATOR
STYLE/STYLE
/HEAD
BODY
DIV
PFONT face=3DArial size=3D2What's the difference between Oracle 9i =
App Server=20
Release @ and orion 1.5.4/FONT? Do they support EJB2.0, etc.?/P
Pnbsp;/P/DIV/BODY/HTML

--=_NextPart_000_0158_01C1D0CA.5046C130--





Some more help with SwiftMQ and Orion

2002-03-21 Thread Vani H.S.

Hello All,
  My earlier message on the same topic got lost, I think.
  Anyways, I have successfully integrated SwiftMQ with Orion 1.5.4
I have been able to create queues and I am even able to deploy MDBs.

   I am facing a strange problem. For my MDB, in the orion-ejb-jar.xml, I
have given the following settings.
message-driven-deployment name=SystemMessageEJB
destination-location=java:comp/resource/SwiftMQ/SystemQueue
connection-factory-location=java:comp/resource/SwiftMQ/QueueConnectionFactory
max-instances=1 min-instances=1 cache-timeout=never /

But somehow, when my application runs, I see that the SystemMessageBean's
ejbCreate is called once again in the code. I don't know why this is
happening. Please can anybody suggest any solution to this problem? Now I am
really confused as to whether MDBs are getting created in Orion or SwiftMQ.
Why is  the setting my orion-ejb-jar.xml getting ignored? Please help.

Thanks,
Vani



_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com





Re: What's the difference between Oracle 9i App Server Release @ and orion 1.5.4?

2002-03-21 Thread Ray Harrison

In case there is any confusion, Oracle 9iAS has, among many other things, a j2ee 
container
licensed from the Orion code-base. The j2ee container is OC4J.

Besides cost, there are a number of differences - Orion 1.5.4 has more of the ejb2.0 
spec
implemented, though they are still working on it. OC4J has introduced things like 
ejb-clustering
and has support for j2ee-style connectors and a few more tuning parameters.

Cheers
Ray


--- Orion Newsgroup [EMAIL PROTECTED] wrote:
 Subject: What's the difference between Oracle 9i App Server Release @ and orion 
1.5.4?
 From: alt.cybercafes [EMAIL PROTECTED]
  == This is a multi-part message in MIME format.

 --=_NextPart_000_0158_01C1D0CA.5046C130
 Content-Type: text/plain;
   charset=iso-8859-1
 Content-Transfer-Encoding: quoted-printable

 What's the difference between Oracle 9i App Server Release @ and orion  1.5.4? Do 
they support EJB2.0, etc.?




 --=_NextPart_000_0158_01C1D0CA.5046C130
 Content-Type: text/html;
   charset=iso-8859-1
 Content-Transfer-Encoding: quoted-printable

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
 HTMLHEAD
 META http-equiv=Content-Type content=text/html;  charset=iso-8859-1
 META content=MSHTML 6.00.2713.1100 name=GENERATOR
 STYLE/STYLE
 /HEAD
 BODY
 DIV
 PFONT face=Arial size=2What's the difference between Oracle 9i  App Server 
 Release @ and orion 1.5.4/FONT? Do they support EJB2.0, etc.?/P
 Pnbsp;/P/DIV/BODY/HTML

 --=_NextPart_000_0158_01C1D0CA.5046C130--




__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/




RE: User Manager Questions

2002-03-21 Thread The elephantwalker

Anil,

You might try looking at our tutorial on user security ...

http://www.elephantwalker.com/rfa?id=404

You will need to get an account, but its free to join.

Its important that bit in your applications is followed...

META-INF/application.xml  --should have the j2ee roles, and
java-application client.
META-INF/orion-application.xml -- should have the group/role mapping
META-INF/principals.xml   --- should have the groups listed which are in
your user database, and permissions for their access ...

regards,

the elephantwalker
www.elephantwalker.com




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Anil D
Sent: Thursday, March 21, 2002 6:16 AM
To: Orion-Interest
Subject: User Manager Questions


Hi all
I have some questions regarding the use of UserManager

I have implemented a custom User Manager in our application and specified it
in the orion-application.xml. On server startup the init method of the
UserManager is executed, but while trying to login from an Application
Client(Swing) it wasnt going to any of the Methods in my Custom User
Manager.
It was only allowing the users in my principals.xml.

Is it supposed to work this way? How do I allow the usernames in my
databases to login?

I also tried to use the RoleManager. But when I try to lookup RoleManager
from the Client side it throws a name not found exception.

TIA
Anil





EJB failover/replication?

2002-03-21 Thread Michael Crozier


Hello,

  I'm starting to evaluate Orion as a application server for a project and 
I'm trying to figure out if/how Orion supports EJB failover.  Oracle/AS 
appears to, but I can't tell if thats a feature that they added on top of 
Orion.

If EJB failover/replication is supported, could somebody point me to any 
documentation?

Thanks,

  Michael




Re: Concurrent calls to Session bean methods

2002-03-21 Thread Romen Law

ello,

What if the application is deployed in a cluster (even the web tier)? Would
that nullify the synchronised effect?

cheers
romen

- Original Message -
From: The elephantwalker [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 3:47 PM
Subject: RE: Concurrent calls to Session bean methods


 John,

 Here is the offending class, compliments of the Sun Blueprint team:

 public class ShoppingClientControllerWebImpl implements
WebClientController
 {

 private ShoppingClientControllerLocal sccEjb;
 private HttpSession session;

 public ShoppingClientControllerWebImpl() {
 }

 //   ... stuff...
 //

 // the important bit ...

 public synchronized EventResponse handleEvent(Event ev)
 throws EventException {
 return sccEjb.processEvent(ev);
 }

 }

 So you see that the webcontroller is the _only_ access to the sfsb. And
the
 only call is synchronized, thus preventing cocurrent calls to the stateful
 session bean.

 regards,

 the elephantwalker
 www.elephantwalker.com

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, March 20, 2002 12:05 PM
 To: Orion-Interest
 Subject: RE: Concurrent calls to Session bean methods



 I haven't seen the history on this issue, but it interests me.  I had a
 quick look at the ShoppingClientControllerEJB class that is given as an
 example by Sun in the Session Facade design pattern, but couldn't see
where
 they are synchronizing calls.  Can you provide some more clues?

 Thanks,

 John H.



 The elephantwalker
 [EMAIL PROTECTED]   To:
 [EMAIL PROTECTED]
 Sent by: cc:
 owner-orion-interest@orion   Subject: RE:
 Concurrent calls to Session bean methods
 server.com


 03/19/02 10:31 PM
 Please respond to
 Orion-Interest






 Vani,

 You can use the petstore trick. Use a facade class which sychronizes each
 call to your session bean. That should do the trick.

 This is a _famous_ problem with session beans.

 regards,

 the elephantwalker
 www.elephantwalker.com


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Vani H.S.
 Sent: Wednesday, March 20, 2002 12:04 AM
 To: Orion-Interest
 Subject: Concurrent calls to Session bean methods


 Hello All,

   I have been trying to deploy an application consisting of session beans
 and mdbs onto orion1.5.4.
   But I seem to run into deadlocks, because my session bean gets called
 concurrently. Please can anybody can tell me if there is a setting to
allow
 concurrent calls so that, when a session bean method is called at one
time,
 the EJB container blocks the concurrent method call and allows it to
 proceed
 when the previous call has completed?
   If not, how should this problem of concurrent calls be handled in orion?
   Please help.
 Thanks,
 Vani





 The allow-concurrent-calls element specifies whether a stateful session
 bean
 instance allows concurrent method calls. By default,
 allows-concurrent-calls
 is false. However, when this value is set to true, the EJB container
blocks
 the concurrent method call and allows it to proceed when the previous call
 has completed.





 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.com














Re: EJB failover/replication?

2002-03-21 Thread Ray Harrison

I believe that particular feature was added on top of Orion - not sure if Orion will 
add that at a
future date.
Cheers
Ray
--- Michael Crozier [EMAIL PROTECTED] wrote:

 Hello,

   I'm starting to evaluate Orion as a application server for a project and
 I'm trying to figure out if/how Orion supports EJB failover.  Oracle/AS
 appears to, but I can't tell if thats a feature that they added on top of
 Orion.

 If EJB failover/replication is supported, could somebody point me to any
 documentation?

 Thanks,

   Michael



__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/




Auto-reply: EJB failover/replication?

2002-03-21 Thread Sam Chou

I am on vacation from 3/1 to 3/22.  Please contact my
manger, Wendy Liau for any issue.

Sam

---BeginMessage---


Hello,

  I'm starting to evaluate Orion as a application server for a project and 
I'm trying to figure out if/how Orion supports EJB failover.  Oracle/AS 
appears to, but I can't tell if thats a feature that they added on top of 
Orion.

If EJB failover/replication is supported, could somebody point me to any 
documentation?

Thanks,

  Michael


---End Message---


RE: Concurrent calls to Session bean methods

2002-03-21 Thread The elephantwalker

The sfsb has a _session_ which is bound to the client. So the client could
be anywhere, irregardless of a cluster.

oc4j has a last method state replication which makes sure that all sfsb's
have the same _session_.

A slsb wouldn't care, and doesn't have the same problem with concurrency,
since they are not reentrant.

regards,

the elephantwalker




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Romen Law
Sent: Thursday, March 21, 2002 2:33 PM
To: Orion-Interest
Subject: Re: Concurrent calls to Session bean methods


ello,

What if the application is deployed in a cluster (even the web tier)? Would
that nullify the synchronised effect?

cheers
romen

- Original Message -
From: The elephantwalker [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 3:47 PM
Subject: RE: Concurrent calls to Session bean methods


 John,

 Here is the offending class, compliments of the Sun Blueprint team:

 public class ShoppingClientControllerWebImpl implements
WebClientController
 {

 private ShoppingClientControllerLocal sccEjb;
 private HttpSession session;

 public ShoppingClientControllerWebImpl() {
 }

 //   ... stuff...
 //

 // the important bit ...

 public synchronized EventResponse handleEvent(Event ev)
 throws EventException {
 return sccEjb.processEvent(ev);
 }

 }

 So you see that the webcontroller is the _only_ access to the sfsb. And
the
 only call is synchronized, thus preventing cocurrent calls to the stateful
 session bean.

 regards,

 the elephantwalker
 www.elephantwalker.com

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, March 20, 2002 12:05 PM
 To: Orion-Interest
 Subject: RE: Concurrent calls to Session bean methods



 I haven't seen the history on this issue, but it interests me.  I had a
 quick look at the ShoppingClientControllerEJB class that is given as an
 example by Sun in the Session Facade design pattern, but couldn't see
where
 they are synchronizing calls.  Can you provide some more clues?

 Thanks,

 John H.



 The elephantwalker
 [EMAIL PROTECTED]   To:
 [EMAIL PROTECTED]
 Sent by: cc:
 owner-orion-interest@orion   Subject: RE:
 Concurrent calls to Session bean methods
 server.com


 03/19/02 10:31 PM
 Please respond to
 Orion-Interest






 Vani,

 You can use the petstore trick. Use a facade class which sychronizes each
 call to your session bean. That should do the trick.

 This is a _famous_ problem with session beans.

 regards,

 the elephantwalker
 www.elephantwalker.com


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Vani H.S.
 Sent: Wednesday, March 20, 2002 12:04 AM
 To: Orion-Interest
 Subject: Concurrent calls to Session bean methods


 Hello All,

   I have been trying to deploy an application consisting of session beans
 and mdbs onto orion1.5.4.
   But I seem to run into deadlocks, because my session bean gets called
 concurrently. Please can anybody can tell me if there is a setting to
allow
 concurrent calls so that, when a session bean method is called at one
time,
 the EJB container blocks the concurrent method call and allows it to
 proceed
 when the previous call has completed?
   If not, how should this problem of concurrent calls be handled in orion?
   Please help.
 Thanks,
 Vani





 The allow-concurrent-calls element specifies whether a stateful session
 bean
 instance allows concurrent method calls. By default,
 allows-concurrent-calls
 is false. However, when this value is set to true, the EJB container
blocks
 the concurrent method call and allows it to proceed when the previous call
 has completed.





 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.com
















RE: EJB failover/replication?

2002-03-21 Thread The elephantwalker

Michael,

Orion has a loadbalancer for the web-tier, and this has failure detection,
and is http session aware. If your application is deployed on several
island's, your web-tier is virutally immortal. Likewise, entity beans and
slsb ejb's deployed in the same vm's will be replicated.

For beans which are deployed on remote machines, the Orion ormi has a
built-in failover capability. If you provide a list of ormi servers in your
rmi.xml file, Orion will try each one, in turn, if one is unavailable. So
entity and slsb's have complete fail-over. However, most who use orion use
ejb's in the same container as the web teir.

Ormi can also be clustered using multi-casting.

Oc4j has sfsb fail-over, as I have seen this demonstrated at Oracle Open
World by Larry himself. I am still checking if this will work in 1.5.4. Key
bit is the replication tag in the orion-ejb-jar.xml. Apparently, it only
works for the default state. Oracle describes three different methods, vm
shutdown replication, end of call replication and a homegrown method call
replication. The EndOfCall replication attribute just blows up nicely, so it
looks like they have broken this for orion 1.5.4.

Still investigating, though.


regards,

the elephantwalker
www.elephantwalker.com




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Michael
Crozier
Sent: Thursday, March 21, 2002 2:07 PM
To: Orion-Interest
Subject: EJB failover/replication?



Hello,

  I'm starting to evaluate Orion as a application server for a project and
I'm trying to figure out if/how Orion supports EJB failover.  Oracle/AS
appears to, but I can't tell if thats a feature that they added on top of
Orion.

If EJB failover/replication is supported, could somebody point me to any
documentation?

Thanks,

  Michael