Re: Can't throw exception from entity bean?

2001-01-17 Thread Daniel G. Koulomzin

Did you list RemoteException in the throws clause of all your EJBObject's
methods?

-Dan


Luke Nelson wrote:

 When I try to throw an exception from a get/set method in an entity bean
 using CMP, Orion shows the following error during deployment:

 Auto-deploying entitybeans.jar (Class 'com.gardnersys.ejb.entity.TmsObject'
 had
 been updated)... TmsDeviceBean_PersistenceManager4.java:30: Exception
 java.rmi.R
 emoteException must be caught, or it must be declared in the throws clause
 of th
 is method.
 super.setTmsObject(value);
   ^
 1 error
 Error compiling file:/C:/tmsobjects/entitybeans.jar: Syntax error in source

 Am I not allowed to throw an exception, or is there something else that is
 wrong?

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134







Re: DriverManagerConnectionPoolConnection not closed...

2001-01-12 Thread Daniel G. Koulomzin

I believe that this is a bug in Orion.

-Dan


Johan Fredriksson wrote:

 Is there a way to debug the DriverManagerConnectionPoolConnection so I
 can detect where it happens? I know that a few places where I used the
 try { conn = getConn();stmt = conn.prepareStatement();rs =
 stmt.executeQuery();}catch (SQLException sqle) { }finally {try
 {rs.close();stmt.close();conn.close();
 }catch (SQLException sqle) {}} one of the close() are throwing an
 exception and therefore the conn is not closed.  I'd like to have
 DriverManagerConnectionPoolConnection to tell me where I did this
 dreadful  mistake. regards   Johan Fredriksson

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134







Re: Null Pointer Exception in Generated Wrapper Classes

2001-01-10 Thread Daniel G. Koulomzin



+1

revivalatgt revivalatgt wrote:
Orion needs to change it's responsiveness to customer
issues and questions,
or it should just go open-source and call it a day if they're going
to use a
mailing-list as it's primary means of support.
Robert Smith
_
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: isolation level

2000-12-14 Thread Daniel G. Koulomzin

Well, on a related topic, is there any method that will tell you what
isolation level a CMT bean is set to?  There is no method in
EntityContext that I see.

-Dan

"Juan Lorandi (Chile)" wrote:

 it depends on the driver/DB combo...also the level of isolation
 available depende on it...so there's no 'default' isolation level for
 orion...HTHJP

  -Original Message-
  From: Daniel G. Koulomzin [mailto:[EMAIL PROTECTED]]
  Sent: MiƩrcoles, 13 de Diciembre de 2000 16:13
  To: Orion-Interest
  Subject: isolation level
  What is Orion's default Transaction-Isolation level for
  Entity Beans?

  -Dan

  --
      Daniel G. Koulomzin
  Digital Media On Demand
  244 Brighton Ave. 3rd Floor
  Allston MA 02134



--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134







isolation level

2000-12-13 Thread Daniel G. Koulomzin


What is Orion's default Transaction-Isolation level for Entity Beans?
-Dan
--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: transaction-problem

2000-11-30 Thread Daniel G. Koulomzin


What sort of exception is being thrown?

If it is an "Application Exception", the container is not supposed
to automatically rollback the transaction (see EJB 1.1 spec, section 12.1.2
). In order to rollback, call EJBContext.setRollbackOnly().
If its a System level exception (like an SQL Exception that is NOT an
Application Exception), the transaction should rollback automatically.
Hope this helps.
-Dan


Andreas Reckmann wrote:
Hi,
i try to run orion with container-managed-transactions.
I set the isolation-level in orion-ejb-jar.xml to
"seralizable". I set in the ejb-jar.xml-File (for the involved methods)
the
transaction-attribute to "Required". From a Session bean
I call some create-methods. The create-methods themself call a create-method
from another bean. All database-access-functions are implemented by
Stored-Procedures and auto-increment by triggers.
If an exception occurs the database-operations don't rollback.
Can someone help me!!!
I use Orion 1.3.8 and Oracle 8i.
I use as datasource-class (in data-sources.xml)
com.evermind.sql.ConnectionDataSource and the ejb-location for
Bean-Connection.
Thanks
 Andreas

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: Classpath problems

2000-11-30 Thread Daniel G. Koulomzin


According to the J2EE spec, EJB *.jar files need to include ALL necessary
classes. An *.ear file also needs all its available classes in WEB-INF/lib.
Unfortunately, you'll have to put your common classes in both files.
This is very annoying, but it is correct.
-Dan
Alexander Sparkowsky wrote:
I have some problems dealing with the classpathes
in orion.
I have a web module and some ejb module. Some classes are used by the
web and ejb modules. First I added these classes only to one of the
ejb modules and got a NoClassDefFoundError in the servlet. I then added
the class to the web module. I tried both in a .jar file in WEB-INF/lib
or as separatefile with no success. Other classes could be loaded from
both locations without anyproblems!.
When finally copying all classes to orion/lib my app ran. But this
is not the way I like to have it.
Can somebody help?
Alex

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: Turbine with Orion?

2000-11-29 Thread Daniel G. Koulomzin


I have gotten Orion to work with Turbine, so I know its possible.
But I haven't documented anything.
-Dan

David Kenzik wrote:
 Neal Kaiser said...
> I'm getting ready to set this up (Turbine and Velocity) with
Orion.
> Before I pull my hair out figuring it out, I wanted to see
if anyone has
> already documented this?
If/when you endeavor to set this up, please report your findings to
the list
so the orionsupport.com guys can publish it.
I'm sure many others will benefit from it.
--
David S. Kenzik
[EMAIL PROTECTED] - http://kenzik.com
Original Music - http://mp3.com/text

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: DataSourceConnection not closed

2000-11-28 Thread Daniel G. Koulomzin


I don't see a wait-timeout property in the orion-ejb-jar.xml dtd.
Is it added in a version after the one I have (1.3.8)? All I see
is call-timeout and timeout in Session beans, and call-timeout and validity
timeout in Entity Beans.
-Dan

Marcus Ahnve wrote:
> "Juan Lorandi (Chile)" wrote:
>
> yes, I've been complaining about this issues starting a month ago...
> check bugs #161  #170 for more info
>
> nobody from orion replies, and it's a shame, because I cant
license
> the products until I work my way around these
>
> Anybody performing a DoS attack on any Orion Web Site will effectively
> crash the server
Bug #170 was filed due to the fact that the server chrashed and burned
if it ran out of connections. For some weird reason, it seems to be
very
CPU expensive to wait for a connection. However, now that you can
specify the wait-timeout property we can keep the server alive, with
tons of timeouts though. I've set the status of #170 to fixed, since
the
immediate problem is fixed. Now, for "DataSource not closed", that's
a
whole new story, but I believe that there are other reports in bugzilla
regarding that topic. FYI, we not only get it due to timeouts, but
when
testing our app against Hypersonic's in-memory db too. No clue why.
/Marcus
--
Marcus Ahnve
email: [EMAIL PROTECTED]
Lecando AB
Office: +46-(0)8-634 94 18
Sweden
Mobile: +46-(0)70-462 19 18
www.lecando.com
ICQ#: 4564879

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Threads and EJB stubs

2000-11-22 Thread Daniel G. Koulomzin


Hi all,
 Can multiple threads share one EJBObject? What
about one EJBHome? Are these thread safe?
 Also, what's everone's policy on caching StatelessSessionBeans?
Does your client code tend to hold a reference to a Stateless Session bean
between uses, or do you get a new reference every time?
-Dan
--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



DataSourceConnection not closed

2000-11-22 Thread Daniel G. Koulomzin
tion.java:117)
 at org.apache.turbine.modules.navigations.TemplateNavigation.doBuild(TemplateNavigation.java:110)
 at org.apache.turbine.modules.navigations.WebMacroSiteNavigation.doBuild(WebMacroSiteNavigation.java:131)
 at org.apache.turbine.modules.Navigation.build(Navigation.java:99)
 at org.apache.turbine.modules.NavigationLoader.eval(NavigationLoader.java:126)
 at org.apache.turbine.util.webmacro.WebMacroNavigation.toString(WebMacroNavigation.java:133)
 at org.webmacro.engine.Variable.write(Variable.java:156)
 at org.webmacro.engine.Block.write(Block.java:56)
 at org.webmacro.engine.WMTemplate.write(WMTemplate.java:251)
 at org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacroService.java:237)
 at org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacroService.java:208)
 at org.apache.turbine.services.webmacro.TurbineWebMacro.handleRequest(TurbineWebMacro.java:107)
 at org.apache.turbine.modules.layouts.WebMacroSiteLayout.doBuild(WebMacroSiteLayout.java:131)
--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: orion server works with jdk 1.3???

2000-11-14 Thread Daniel G. Koulomzin


Gerald,
 You speak as if you have gotten Orion to run under
a Linux jdk1.3... any Linux jdk1.3 I run Orion on seems to Segfault after
about 5 minutes of continuous HTTP requests. To be fair, I
don't think this would happen under Windows... which isn't to say I want
to use Windows... but lets be fair.
-Dan

Gerald Gutierrez wrote:
You're probably using Windows. This wouldn't happen
on Linux.
Somewhere, you've messed up the registry key that indicates what version
of
the Java Runtime you supposedly have installed. The easiest thing is
to
uninstall JDK1.3, and then reinstall it again.
At 09:16 AM 11/14/2000 +, you wrote:
>hi,
>
>I used to work with orion server with jdk 1.2.2. Recently I installed
jdk
>1.3 and uninstalled jdk 1.2.2. Now I am not able to start orion server.
I
>get the error message saying that could not find version number 1.3
for
>jre in program files/java soft/jre.
>
>any idea?
>
>thanks in advance.
>
>krishna
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: orion server works with jdk 1.3???

2000-11-14 Thread Daniel G. Koulomzin


Hmm...
Well, frankly, I'd love to have a working 1.3 jdk on my linux box.
I am running Red Hat 6.2 with 512M of ram, with a heap size of half that.
I did read something somewhere about a conflict with a version of glibc
and jdk1.3s, but when a downloaded a version that was supposed to work,
the problem did NOT go away.
It seems results vary significantly with these jdks. I think I
ought to try RH7 before giving up though.
BTW, I've noticed it takes at least 4 hours (sometimes a day) for mail
from my machine to get to the list. Has anyone else experienced this
sort of lag?
-Dan

Russ White wrote:
I
am running Orion under Linux(RedHat 7) with Sun's JDK 1.3 with absolutely
wonderful stability. I would look more closely at your particular setup
to see why your server is crashing. I have load tested it to the max with
JMeter and my own load tester and found it almost as well behaved as Apache.
You may check your heap size, and make sure you have plenty of memory.
I run 2gig of ram for production boxes. I am also running Orion on an 8
box TurboLinux cluster. This setup will be going live next week.Orion
on Linux simply rocks.The
only problem I have ever had was a poorly written written tulip Ethernet
driver (produced segfaults under load) which I rewrote and solved. Now
the box is using gigabit Ethernet and screams through requests.
Russ-Original
Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Daniel
G. Koulomzin
Sent: Tuesday, November 14,
2000 10:50 AM
To: Orion-Interest
Subject: Re: orion server
works with jdk 1.3???

Gerald,
 You speak as if you have gotten Orion to run under
a Linux jdk1.3... any Linux jdk1.3 I run Orion on seems to Segfault after
about 5 minutes of continuous HTTP requests. To be fair, I
don't think this would happen under Windows... which isn't to say I want
to use Windows... but lets be fair.
-Dan

Gerald Gutierrez wrote:
You're probably using Windows. This wouldn't happen
on Linux.
Somewhere, you've messed up the registry key that indicates what version
of
the Java Runtime you supposedly have installed. The easiest thing is
to
uninstall JDK1.3, and then reinstall it again.
At 09:16 AM 11/14/2000 +, you wrote:
>hi,
>
>I used to work with orion server with jdk 1.2.2. Recently I installed
jdk
>1.3 and uninstalled jdk 1.2.2. Now I am not able to start orion server.
I
>get the error message saying that could not find version number 1.3
for
>jre in program files/java soft/jre.
>
>any idea?
>
>thanks in advance.
>
>krishna
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: orion server works with jdk 1.3???

2000-11-14 Thread Daniel G. Koulomzin

Russ,

I get the following error after 5 minutes of JMeter when I run Sun
jdk1.3 on a Red Hat 7 machine.  Granted, this RH7 was upgraded from
RH6.2, and not a clean install, which produces results that are ...
quirky... at best.   You've never gotten this?

What "parts" of Orion do you use?  My app is a bunch of EJBs, and a
few Servlets (including Turbine).

-Dan


#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 43113F32554E54494D45110E43505002C5
#
# Problematic Thread: prio=1 tid=0x82463b0 nid=0xeda suspended
#






Russ White wrote:

 I am running Orion under Linux(RedHat 7) with Sun's JDK 1.3 with
 absolutely wonderful stability. I would look more closely at your
 particular setup to see why your server is crashing. I have load
 tested it to the max with JMeter and my own load tester and found it
 almost as well behaved as Apache. You may check your heap size, and
 make sure you have plenty of memory. I run 2gig of ram for production
 boxes. I am also running Orion on an 8 box TurboLinux cluster. This
 setup will be going live next week. Orion on Linux simply rocks.The
 only problem I have ever had was a poorly written written tulip
 Ethernet driver (produced segfaults under load) which I rewrote and
 solved. Now the box is using gigabit Ethernet and screams through
 requests. Russ-Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Daniel G.
 Koulomzin
 Sent: Tuesday, November 14, 2000 10:50 AM
 To: Orion-Interest
 Subject: Re: orion server works with jdk 1.3???


  Gerald,

  You speak as if you have gotten Orion to run under a
  Linux jdk1.3... any Linux jdk1.3 I run Orion on seems to
  Segfault after about 5 minutes of continuous HTTP
  requests.   To be fair, I don't think this would happen
  under Windows... which isn't to say I want to use Windows...
  but lets be fair.

  -Dan


  Gerald Gutierrez wrote:

  You're probably using Windows. This wouldn't happen on
  Linux.
 
  Somewhere, you've messed up the registry key that
  indicates what version of
  the Java Runtime you supposedly have installed. The
  easiest thing is to
  uninstall JDK1.3, and then reinstall it again.
 
  At 09:16 AM 11/14/2000 +, you wrote:
  hi,
  
  I used to work with orion server with jdk 1.2.2. Recently
  I installed jdk
  1.3 and uninstalled jdk 1.2.2. Now I am not able to start
  orion server. I
  get the error message saying that could not find version
  number 1.3 for
  jre in program files/java soft/jre.
  
  any idea?
  
  thanks in advance.
  
  krishna
  ___
  _
 
  Get Your Private, Free E-mail from MSN Hotmail at
  http://www.hotmail.com.
  
  Share information about yourself, create your own public
  profile at
  http://profiles.msn.com.
  

  --
      Daniel G. Koulomzin
  Digital Media On Demand
  244 Brighton Ave. 3rd Floor
  Allston MA 02134



--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134







Re: orion server works with jdk 1.3???

2000-11-14 Thread Daniel G. Koulomzin


Gerald,
I use JMeter (on the most horrific setting) to test Orion. I'm
running RH6.2 with the Sun 1.3 jdk. With that jdk, development is
fine, but when the load goes up to 20 or so simultaneous requests, it crashes
almost just after the JIT kicks in. This also happens with the IBM
jdk. If you have JMeter, I'd really appreciate you running it...
I'd love to know what Linux-distro/jdk combinations are stable.
-Dan

Gerald Gutierrez wrote:
It's interesting that you say that because I've been
using Orion 1.3.8 with
PostgreSQL 7.02 and JDK 1.3 on Mandrake Linux 7.2 for several weeks
and it
has not given me any problems other than those that I generate myself;
I
leave Orion on for several hours on end. I haven't, however, loaded
it
significantly, so perhaps this is the difference. What kind of "continuous
HTTP requests" do you mean?
At 10:49 AM 11/14/2000 -0500, you wrote:
>Gerald,
>
> You speak as if you have gotten Orion to
run under a Linux jdk1.3...
> any Linux jdk1.3 I run Orion on seems to Segfault after about 5 minutes
> of continuous HTTP requests. To be fair, I don't think
this would
> happen under Windows... which isn't to say I want to use Windows...
but
> lets be fair.
>
>-Dan
>
>
>Gerald Gutierrez wrote:
>>You're probably using Windows. This wouldn't happen on Linux.
>>
>>Somewhere, you've messed up the registry key that indicates what
version of
>>the Java Runtime you supposedly have installed. The easiest thing
is to
>>uninstall JDK1.3, and then reinstall it again.
>>
>>At 09:16 AM 11/14/2000 +, you wrote:
>> >hi,
>> >
>> >I used to work with orion server with jdk 1.2.2. Recently I installed
jdk
>> >1.3 and uninstalled jdk 1.2.2. Now I am not able to start orion
server. I
>> >get the error message saying that could not find version number
1.3 for
>> >jre in program files/java soft/jre.
>> >
>> >any idea?
>> >
>> >thanks in advance.
>> >
>> >krishna
>> >_
>> >Get Your Private, Free E-mail from MSN Hotmail at
>> http://www.hotmail.com>http://www.hotmail.com.
>> >
>> >Share information about yourself, create your own public profile
at
>> >http://profiles.msn.com>http://profiles.msn.com.
>> >
>
>--
>Daniel G. Koulomzin
>Digital Media On Demand
>244 Brighton Ave. 3rd Floor
>Allston MA 02134

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



how do I set redeploy of beans

2000-11-09 Thread Daniel G. Koulomzin


How do I set auto-redeploy of EJB jars on or off?
-Dan


--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: Transaction propagation question

2000-11-08 Thread Daniel G. Koulomzin


Yes, J2EE doesn't support nested transactions. However, a similar
effect can be achieved through the suspension of existing transactions.
As far as I can tell, what's supposed to happen is Transaction 1 gets suspended
while Transaction 2 starts, and commits or rollsback. Then Transaction
1 resumes and commits or rollsback. Because Transaction 2 will generally
throw an exception when it rollsback, Transaction 1 will also generally
rollback, which results in an approximation of a nested transaction.
However, this is never explicitly stated in the spec, so it would behoove
you to make sure to rollback transactions yourself in your code when you
must be SURE they get rolled back.
Since you (Aziz) defined the SQL Delete statement, it doesn't necessarity
have to be rolled back if some other transaction rolled back. I say
"doesn't necessarily" because it really depends on the order and
way in which you are doing things. However, you might want to try
adding the following code to your catch clause in the HelloBean or HashCodeBean
class.
code>
sessionContext.setRollbackOnly();
// sessionContext is the SessionContext object that is passed to the
Bean in setSessionContext and stored as a member variable as per the EJB
1.1 spec
/code>
Hope this helps.
Anyway, transactions in Orion are still sketchy at best...
-Dan
"Juan Lorandi (Chile)" wrote:
I think it defaults to NotSupported; also have in
mind that J2EE only allows
flat transactions,
so, if you a a secuence
Required ---> Requires New
T1
T2
it will perform 2 transactions, not connected between each other, that
is,
if T2 fails, T1 doesn't fail autoamtically.
-Original Message-
From: Aziz Sharif [mailto:[EMAIL PROTECTED]]
Sent: Viernes, 03 de Noviembre de 2000 18:11
To: Orion-Interest
Subject: Transaction propagation question
I have a question regarding transaction propagation. I took the orion
primer example and modified it so that the servlet calls Hello and
then
the Hello Bean calls A HashCoder bean. Both Hello and HashCoder beans
are stateless session beans and perform SQL. The Hello does a delete
and the HashCoder an incorrect select (causing a SQLException). I was
expection these two operations to happen in the same transaction, so
that the SQLException would cause the delete to automatically rollback
since for both these beans I specified Container managed transaction.
But it did actually delete the row. So it seems they two methods were
running in different transactions.
The only thing I did not do is to specify the tranaction attribute to
the bean's methods to be Required or anything else. I don't know what
it defaults to in orion.
I am using DB2 v. 6.1 as the Database, the in both beans I acquire the
connection through JNDI DataSource. I configured the data-sources.xml
for DB2 as follows:
 data-source

class="com.evermind.sql.DriverManagerDataSource"

name="Db2"

location="jdbc/Db2CoreDS"

xa-location="jdbc/xa/Db2XADS"

ejb-location="jdbc/Db2DS"

connection-driver="COM.ibm.db2.jdbc.app.DB2Driver"

username="db2admin"

password="db2admin"

url="JDBC:DB2:EB2"

inactivity-timeout="30"
 />
I am attaching the zip file containing the modified orion primer
example, that can be built simply by tying ant.
I would like to know how to get something like this where multiple
session beans participate in a single transaction such that if any
one
throws an SQLException the transaction is rolled back by the container.
Thanks in advance.
Aziz Sharif
______
Do You Yahoo!?
>From homework help to love advice, Yahoo! Experts has your answer.
http://experts.yahoo.com/

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



Re: sessions, inheritance and authorization

2000-11-06 Thread Daniel G. Koulomzin


I would have to admit that the weak support for inheritence in EJB 1.1
is definately a big problem. What you generally have to do is create
parallel class hierarchies: one for the EJBObject interfaces, and one for
the SessionBean/EntityBean classes. Both allow normal Java inheritence.
Then, map the EJBObjects to the appropriate SessionBean classes in the
Deployment Descriptor, and you have created a sort of inheritence.
The problem with EJB inheritence is really in the EJBHome objects.
You generally have to create distinct EJBHomes for every Bean, and as far
as I can see, its not a good idea for one EJBHome to inherit from another.
The problem is in the create() methods. In your case, SessionManagerHome's
create() method returns a SessionManager. However, if you create
a PatientSessionManagerHome that extends SessionManagerHome, you can't
have the create() method return something different without a different
set of args (this problem with method overriding for factory methods is
generally avoided in conventional Java by the use of constructors, which
are NEVER inherited). If you make a different set of args,
then you're still left with a create() method that returns an obect which
is NOT the EJBObject for PatientSessionManagerHome, and most containers
will not know how to implement it. So basically, the inheritence
method I suggested above is really a kluge. There is no good solution
for create methods, but one possiblity for EntityBean finder methods is
to really take advantage of the ambiguity of Collection and Enumeration
return values in finder methods. Have all of your finders return
Collection of Enumeration, and you get around the problem of different
return values in the subclass's method. However, this won't work
for findByPrimaryKey(), which MUST return a distint instance of the EJBObject
interface. Also, its a generally ugly solution for many OO reasons
(type security, and you're essentially narrowing the scope of allowable
return values).
Anyway, this is all just my opinion. I'd love to hear it if anyone
has figured something out that has escaped me.
-Dan
Adam Winter wrote:
Thanks for your reply. In answer to your question...
> > Second, does inheritance of Session Beans, work the same as other
> > inheritance in Java? The answer is probably yes, but I've
> > never seen this
> > covered. Every EJB I've seen has extended EjbObject. Can I still
have
> > abstract super classes?
>
>Certainly you can derive from your own abstract base classes, as long
as
>they derive from EJBObject. Out of curiosity, why do you want
to do
>this?
In our web-based application all users see a common log-on screen, and
after their authentication, based on their user role, we redirect them
to
the appropriate user interface. To represent that I envisioned having
a
"SessionManager" Statefull Session bean, which would govern what was
possible based on that user's role. It would encapsulate other entity
beans, representing the other people and application objects that the
logged in user is allowed to participate with. In accordance with what
I
think is good OO designed, I pictured having "SessionManager" as abstract,
and deriving sub-classes based on user roles. In the case of my domain,
health care, there might be a PatientSessionManager, a
PhycisianSessionManager, and ClericalSessionManager. By doing this
I can
store the commonality (of which there are a few) in the super class.
I
think the case for inheritance amongst business logic is pretty strong.
-adamw

--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



No Suspension of client transactions with Bean Managed Transaction

2000-10-12 Thread Daniel G. Koulomzin
transaction (illegal termin
ation of transaction)
at
MessageHome_EntityHomeWrapper55.create(MessageHome_EntityHomeWrapper55.java:834)

at
com.dbusa.util.message.MessageCreator.createMessage(MessageCreator.java:83)

at
com.dbusa.util.message.MessageCreator.createMessage(MessageCreator.java:57)

at java.lang.reflect.Method.invoke(Native Method)
at
org.webmacro.util.PropertyOperator.invoke(PropertyOperator.java:788)
at
org.webmacro.util.DirectAccessor.get(PropertyOperator.java:1012)
at
org.webmacro.util.PropertyOperator.getProperty(PropertyOperator.java:535)

at
org.webmacro.util.PropertyOperator.getProperty(PropertyOperator.java:89)

at org.webmacro.Context.getLocal(Context.java:401)
at org.webmacro.Context.getProperty(Context.java:339)
at
org.webmacro.engine.PropertyVariable.getValue(PropertyVariable.java:28)
at org.webmacro.engine.Variable.evaluate(Variable.java:128)
at org.webmacro.engine.Variable.write(Variable.java:156)
at org.webmacro.engine.Block.write(Block.java:56)
at org.webmacro.engine.IfDirective.write(IfDirective.java:161)
at org.webmacro.engine.Block.write(Block.java:56)
at org.webmacro.engine.IfDirective.write(IfDirective.java:154)
at org.webmacro.engine.Block.write(Block.java:56)
at org.webmacro.engine.WMTemplate.write(WMTemplate.java:251)
at
org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacro

Service.java:237)
at
org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacro

Service.java:208)
at
org.apache.turbine.services.webmacro.TurbineWebMacro.handleRequest(TurbineWebMacro.java:1

07)
at
org.apache.turbine.modules.screens.WebMacroSiteScreen.buildWMTemplate(WebMacroSiteScreen.

java:192)
at
org.apache.turbine.modules.screens.WebMacroSiteScreen.buildTemplate(WebMacroSiteScreen.ja

va:145)
at
org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.java:124)

at org.apache.turbine.modules.Screen.build(Screen.java:100)
at
org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:126)
at
org.apache.turbine.modules.layouts.WebMacroSiteLayout.doBuild(WebMacroSiteLayout.java:106

)
at org.apache.turbine.modules.Layout.build(Layout.java:93)
at
org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:120)
at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:171)

at org.apache.turbine.modules.Page.build(Page.java:92)
at
org.apache.turbine.modules.PageLoader.exec(PageLoader.java:119)
at org.apache.turbine.Turbine.doGet(Turbine.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134