Kevin we are doing something similar to what you espouse here. We are really
getting away from EJB since it is cost heavy for us at this time. We are
using servlets under apache right now (and tomcat) to access EJB's. (I
should say *I* since I am the sole developer in our division. Typical
military spending :) with Orion you will need all your class files available
to your servlets/JSP's to access them so effectively you end up deploying
twice. With us not using JSP's and using Tomcat we just add the EJB's jar
file to our classpath and it works fine. Right now I am working on some
other stuff which a recent interview gave me an idea for, so most of my
entity and session beans are deployed now. But I am trying to cut down on
the cost of RMI going over the network by using some BMP beans to do our own
sort of caching. Its causing me no end of headaches really and honestly you
lose some of the advantages of EJB doing it this way but we really need to
cut the network costs down and i cannot think of any other way.
So... for those who might have a clue as to how we could do this better...
basically this is a personnel training database that the Beans are
accessing. we are broken down in our organization into X teams with Y
members per team. Instead of donig findByprimary key (we only use that when
we want to change a record) we are doing a find by team and caching that in
the servlet and doing the logic to find only individual A there. a repeat
request can then go to a Vector to see if the individual record is already
there and place it up for viewing. I can't really think of any other way to
do this that would cut out the RMI costs of going to the EJB server. there
are also event listeners in there to ensure the cached data is valid. We are
a pretty small organization really (135 employees) so really the chance that
someone else has modified the record while it was in our cache is limited
but I put the listeners in there just in case, and to make it more scalable
in the future.
Al
-----Original Message-----
From: Kevin Duffey
To: Orion-Interest
Sent: 3/31/00 11:05 PM
Subject: EJB Question(s)
Now, with the above requirements, other than installing orion on two
machines, do I have to set up each Orion system to support this? Or does
just deploying the same application to both machines work? I am not
quite
sure I understand the process in building an n-tier setup like this.
Should
I have separate projects, in that my EJB source is separated from our
front-end code? I was thinking of using our main package, bm, and having
3
folders below, namely Presentation, Logic and Persistence. Then, after
reading about EJB, I read that it has alot of the persistence stuff in
it
for you, such as connection pooling, and relation-object mapping. If
this is
so, it seems like I can get rid of the Persistence folder right?
The Presentation folder would have a few subfolders. Namely, beans,
servlets
and actions. The Logic package (bm.logic) would contain the ejb
components,
and probably have session and entity subfolders. Does this sound like a
good
layout to structure the source?
Alright..I'll make it short. Thanks for any insight into this.