RE: EJB Help..
Hi Kevin... Accessing entity beans through session beans is usually the recomended procedure, but it does depend on what your doing. Jim --On Sunday, October 22, 2000 10:32 AM -0700 "Duffey, Kevin" <[EMAIL PROTECTED]> wrote: > Thanks. > > Good news...I used ANT 1.1 and made a simple build script that compiles my > com.company.ejb folder into a .jar file including the META-INF dir. I was > finally able to get EJB deployed!!! So i am stoked about that. I do have a > lot to learn still, and the spec from what I heard was mostly for vendors > to understand..didn't help developers too much. But I will read it again. > I am also still reading on an EJB book from ORiely press that covers EJB > 1.1. It talks more about CTM's than EJB J2EE servers to my surprise, but > I suppose they are the same thing. > > I really want to use stateless EJB session objects that work with entity > objects. I don't want my web/client side to access entity objects > directly...I don't know if thats the right way or not. What do you think? > One of our developers here thinks we should just use Entity objects > directly, but I don't see how that will help locate our logic on the ejb > server. Do ejb session objects work directly with entity objects? > > Ahh..so much to learn..so little time. I think I'll be just in time for > EJB 2.0! :) > > >> -Original Message- >> From: Juan Lorandi (Chile) [mailto:[EMAIL PROTECTED]] >> Sent: Friday, October 20, 2000 2:52 PM >> To: Orion-Interest >> Subject: RE: EJB Help.. >> >> >> the create method must reside in the Home interface and must match an >> ejbCreate method in the bean class... >> >> the Home And Remote interfaces (Login.java and LoginHome.java) must be >> implemented somewhere, >> because the Bean class doesn't implement it... >> >> EJB Servers/Containers, at deploy time, build a class that >> implements them >> and calls your ejb-- >> providing an indirection pattern which enables to provide transaction, >> security, caching and pooling support >> >> I suggest you read (again) extra carefully the ejb spec, and >> don't skip any >> section, specially the ones about >> Container responsabilities, this will give you the insight to >> know why your >> app isn't behaving well... >> >> HTH, >> >> Rifle >> >> PS: Copies of your Login*.java and the ejb-jar.xml would be welcome... >> >> -Original Message- >> From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] >> Sent: Viernes, 20 de Octubre de 2000 17:22 >> To: Orion-Interest >> Subject: RE: EJB Help.. >> >> >> HI, >> >> > Double check your ejb-jar.xml--are you setting LoginHome as >> your Home >> > interface in there? Is there a LoginHome.create() method >> > declared? Is there >> > a LoginBean.ejbCreate() method defined? >> >> Hmm..I don't have a LoginHome.create()..the Orion Primer >> didn't show that. I >> have a Login.java, LoginBean.java and LoginHome.java. I think >> Login.java is >> the only one with a create() method in it. Should both the "interface" >> classes have a create() in it? >> >> Also, why is Orion trying to compile it if its already >> compiled? Or is this >> some sort of "assembly" routine Orion does? I assume from >> what I read that >> the EJB server "implements" the interfaces..so is it >> generating its own code >> at runtime and that is what compiling is failing? >> >> Thanks again. >>
RE: EJB Help..
Thanks. Good news...I used ANT 1.1 and made a simple build script that compiles my com.company.ejb folder into a .jar file including the META-INF dir. I was finally able to get EJB deployed!!! So i am stoked about that. I do have a lot to learn still, and the spec from what I heard was mostly for vendors to understand..didn't help developers too much. But I will read it again. I am also still reading on an EJB book from ORiely press that covers EJB 1.1. It talks more about CTM's than EJB J2EE servers to my surprise, but I suppose they are the same thing. I really want to use stateless EJB session objects that work with entity objects. I don't want my web/client side to access entity objects directly...I don't know if thats the right way or not. What do you think? One of our developers here thinks we should just use Entity objects directly, but I don't see how that will help locate our logic on the ejb server. Do ejb session objects work directly with entity objects? Ahh..so much to learn..so little time. I think I'll be just in time for EJB 2.0! :) > -Original Message- > From: Juan Lorandi (Chile) [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 20, 2000 2:52 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > > the create method must reside in the Home interface and must match an > ejbCreate method in the bean class... > > the Home And Remote interfaces (Login.java and LoginHome.java) must be > implemented somewhere, > because the Bean class doesn't implement it... > > EJB Servers/Containers, at deploy time, build a class that > implements them > and calls your ejb-- > providing an indirection pattern which enables to provide transaction, > security, caching and pooling support > > I suggest you read (again) extra carefully the ejb spec, and > don't skip any > section, specially the ones about > Container responsabilities, this will give you the insight to > know why your > app isn't behaving well... > > HTH, > > Rifle > > PS: Copies of your Login*.java and the ejb-jar.xml would be welcome... > > -Original Message- > From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] > Sent: Viernes, 20 de Octubre de 2000 17:22 > To: Orion-Interest > Subject: RE: EJB Help.. > > > HI, > > > Double check your ejb-jar.xml--are you setting LoginHome as > your Home > > interface in there? Is there a LoginHome.create() method > > declared? Is there > > a LoginBean.ejbCreate() method defined? > > Hmm..I don't have a LoginHome.create()..the Orion Primer > didn't show that. I > have a Login.java, LoginBean.java and LoginHome.java. I think > Login.java is > the only one with a create() method in it. Should both the "interface" > classes have a create() in it? > > Also, why is Orion trying to compile it if its already > compiled? Or is this > some sort of "assembly" routine Orion does? I assume from > what I read that > the EJB server "implements" the interfaces..so is it > generating its own code > at runtime and that is what compiling is failing? > > Thanks again. >
RE: EJB Help..
in EJB 2.0 either. I think >>>>> you'll end up doing JDBC BMP with your Session and Entity beans. >>>>> Performance is only an issue when you make everything a stateful >>>>> session bean or an entity bean. There are rules for when it's >>>>> appropriate to make things entity beans. There still isn't a whole >>>>> lot of useful information around on design EJBs yet though with most >>>>> of it only explaining the basics including the ORA book. >>>>> >>>>> On Fri, 20 Oct 2000, Duffey, Kevin wrote: >>>>> >>>>>> Thanks. >>>>>> >>>>>> I only meant to use the /classes folder because my ejb code is in the >>>>>> same project as the rest of my code (Servlets, javabeans, action >>>>>> classes, etc). Since it all compiles to the same one folder, I >>>>>> assume I will have to "move" the ejb compiled classes every time I >>>>>> compile them. What I was hoping for was a way to not have to do >>>>>> this..instead, just let the whole project compile to the >>>>>> WEB-INF/classes folder (all my code), and then have Orion pick up on >>>>>> the ejb changes from that point. It appears to me from what everyone >>>>>> is saying I will have to use some sort of script every time I make a >>>>>> change to an ejb, which my first thoughts is a pain in the ass. Its >>>>>> very easy to develop servlets, action classes, javabeans, core >>>>>> classes, but ejb not only requires 3 classes per component, but lots >>>>>> of "special" work just to get the thing deployed. Then, every time >>>>>> you make a change, it requires the same process. I would think >>>>>> turn-around time for ejb development is on the order of a couple of >>>>>> minutes for every change you make. That results in a lot slower >>>>>> development cycle than I am currently using. >>>>>> >>>>>> Worse, I have started hearing alot of people turn away from ejb and >>>>>> going back to servlets because of development time, and performance. >>>>>> Supposedly the ejb stuff isn't living up to all the hype. However, I >>>>>> look at what the ejb container does for you (connection pooling, >>>>>> transactions, security, instance pooling, etc) and it seems there is >>>>>> alot of stuff I wont have to do on the side of persistence, >>>>>> transactions and security..so maybe the extra time is worth it? ;) >>>>>> >>>>>> Anyways..I did as one person suggested in this list, I set up in my >>>>>> application.xml like so: >>>>>> >>>>>> >>>>>> /path/www/WEB-INF/classes/ >>>>>> >>>>>> >>>>>> and Orion seems to be finding the classes (the ejb). However, I keep >>>>>> seeing an error appear. It says something like: >>>>>> >>>>>> Error compiling class c:/path/www/WEB-INF/classes/ Login.java >>>>>> LoginBean.java LoginHome.java can't find method create()in >>>>>> LoginBean.java >>>>>> >>>>>> Its a very strange message to me. If I change the path, it >>>>>> tells me it can't find the classes. If I delete the classes, it also >>>>>> tells me it can't find them. So I assume the path is set correctly in >>>>>> the module tag..as it is finding the classes. I am just not >>>>>> sure why the heck its giving me some compiler error..or why its even >>>>>> trying to compile them..they are already compiled. >>>>>> >>>>>> Anyways..I'll keep plugging away. >>>>>> >>>>>> >>>>>> > -Original Message- >>>>>> > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] >>>>>> > Sent: Thursday, October 19, 2000 6:34 PM >>>>>> > To: Orion-Interest >>>>>> > Subject: RE: EJB Help.. >>>>>> > >>>>>> > >>>>>> > Kevin, >>>>>> > look inside the news-application example bundled with Orion, >>>>>> > lots of things >>>>>> > will become clear for you after that. >>>>
RE: EJB Help..
ervlets, javabeans, action >>>>> classes, etc). Since it all compiles to the same one folder, I assume I >>>>> will have to "move" the ejb compiled classes every time I compile them. >>>>> What I was hoping for was a way to not have to do this..instead, just >>>>> let the whole project compile to the WEB-INF/classes folder (all my >>>>> code), and then have Orion pick up on the ejb changes from that point. >>>>> It appears to me from what everyone is saying I will have to use some >>>>> sort of script every time I make a change to an ejb, which my first >>>>> thoughts is a pain in the ass. Its very easy to develop servlets, >>>>> action classes, javabeans, core classes, but ejb not only requires 3 >>>>> classes per component, but lots of "special" work just to get the thing >>>>> deployed. Then, every time you make a change, it requires the same >>>>> process. I would think turn-around time for ejb development is on the >>>>> order of a couple of minutes for every change you make. That results in >>>>> a lot slower development cycle than I am currently using. >>>>> >>>>> Worse, I have started hearing alot of people turn away from ejb and >>>>> going back to servlets because of development time, and performance. >>>>> Supposedly the ejb stuff isn't living up to all the hype. However, I >>>>> look at what the ejb container does for you (connection pooling, >>>>> transactions, security, instance pooling, etc) and it seems there is >>>>> alot of stuff I wont have to do on the side of persistence, >>>>> transactions and security..so maybe the extra time is worth it? ;) >>>>> >>>>> Anyways..I did as one person suggested in this list, I set up in my >>>>> application.xml like so: >>>>> >>>>> >>>>> /path/www/WEB-INF/classes/ >>>>> >>>>> >>>>> and Orion seems to be finding the classes (the ejb). However, I keep >>>>> seeing an error appear. It says something like: >>>>> >>>>> Error compiling class c:/path/www/WEB-INF/classes/ Login.java >>>>> LoginBean.java LoginHome.java can't find method create()in >>>>> LoginBean.java >>>>> >>>>> Its a very strange message to me. If I change the path, it >>>>> tells me it can't find the classes. If I delete the classes, it also >>>>> tells me it can't find them. So I assume the path is set correctly in >>>>> the module tag..as it is finding the classes. I am just not sure >>>>> why the heck its giving me some compiler error..or why its even trying >>>>> to compile them..they are already compiled. >>>>> >>>>> Anyways..I'll keep plugging away. >>>>> >>>>> >>>>> > -Original Message- >>>>> > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] >>>>> > Sent: Thursday, October 19, 2000 6:34 PM >>>>> > To: Orion-Interest >>>>> > Subject: RE: EJB Help.. >>>>> > >>>>> > >>>>> > Kevin, >>>>> > look inside the news-application example bundled with Orion, >>>>> > lots of things >>>>> > will become clear for you after that. >>>>> > /WEB-INF/classes directory is for servlet classes, >>>>> > not for EJBs. >>>>> > You'll see how to deploy EJBs in that example and in >>>>> > documentation as well. >>>>> > >>>>> > stas@ >>>>> > >>>>> > > -Original Message- >>>>> > > From: [EMAIL PROTECTED] >>>>> > > [mailto:[EMAIL PROTECTED]]On Behalf Of >>>>> > Duffey, Kevin >>>>> > > Sent: Friday, October 20, 2000 3:45 AM >>>>> > > To: Orion-Interest >>>>> > > Subject: RE: EJB Help.. >>>>> > > >>>>> > > >>>>> > > Thanks for the note. One thing..since I compile all of my >>>>> > classes into the >>>>> > > www/WEB-INF/classes dir, should I put a META-INF in the >>>>> > /classes dir, and >>>>> > > just point the module to the WEB-INF/classes folder? Would >
RE: EJB Help..
y time I make a change to an ejb, which my first >>>> thoughts is a pain in the ass. Its very easy to develop servlets, >>>> action classes, javabeans, core classes, but ejb not only requires 3 >>>> classes per component, but lots of "special" work just to get the thing >>>> deployed. Then, every time you make a change, it requires the same >>>> process. I would think turn-around time for ejb development is on the >>>> order of a couple of minutes for every change you make. That results in >>>> a lot slower development cycle than I am currently using. >>>> >>>> Worse, I have started hearing alot of people turn away from ejb and >>>> going back to servlets because of development time, and performance. >>>> Supposedly the ejb stuff isn't living up to all the hype. However, I >>>> look at what the ejb container does for you (connection pooling, >>>> transactions, security, instance pooling, etc) and it seems there is >>>> alot of stuff I wont have to do on the side of persistence, >>>> transactions and security..so maybe the extra time is worth it? ;) >>>> >>>> Anyways..I did as one person suggested in this list, I set up in my >>>> application.xml like so: >>>> >>>> >>>> /path/www/WEB-INF/classes/ >>>> >>>> >>>> and Orion seems to be finding the classes (the ejb). However, I keep >>>> seeing an error appear. It says something like: >>>> >>>> Error compiling class c:/path/www/WEB-INF/classes/ Login.java >>>> LoginBean.java LoginHome.java can't find method create()in >>>> LoginBean.java >>>> >>>> Its a very strange message to me. If I change the path, it >>>> tells me it can't find the classes. If I delete the classes, it also >>>> tells me it can't find them. So I assume the path is set correctly in >>>> the module tag..as it is finding the classes. I am just not sure >>>> why the heck its giving me some compiler error..or why its even trying >>>> to compile them..they are already compiled. >>>> >>>> Anyways..I'll keep plugging away. >>>> >>>> >>>> > -Original Message- >>>> > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] >>>> > Sent: Thursday, October 19, 2000 6:34 PM >>>> > To: Orion-Interest >>>> > Subject: RE: EJB Help.. >>>> > >>>> > >>>> > Kevin, >>>> > look inside the news-application example bundled with Orion, >>>> > lots of things >>>> > will become clear for you after that. >>>> > /WEB-INF/classes directory is for servlet classes, >>>> > not for EJBs. >>>> > You'll see how to deploy EJBs in that example and in >>>> > documentation as well. >>>> > >>>> > stas@ >>>> > >>>> > > -Original Message- >>>> > > From: [EMAIL PROTECTED] >>>> > > [mailto:[EMAIL PROTECTED]]On Behalf Of >>>> > Duffey, Kevin >>>> > > Sent: Friday, October 20, 2000 3:45 AM >>>> > > To: Orion-Interest >>>> > > Subject: RE: EJB Help.. >>>> > > >>>> > > >>>> > > Thanks for the note. One thing..since I compile all of my >>>> > classes into the >>>> > > www/WEB-INF/classes dir, should I put a META-INF in the >>>> > /classes dir, and >>>> > > just point the module to the WEB-INF/classes folder? Would >>>> > that work? >>>> > > >>>> > > Not that I want you to tell me everything, ok..I do, but >>>> > what exactly do I >>>> > > need to get EJB deployed in that way? My first stab that I >>>> > want to do is >>>> > > create a login process. I would like to use statless session >>>> > > beans, and also >>>> > > use an entity bean..using CMP. I created 3 classes, Login, >>>> > LoginBean and >>>> > > LoginHome. I have them in com.mycompany.ejb package. That >>>> > compiles to >>>> > > www/WEB-INF/classes dir. So do I make application.xml like so: >>>> > > >>>> > > /www/WEB-INF/classes >>>> > > >>>> > > where the com folder
Container Managed Relationships (was RE: EJB Help..)
If you want "db specific sql", you are by definition disallowing CMP. What specific relationships do you want to model? Using sequences (or the equivalent) are not supported in EJB. I find this a little wierd myself, since nobody seems to have come up with a really good mechanism for generating simple primary keys. You can use counter beans (Orion includes one in the news-app demo) for this purpose, and unless you're rapidly creating zillions of keys, performance is probably not going to be an issue. My problem with EJB2.0 container managed relationships is that it adds an enormous amount of binding between my data objects. One software engineering design goal is to decouple objects as much as possible so they can be independently reused. But I'm finding that my entity beans are a web of interrelated objects that are intimately tied by their relationships. I don't know if this is going to be a problem down the road, but if I were looking at a C++ or Java class diagram with this much binding I would be inclined to refactor extensively. My observation so far, though, is that a data model which can be modeled in an RDBMS which can't be modeled in EJB2.0 CMR has got to be pretty obscure. I've got some pretty wacky relationships and it all works reasonably well. Jeff Schnitzer [EMAIL PROTECTED] > -Original Message- > From: Cory Adams [mailto:[EMAIL PROTECTED]] > Sent: Saturday, October 21, 2000 12:11 AM > To: Orion-Interest > Subject: RE: EJB Help.. > > > Jim, > > How could a CMP managed entity bean handle a create for say an Oracle > database table that used db specific sql for describing the > key using a > sequence? > > Where the sql itself might look like > > insert into customer (id, name, address) values(cust_sequence.NEXTVAL, > "Jim" "12 Willow Street"); > > Maybe this is trivial. > > Better yet could I ask you to provide some of the sources of > information > that you use to help all of us better understand how to do > CMP with perhaps > complex RDBMS entity relationships? > > Thanks, > > Cory > > At 09:07 PM 10/20/00 -0400, Jim Archer wrote: > >What types of relationships do you feel EJB 2.0 can't > adequately support? I > >have been studying 2.0 CMP carefully, and it seems to be > quite powerfull. > >There may be holes in it, but it can handle the majority of > real works > >cases. > > > >Jim > > > > > >--On Friday, October 20, 2000 12:28 PM -0700 > [EMAIL PROTECTED] wrote: > > > >> If you don't use an object-relational mapping tool you're > still in for a > >> lot of hurt with EJB if you have a complex data model. I > don't think CMP > >> really addresses the kind of data models large systems > have. Nor does the > >> relationship support in EJB 2.0 either. I think you'll end > up doing JDBC > >> BMP with your Session and Entity beans. Performance is > only an issue when > >> you make everything a stateful session bean or an entity > bean. There are > >> rules for when it's appropriate to make things entity > beans. There still > >> isn't a whole lot of useful information around on design > EJBs yet though > >> with most of it only explaining the basics including the ORA book. > >> > >> On Fri, 20 Oct 2000, Duffey, Kevin wrote: > >> > >>> Thanks. > >>> > >>> I only meant to use the /classes folder because my ejb > code is in the > >>> same project as the rest of my code (Servlets, javabeans, action > >>> classes, etc). Since it all compiles to the same one > folder, I assume I > >>> will have to "move" the ejb compiled classes every time I > compile them. > >>> What I was hoping for was a way to not have to do > this..instead, just > >>> let the whole project compile to the WEB-INF/classes > folder (all my > >>> code), and then have Orion pick up on the ejb changes > from that point. > >>> It appears to me from what everyone is saying I will have > to use some > >>> sort of script every time I make a change to an ejb, > which my first > >>> thoughts is a pain in the ass. Its very easy to develop > servlets, action > >>> classes, javabeans, core classes, but ejb not only > requires 3 classes > >>> per component, but lots of "special" work just to get the thing > >>> deployed. Then, every time you make a change, it requires the same > >>> process. I would think turn-around time for ejb > development is on the
RE: EJB Help..
Jim, How could a CMP managed entity bean handle a create for say an Oracle database table that used db specific sql for describing the key using a sequence? Where the sql itself might look like insert into customer (id, name, address) values(cust_sequence.NEXTVAL, "Jim" "12 Willow Street"); Maybe this is trivial. Better yet could I ask you to provide some of the sources of information that you use to help all of us better understand how to do CMP with perhaps complex RDBMS entity relationships? Thanks, Cory At 09:07 PM 10/20/00 -0400, Jim Archer wrote: >What types of relationships do you feel EJB 2.0 can't adequately support? I >have been studying 2.0 CMP carefully, and it seems to be quite powerfull. >There may be holes in it, but it can handle the majority of real works >cases. > >Jim > > >--On Friday, October 20, 2000 12:28 PM -0700 [EMAIL PROTECTED] wrote: > >> If you don't use an object-relational mapping tool you're still in for a >> lot of hurt with EJB if you have a complex data model. I don't think CMP >> really addresses the kind of data models large systems have. Nor does the >> relationship support in EJB 2.0 either. I think you'll end up doing JDBC >> BMP with your Session and Entity beans. Performance is only an issue when >> you make everything a stateful session bean or an entity bean. There are >> rules for when it's appropriate to make things entity beans. There still >> isn't a whole lot of useful information around on design EJBs yet though >> with most of it only explaining the basics including the ORA book. >> >> On Fri, 20 Oct 2000, Duffey, Kevin wrote: >> >>> Thanks. >>> >>> I only meant to use the /classes folder because my ejb code is in the >>> same project as the rest of my code (Servlets, javabeans, action >>> classes, etc). Since it all compiles to the same one folder, I assume I >>> will have to "move" the ejb compiled classes every time I compile them. >>> What I was hoping for was a way to not have to do this..instead, just >>> let the whole project compile to the WEB-INF/classes folder (all my >>> code), and then have Orion pick up on the ejb changes from that point. >>> It appears to me from what everyone is saying I will have to use some >>> sort of script every time I make a change to an ejb, which my first >>> thoughts is a pain in the ass. Its very easy to develop servlets, action >>> classes, javabeans, core classes, but ejb not only requires 3 classes >>> per component, but lots of "special" work just to get the thing >>> deployed. Then, every time you make a change, it requires the same >>> process. I would think turn-around time for ejb development is on the >>> order of a couple of minutes for every change you make. That results in >>> a lot slower development cycle than I am currently using. >>> >>> Worse, I have started hearing alot of people turn away from ejb and going >>> back to servlets because of development time, and performance. Supposedly >>> the ejb stuff isn't living up to all the hype. However, I look at what >>> the ejb container does for you (connection pooling, transactions, >>> security, instance pooling, etc) and it seems there is alot of stuff I >>> wont have to do on the side of persistence, transactions and >>> security..so maybe the extra time is worth it? ;) >>> >>> Anyways..I did as one person suggested in this list, I set up in my >>> application.xml like so: >>> >>> >>> /path/www/WEB-INF/classes/ >>> >>> >>> and Orion seems to be finding the classes (the ejb). However, I keep >>> seeing an error appear. It says something like: >>> >>> Error compiling class c:/path/www/WEB-INF/classes/ Login.java >>> LoginBean.java LoginHome.java can't find method create()in >>> LoginBean.java >>> >>> Its a very strange message to me. If I change the path, it >>> tells me it can't find the classes. If I delete the classes, it also >>> tells me it can't find them. So I assume the path is set correctly in >>> the module tag..as it is finding the classes. I am just not sure >>> why the heck its giving me some compiler error..or why its even trying >>> to compile them..they are already compiled. >>> >>> Anyways..I'll keep plugging away. >>> >>> >>> > -Original Message- >>> > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]]
RE: EJB Help..
Kevin, your "Home interface" class, the LoginHome object, should have a create() method. In fact, you can have several create methods if you like, each with a different parameter list (yes, you can have no create methids, but thats a special case no relevant here). The Orion primer does show a create method. Check out steps 4 and 5. Look for helloHome.create(). Once you have gotton an instance of your home interface object, you call its create method and it returnes to you an instance of your EJB's remote interface. As for compiling, In EJB 1.1 Orion has to generate the RMI stubs and skeletons for your classes and it has to compile those. In EJB 2.0, Orion has to create actual classes that extens the abstract classes you wrote, and these have to be compiled. In both cases, you must have the JDK installed and not just the JRE for this reason. Good luck... Jim --On Friday, October 20, 2000 1:21 PM -0700 "Duffey, Kevin" <[EMAIL PROTECTED]> wrote: > HI, > >> Double check your ejb-jar.xml--are you setting LoginHome as your Home >> interface in there? Is there a LoginHome.create() method >> declared? Is there >> a LoginBean.ejbCreate() method defined? > > Hmm..I don't have a LoginHome.create()..the Orion Primer didn't show > that. I have a Login.java, LoginBean.java and LoginHome.java. I think > Login.java is the only one with a create() method in it. Should both the > "interface" classes have a create() in it? > > Also, why is Orion trying to compile it if its already compiled? Or is > this some sort of "assembly" routine Orion does? I assume from what I > read that the EJB server "implements" the interfaces..so is it generating > its own code at runtime and that is what compiling is failing? > > Thanks again.
RE: EJB Help..
What types of relationships do you feel EJB 2.0 can't adequately support? I have been studying 2.0 CMP carefully, and it seems to be quite powerfull. There may be holes in it, but it can handle the majority of real works cases. Jim --On Friday, October 20, 2000 12:28 PM -0700 [EMAIL PROTECTED] wrote: > If you don't use an object-relational mapping tool you're still in for a > lot of hurt with EJB if you have a complex data model. I don't think CMP > really addresses the kind of data models large systems have. Nor does the > relationship support in EJB 2.0 either. I think you'll end up doing JDBC > BMP with your Session and Entity beans. Performance is only an issue when > you make everything a stateful session bean or an entity bean. There are > rules for when it's appropriate to make things entity beans. There still > isn't a whole lot of useful information around on design EJBs yet though > with most of it only explaining the basics including the ORA book. > > On Fri, 20 Oct 2000, Duffey, Kevin wrote: > >> Thanks. >> >> I only meant to use the /classes folder because my ejb code is in the >> same project as the rest of my code (Servlets, javabeans, action >> classes, etc). Since it all compiles to the same one folder, I assume I >> will have to "move" the ejb compiled classes every time I compile them. >> What I was hoping for was a way to not have to do this..instead, just >> let the whole project compile to the WEB-INF/classes folder (all my >> code), and then have Orion pick up on the ejb changes from that point. >> It appears to me from what everyone is saying I will have to use some >> sort of script every time I make a change to an ejb, which my first >> thoughts is a pain in the ass. Its very easy to develop servlets, action >> classes, javabeans, core classes, but ejb not only requires 3 classes >> per component, but lots of "special" work just to get the thing >> deployed. Then, every time you make a change, it requires the same >> process. I would think turn-around time for ejb development is on the >> order of a couple of minutes for every change you make. That results in >> a lot slower development cycle than I am currently using. >> >> Worse, I have started hearing alot of people turn away from ejb and going >> back to servlets because of development time, and performance. Supposedly >> the ejb stuff isn't living up to all the hype. However, I look at what >> the ejb container does for you (connection pooling, transactions, >> security, instance pooling, etc) and it seems there is alot of stuff I >> wont have to do on the side of persistence, transactions and >> security..so maybe the extra time is worth it? ;) >> >> Anyways..I did as one person suggested in this list, I set up in my >> application.xml like so: >> >> >> /path/www/WEB-INF/classes/ >> >> >> and Orion seems to be finding the classes (the ejb). However, I keep >> seeing an error appear. It says something like: >> >> Error compiling class c:/path/www/WEB-INF/classes/ Login.java >> LoginBean.java LoginHome.java can't find method create()in >> LoginBean.java >> >> Its a very strange message to me. If I change the path, it >> tells me it can't find the classes. If I delete the classes, it also >> tells me it can't find them. So I assume the path is set correctly in >> the module tag..as it is finding the classes. I am just not sure >> why the heck its giving me some compiler error..or why its even trying >> to compile them..they are already compiled. >> >> Anyways..I'll keep plugging away. >> >> >> > -Original Message- >> > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] >> > Sent: Thursday, October 19, 2000 6:34 PM >> > To: Orion-Interest >> > Subject: RE: EJB Help.. >> > >> > >> > Kevin, >> > look inside the news-application example bundled with Orion, >> > lots of things >> > will become clear for you after that. >> > /WEB-INF/classes directory is for servlet classes, >> > not for EJBs. >> > You'll see how to deploy EJBs in that example and in >> > documentation as well. >> > >> > stas@ >> > >> > > -Original Message- >> > > From: [EMAIL PROTECTED] >> > > [mailto:[EMAIL PROTECTED]]On Behalf Of >> > Duffey, Kevin >> > > Sent: Friday, October 20, 2000 3:45 AM >> > > To: Orion-Interest >> > > Subject: RE: EJB Help.. >> > >
RE: EJB Help..
the create method must reside in the Home interface and must match an ejbCreate method in the bean class... the Home And Remote interfaces (Login.java and LoginHome.java) must be implemented somewhere, because the Bean class doesn't implement it... EJB Servers/Containers, at deploy time, build a class that implements them and calls your ejb-- providing an indirection pattern which enables to provide transaction, security, caching and pooling support I suggest you read (again) extra carefully the ejb spec, and don't skip any section, specially the ones about Container responsabilities, this will give you the insight to know why your app isn't behaving well... HTH, Rifle PS: Copies of your Login*.java and the ejb-jar.xml would be welcome... -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] Sent: Viernes, 20 de Octubre de 2000 17:22 To: Orion-Interest Subject: RE: EJB Help.. HI, > Double check your ejb-jar.xml--are you setting LoginHome as your Home > interface in there? Is there a LoginHome.create() method > declared? Is there > a LoginBean.ejbCreate() method defined? Hmm..I don't have a LoginHome.create()..the Orion Primer didn't show that. I have a Login.java, LoginBean.java and LoginHome.java. I think Login.java is the only one with a create() method in it. Should both the "interface" classes have a create() in it? Also, why is Orion trying to compile it if its already compiled? Or is this some sort of "assembly" routine Orion does? I assume from what I read that the EJB server "implements" the interfaces..so is it generating its own code at runtime and that is what compiling is failing? Thanks again.
RE: EJB Help..
HI, > Double check your ejb-jar.xml--are you setting LoginHome as your Home > interface in there? Is there a LoginHome.create() method > declared? Is there > a LoginBean.ejbCreate() method defined? Hmm..I don't have a LoginHome.create()..the Orion Primer didn't show that. I have a Login.java, LoginBean.java and LoginHome.java. I think Login.java is the only one with a create() method in it. Should both the "interface" classes have a create() in it? Also, why is Orion trying to compile it if its already compiled? Or is this some sort of "assembly" routine Orion does? I assume from what I read that the EJB server "implements" the interfaces..so is it generating its own code at runtime and that is what compiling is failing? Thanks again.
RE: EJB Help..
And you're probably on unix or using ANT. When you start adding EJBs you start to think about using ANT or some other "make" like tool as you have to do more.
RE: EJB Help..
If you don't use an object-relational mapping tool you're still in for a lot of hurt with EJB if you have a complex data model. I don't think CMP really addresses the kind of data models large systems have. Nor does the relationship support in EJB 2.0 either. I think you'll end up doing JDBC BMP with your Session and Entity beans. Performance is only an issue when you make everything a stateful session bean or an entity bean. There are rules for when it's appropriate to make things entity beans. There still isn't a whole lot of useful information around on design EJBs yet though with most of it only explaining the basics including the ORA book. On Fri, 20 Oct 2000, Duffey, Kevin wrote: > Thanks. > > I only meant to use the /classes folder because my ejb code is in the same > project as the rest of my code (Servlets, javabeans, action classes, etc). > Since it all compiles to the same one folder, I assume I will have to "move" > the ejb compiled classes every time I compile them. What I was hoping for > was a way to not have to do this..instead, just let the whole project > compile to the WEB-INF/classes folder (all my code), and then have Orion > pick up on the ejb changes from that point. It appears to me from what > everyone is saying I will have to use some sort of script every time I make > a change to an ejb, which my first thoughts is a pain in the ass. Its very > easy to develop servlets, action classes, javabeans, core classes, but ejb > not only requires 3 classes per component, but lots of "special" work just > to get the thing deployed. Then, every time you make a change, it requires > the same process. I would think turn-around time for ejb development is on > the order of a couple of minutes for every change you make. That results in > a lot slower development cycle than I am currently using. > > Worse, I have started hearing alot of people turn away from ejb and going > back to servlets because of development time, and performance. Supposedly > the ejb stuff isn't living up to all the hype. However, I look at what the > ejb container does for you (connection pooling, transactions, security, > instance pooling, etc) and it seems there is alot of stuff I wont have to do > on the side of persistence, transactions and security..so maybe the extra > time is worth it? ;) > > Anyways..I did as one person suggested in this list, I set up in my > application.xml like so: > > > /path/www/WEB-INF/classes/ > > > and Orion seems to be finding the classes (the ejb). However, I keep seeing > an error appear. It says something like: > > Error compiling class c:/path/www/WEB-INF/classes/ Login.java > LoginBean.java LoginHome.java can't find method create()in LoginBean.java > > Its a very strange message to me. If I change the path, it tells me > it can't find the classes. If I delete the classes, it also tells me it > can't find them. So I assume the path is set correctly in the module > tag..as it is finding the classes. I am just not sure why the heck its > giving me some compiler error..or why its even trying to compile them..they > are already compiled. > > Anyways..I'll keep plugging away. > > > > -Original Message- > > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, October 19, 2000 6:34 PM > > To: Orion-Interest > > Subject: RE: EJB Help.. > > > > > > Kevin, > > look inside the news-application example bundled with Orion, > > lots of things > > will become clear for you after that. > > /WEB-INF/classes directory is for servlet classes, > > not for EJBs. > > You'll see how to deploy EJBs in that example and in > > documentation as well. > > > > stas@ > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > Duffey, Kevin > > > Sent: Friday, October 20, 2000 3:45 AM > > > To: Orion-Interest > > > Subject: RE: EJB Help.. > > > > > > > > > Thanks for the note. One thing..since I compile all of my > > classes into the > > > www/WEB-INF/classes dir, should I put a META-INF in the > > /classes dir, and > > > just point the module to the WEB-INF/classes folder? Would > > that work? > > > > > > Not that I want you to tell me everything, ok..I do, but > > what exactly do I > > > need to get EJB deployed in that way? My first stab that I > > want to do is > > > create a login process. I would like to use statless session > > > beans, and also > > > use an entity bean..using CM
Re: EJB Help..
> the same process. I would think turn-around time for ejb development is on > the order of a couple of minutes for every change you make. That results in > a lot slower development cycle than I am currently using. Today, I have been making changes to my ejbs, compling them, "touch"ing (ie. resaving so it's modification date is newer) the application.xml file, and instantly Orion redeploys and I can retest. The process takes a matter of seconds. > on the side of persistence, transactions and security..so maybe the extra > time is worth it? ;) There is some ramp up, but once you get used to it, it's not really that much slower, if it is at all. > /path/www/WEB-INF/classes/ > Error compiling class c:/path/www/WEB-INF/classes/ Login.java > LoginBean.java LoginHome.java can't find method create()in LoginBean.java Double check your ejb-jar.xml--are you setting LoginHome as your Home interface in there? Is there a LoginHome.create() method declared? Is there a LoginBean.ejbCreate() method defined? -joel shellman http://www.ants.com/
RE: EJB Help..
I just have my ejb classes in their own directory: ear/ejb/source ear/web/WEB-INF/classes I have a makefile in the /ear directory that recompiles all the servlets and ejb. I do have to restart the application after changes to the EJBs. > -Original Message- > From: Duffey, Kevin [SMTP:[EMAIL PROTECTED]] > Sent: October 20, 2000 2:17 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > Thanks. > > I only meant to use the /classes folder because my ejb code is in the same > project as the rest of my code (Servlets, javabeans, action classes, etc). > Since it all compiles to the same one folder, I assume I will have to > "move" > the ejb compiled classes every time I compile them. What I was hoping for > was a way to not have to do this..instead, just let the whole project > compile to the WEB-INF/classes folder (all my code), and then have Orion > pick up on the ejb changes from that point. It appears to me from what > everyone is saying I will have to use some sort of script every time I > make > a change to an ejb, which my first thoughts is a pain in the ass. Its very > easy to develop servlets, action classes, javabeans, core classes, but ejb > not only requires 3 classes per component, but lots of "special" work just > to get the thing deployed. Then, every time you make a change, it requires > the same process. I would think turn-around time for ejb development is on > the order of a couple of minutes for every change you make. That results > in > a lot slower development cycle than I am currently using. > > Worse, I have started hearing alot of people turn away from ejb and going > back to servlets because of development time, and performance. Supposedly > the ejb stuff isn't living up to all the hype. However, I look at what the > ejb container does for you (connection pooling, transactions, security, > instance pooling, etc) and it seems there is alot of stuff I wont have to > do > on the side of persistence, transactions and security..so maybe the extra > time is worth it? ;) > > Anyways..I did as one person suggested in this list, I set up in my > application.xml like so: > > > /path/www/WEB-INF/classes/ > > > and Orion seems to be finding the classes (the ejb). However, I keep > seeing > an error appear. It says something like: > > Error compiling class c:/path/www/WEB-INF/classes/ Login.java > LoginBean.java LoginHome.java can't find method create()in LoginBean.java > > Its a very strange message to me. If I change the path, it tells > me > it can't find the classes. If I delete the classes, it also tells me it > can't find them. So I assume the path is set correctly in the module > tag..as it is finding the classes. I am just not sure why the heck its > giving me some compiler error..or why its even trying to compile > them..they > are already compiled. > > Anyways..I'll keep plugging away. > > > > -Original Message- > > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, October 19, 2000 6:34 PM > > To: Orion-Interest > > Subject: RE: EJB Help.. > > > > > > Kevin, > > look inside the news-application example bundled with Orion, > > lots of things > > will become clear for you after that. > > /WEB-INF/classes directory is for servlet classes, > > not for EJBs. > > You'll see how to deploy EJBs in that example and in > > documentation as well. > > > > stas@ > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > Duffey, Kevin > > > Sent: Friday, October 20, 2000 3:45 AM > > > To: Orion-Interest > > > Subject: RE: EJB Help.. > > > > > > > > > Thanks for the note. One thing..since I compile all of my > > classes into the > > > www/WEB-INF/classes dir, should I put a META-INF in the > > /classes dir, and > > > just point the module to the WEB-INF/classes folder? Would > > that work? > > > > > > Not that I want you to tell me everything, ok..I do, but > > what exactly do I > > > need to get EJB deployed in that way? My first stab that I > > want to do is > > > create a login process. I would like to use statless session > > > beans, and also > > > use an entity bean..using CMP. I created 3 classes, Login, > > LoginBean and > > > LoginHome. I have them in com.mycompany.ejb package. That > > compiles to > > > www/WEB-INF/classes dir. So do I make application.xml like so: > > > > > > /www/
RE: EJB Help..
I think the thing I am looking for here is the same "ease of development" of servlets. I have a single project like so: com com/path com/path/core com/path/ejb com/path/ui com/path/ui/beans com/path/ui/actions com/path/ui/servlets com/path/ui/tags This is one project file (using Kawa 4.10). I then build the whole project and it all compiles to WEB-INF/classes. This is how we develop all of our code. So, Orion, using a web-app deployed to it, knows that all the classes are in WEB-INF/classes and finds them (with no classpath setting in the environment I might add!). What I am hoping to achieve is to somehow get the ejb deployment stuff to point to WEB-INF/classes/com/path/ejb to find all the ejbs, so that I can edit my code, compile the package (or the whole project) and Orion will pick up on them right away (or with a restart). This would all be done without me having to do anything extra, such as packaging the ejb into a .jar file, or having to specially compile the ejb package to a different dir, or having to move the ejb classes into a different folder! For the hell of it, I put a META-INF folder below the WEB-INF/classes where I put the ejb-jar.xml file, and Orion seems to be looking for the classes in the right place..which is what I want. I just get this error that I reported in a previous response to this list about this subject, and it appears it wont find the ejbs. Now, I used the Orion Primer and the Orion CMP Primer as examples, and the Orion Primer had nothing in the web.xml but the Orion CMP Primer did..it had an ejb-ref tag in it. I don't have this in my web.xml, so I am wondering if this is required, or why it is in the Orion CMP Primer, but not the Orion Primer web.xml example. Thanks. > -Original Message- > From: Juan Lorandi (Chile) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 19, 2000 2:03 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > > I acomplish this by simply: > > Creating a directory (in orion\applications) with the same > name than the ear > (directory: Test.ear) > then there I put the contents of my .ear, then repeat the process for > ejb-jar and war files... > > then, simply put your updated classes there(below your > ejb-jar dir, like say > orion\applications\Test.ear\ejb-jar-ic.jar > to update the descriptor, use earassembler and open your .ear > dir within > orion\applications. > > Works great for me! > > HTH, > > JP > > -Original Message- > From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] > Sent: Jueves, 19 de Octubre de 2000 16:37 > To: Orion-Interest > Subject: EJB Help.. > > > Hi all, > > I am trying my hand at EJB with Orion, and I am wondering if > there is any > way to avoid the hassle of always having to package the ejb > classes into a > .jar file, and so on. Is there any way at all to develop and > deploy ejbs > using an expanded dir structure, much like in the development > of a .war > file..where you have the whole www dir, WEB-INF, etc > expanded..but then jar > it up and rename it to .war for deployment? It seems rather > tedious on ejb > development every time a change is made, the whole thing has to be > repackaged and deployed. I know there are some tools, such as > JBuilder, > VisualCafe, etc that do this for you somewhat nicely..but > even those take a > little bit of time to do it. So, for the purposes of > development, where many > changes are happening on any regular basis, how can I quickly > develop and > test ejb, with Orion, or any app server for that matter. I do want the > ability for the context.lookup() call to work. The reason > is..I have two > computers, networked. I want to develop the ejbs on one > computer, and have > my www stuff on the other hitting them over the network so > that i can get > some kind of feel of the performance. I have a 4-way switch, so I can > develop www stuff, then switch over to the other computer and > do some ejb > stuff. I will run one instance of Orion on each computer. > However, I don't > mind also being able to run www and ejb stuff in the same on > instance on one > computer, as long as the lookup stuff is used the same way, > even though the > ejb's are running locally. > > Any pointers on how to set up Orion to do this, including the > application.xml tag (how to point it to the right > place instead of > the ejb.jar file, for example so that the ejbs will get > picked up by the > server), web.xml, orion-web.xml, server.xml, etc..anything > that needs to be > done to get this to work. > > Thanks so much for any help. >
RE: EJB Help..
Thanks. I only meant to use the /classes folder because my ejb code is in the same project as the rest of my code (Servlets, javabeans, action classes, etc). Since it all compiles to the same one folder, I assume I will have to "move" the ejb compiled classes every time I compile them. What I was hoping for was a way to not have to do this..instead, just let the whole project compile to the WEB-INF/classes folder (all my code), and then have Orion pick up on the ejb changes from that point. It appears to me from what everyone is saying I will have to use some sort of script every time I make a change to an ejb, which my first thoughts is a pain in the ass. Its very easy to develop servlets, action classes, javabeans, core classes, but ejb not only requires 3 classes per component, but lots of "special" work just to get the thing deployed. Then, every time you make a change, it requires the same process. I would think turn-around time for ejb development is on the order of a couple of minutes for every change you make. That results in a lot slower development cycle than I am currently using. Worse, I have started hearing alot of people turn away from ejb and going back to servlets because of development time, and performance. Supposedly the ejb stuff isn't living up to all the hype. However, I look at what the ejb container does for you (connection pooling, transactions, security, instance pooling, etc) and it seems there is alot of stuff I wont have to do on the side of persistence, transactions and security..so maybe the extra time is worth it? ;) Anyways..I did as one person suggested in this list, I set up in my application.xml like so: /path/www/WEB-INF/classes/ and Orion seems to be finding the classes (the ejb). However, I keep seeing an error appear. It says something like: Error compiling class c:/path/www/WEB-INF/classes/ Login.java LoginBean.java LoginHome.java can't find method create()in LoginBean.java Its a very strange message to me. If I change the path, it tells me it can't find the classes. If I delete the classes, it also tells me it can't find them. So I assume the path is set correctly in the module tag..as it is finding the classes. I am just not sure why the heck its giving me some compiler error..or why its even trying to compile them..they are already compiled. Anyways..I'll keep plugging away. > -Original Message- > From: Stanislav Maximov [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 19, 2000 6:34 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > > Kevin, > look inside the news-application example bundled with Orion, > lots of things > will become clear for you after that. > /WEB-INF/classes directory is for servlet classes, > not for EJBs. > You'll see how to deploy EJBs in that example and in > documentation as well. > > stas@ > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of > Duffey, Kevin > > Sent: Friday, October 20, 2000 3:45 AM > > To: Orion-Interest > > Subject: RE: EJB Help.. > > > > > > Thanks for the note. One thing..since I compile all of my > classes into the > > www/WEB-INF/classes dir, should I put a META-INF in the > /classes dir, and > > just point the module to the WEB-INF/classes folder? Would > that work? > > > > Not that I want you to tell me everything, ok..I do, but > what exactly do I > > need to get EJB deployed in that way? My first stab that I > want to do is > > create a login process. I would like to use statless session > > beans, and also > > use an entity bean..using CMP. I created 3 classes, Login, > LoginBean and > > LoginHome. I have them in com.mycompany.ejb package. That > compiles to > > www/WEB-INF/classes dir. So do I make application.xml like so: > > > > /www/WEB-INF/classes > > > > where the com folder starts? Or do I actually have to point them > > directly to > > the .class files themselves? If the classes are compiled in > a package, I > > assume I need to point the ejb module setting to the root > package right? > > Furthermore, do I need that ejb.xml file in META-INF? If so, what > > should it > > be set to if I am using an expanded dir? Lastly, how the > heck to I get the > > entity bean added..is that a forth class, or a whole set of > 3 different > > classes, one being the entity bean, the other two being > like the home and > > remote objects? It seems kind of silly that I would need 6 > > classes to do the > > login process..3 for the session/logic stuff, and 3 for the > > entity/database > > mapping. > > > > Thanks so much..I appreciate the help. &g
RE: EJB Help..
Hey, I used the Orion Primer, and I didn't find it too helpful. While its probably fine for those that have worked with EJB before, I didn't find it extremely helpful in moving me closer to working with EJB. I do have an EJB book from ORiely that I am reading..so that is helping me see how it all works. There is still the issues of CMP, O/R and how all that works. I will try what you said earlier, and see if that allows me to deploy them. Thanks. > -Original Message- > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 19, 2000 6:45 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > > For the deployment details, see the Orion primer - > http://www.jollem.com > > I generally move all classes from the WEB-INF/classes folder > into the ejb > module (makes it more portable etc) - makes them more visible. > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Duffey, Kevin > Sent: Friday, October 20, 2000 9:45 AM > To: Orion-Interest > Subject: RE: EJB Help.. > > > Thanks for the note. One thing..since I compile all of my > classes into the > www/WEB-INF/classes dir, should I put a META-INF in the > /classes dir, and > just point the module to the WEB-INF/classes folder? Would that work? > > Not that I want you to tell me everything, ok..I do, but what > exactly do I > need to get EJB deployed in that way? My first stab that I > want to do is > create a login process. I would like to use statless session > beans, and also > use an entity bean..using CMP. I created 3 classes, Login, > LoginBean and > LoginHome. I have them in com.mycompany.ejb package. That compiles to > www/WEB-INF/classes dir. So do I make application.xml like so: > > /www/WEB-INF/classes > > where the com folder starts? Or do I actually have to point > them directly to > the .class files themselves? If the classes are compiled in a > package, I > assume I need to point the ejb module setting to the root > package right? > Furthermore, do I need that ejb.xml file in META-INF? If so, > what should it > be set to if I am using an expanded dir? Lastly, how the heck > to I get the > entity bean added..is that a forth class, or a whole set of 3 > different > classes, one being the entity bean, the other two being like > the home and > remote objects? It seems kind of silly that I would need 6 > classes to do the > login process..3 for the session/logic stuff, and 3 for the > entity/database > mapping. > > Thanks so much..I appreciate the help. > > > > -Original Message- > > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, October 19, 2000 3:39 PM > > To: Orion-Interest > > Subject: RE: EJB Help.. > > > > > > Kevin, > > > > With any *ar file in Orion, you can use a directory instead. > > > > eg > > > > ./myejbs.jar > > > > > > can just be > > > > > > ./myejbs > > > > > > where ./myejbs is a directory structure which has the same structure > > (META-INF directories etc) as inside the myejbs.jar > > > > Mike > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > Duffey, Kevin > > Sent: Friday, October 20, 2000 5:37 AM > > To: Orion-Interest > > Subject: EJB Help.. > > > > > > Hi all, > > > > I am trying my hand at EJB with Orion, and I am wondering if > > there is any > > way to avoid the hassle of always having to package the ejb > > classes into a > > .jar file, and so on. Is there any way at all to develop and > > deploy ejbs > > using an expanded dir structure, much like in the development > > of a .war > > file..where you have the whole www dir, WEB-INF, etc > > expanded..but then jar > > it up and rename it to .war for deployment? It seems rather > > tedious on ejb > > development every time a change is made, the whole thing has to be > > repackaged and deployed. I know there are some tools, such as > > JBuilder, > > VisualCafe, etc that do this for you somewhat nicely..but > > even those take a > > little bit of time to do it. So, for the purposes of > > development, where many > > changes are happening on any regular basis, how can I quickly > > develop and > > test ejb, with Orion, or any app server for that matter. I > do want the > > ability for the context.lookup() call to work. The reason > > is..I have two > > computers
RE: EJB Help..
Kevin, look inside the news-application example bundled with Orion, lots of things will become clear for you after that. /WEB-INF/classes directory is for servlet classes, not for EJBs. You'll see how to deploy EJBs in that example and in documentation as well. stas@ > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin > Sent: Friday, October 20, 2000 3:45 AM > To: Orion-Interest > Subject: RE: EJB Help.. > > > Thanks for the note. One thing..since I compile all of my classes into the > www/WEB-INF/classes dir, should I put a META-INF in the /classes dir, and > just point the module to the WEB-INF/classes folder? Would that work? > > Not that I want you to tell me everything, ok..I do, but what exactly do I > need to get EJB deployed in that way? My first stab that I want to do is > create a login process. I would like to use statless session > beans, and also > use an entity bean..using CMP. I created 3 classes, Login, LoginBean and > LoginHome. I have them in com.mycompany.ejb package. That compiles to > www/WEB-INF/classes dir. So do I make application.xml like so: > > /www/WEB-INF/classes > > where the com folder starts? Or do I actually have to point them > directly to > the .class files themselves? If the classes are compiled in a package, I > assume I need to point the ejb module setting to the root package right? > Furthermore, do I need that ejb.xml file in META-INF? If so, what > should it > be set to if I am using an expanded dir? Lastly, how the heck to I get the > entity bean added..is that a forth class, or a whole set of 3 different > classes, one being the entity bean, the other two being like the home and > remote objects? It seems kind of silly that I would need 6 > classes to do the > login process..3 for the session/logic stuff, and 3 for the > entity/database > mapping. > > Thanks so much..I appreciate the help. > > > > -Original Message- > > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, October 19, 2000 3:39 PM > > To: Orion-Interest > > Subject: RE: EJB Help.. > > > > > > Kevin, > > > > With any *ar file in Orion, you can use a directory instead. > > > > eg > > > > ./myejbs.jar > > > > > > can just be > > > > > > ./myejbs > > > > > > where ./myejbs is a directory structure which has the same structure > > (META-INF directories etc) as inside the myejbs.jar > > > > Mike > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > Duffey, Kevin > > Sent: Friday, October 20, 2000 5:37 AM > > To: Orion-Interest > > Subject: EJB Help.. > > > > > > Hi all, > > > > I am trying my hand at EJB with Orion, and I am wondering if > > there is any > > way to avoid the hassle of always having to package the ejb > > classes into a > > .jar file, and so on. Is there any way at all to develop and > > deploy ejbs > > using an expanded dir structure, much like in the development > > of a .war > > file..where you have the whole www dir, WEB-INF, etc > > expanded..but then jar > > it up and rename it to .war for deployment? It seems rather > > tedious on ejb > > development every time a change is made, the whole thing has to be > > repackaged and deployed. I know there are some tools, such as > > JBuilder, > > VisualCafe, etc that do this for you somewhat nicely..but > > even those take a > > little bit of time to do it. So, for the purposes of > > development, where many > > changes are happening on any regular basis, how can I quickly > > develop and > > test ejb, with Orion, or any app server for that matter. I do want the > > ability for the context.lookup() call to work. The reason > > is..I have two > > computers, networked. I want to develop the ejbs on one > > computer, and have > > my www stuff on the other hitting them over the network so > > that i can get > > some kind of feel of the performance. I have a 4-way switch, so I can > > develop www stuff, then switch over to the other computer and > > do some ejb > > stuff. I will run one instance of Orion on each computer. > > However, I don't > > mind also being able to run www and ejb stuff in the same on > > instance on one > > computer, as long as the lookup stuff is used the same way, > > even though the > > ejb's are running locally. > > > > Any pointers on how to set up Orion to do this, including the > > application.xml tag (how to point it to the right > > place instead of > > the ejb.jar file, for example so that the ejbs will get > > picked up by the > > server), web.xml, orion-web.xml, server.xml, etc..anything > > that needs to be > > done to get this to work. > > > > Thanks so much for any help. > > > > >
RE: EJB Help..
For the deployment details, see the Orion primer - http://www.jollem.com I generally move all classes from the WEB-INF/classes folder into the ejb module (makes it more portable etc) - makes them more visible. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin Sent: Friday, October 20, 2000 9:45 AM To: Orion-Interest Subject: RE: EJB Help.. Thanks for the note. One thing..since I compile all of my classes into the www/WEB-INF/classes dir, should I put a META-INF in the /classes dir, and just point the module to the WEB-INF/classes folder? Would that work? Not that I want you to tell me everything, ok..I do, but what exactly do I need to get EJB deployed in that way? My first stab that I want to do is create a login process. I would like to use statless session beans, and also use an entity bean..using CMP. I created 3 classes, Login, LoginBean and LoginHome. I have them in com.mycompany.ejb package. That compiles to www/WEB-INF/classes dir. So do I make application.xml like so: /www/WEB-INF/classes where the com folder starts? Or do I actually have to point them directly to the .class files themselves? If the classes are compiled in a package, I assume I need to point the ejb module setting to the root package right? Furthermore, do I need that ejb.xml file in META-INF? If so, what should it be set to if I am using an expanded dir? Lastly, how the heck to I get the entity bean added..is that a forth class, or a whole set of 3 different classes, one being the entity bean, the other two being like the home and remote objects? It seems kind of silly that I would need 6 classes to do the login process..3 for the session/logic stuff, and 3 for the entity/database mapping. Thanks so much..I appreciate the help. > -Original Message- > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 19, 2000 3:39 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > > Kevin, > > With any *ar file in Orion, you can use a directory instead. > > eg > > ./myejbs.jar > > > can just be > > > ./myejbs > > > where ./myejbs is a directory structure which has the same structure > (META-INF directories etc) as inside the myejbs.jar > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Duffey, Kevin > Sent: Friday, October 20, 2000 5:37 AM > To: Orion-Interest > Subject: EJB Help.. > > > Hi all, > > I am trying my hand at EJB with Orion, and I am wondering if > there is any > way to avoid the hassle of always having to package the ejb > classes into a > .jar file, and so on. Is there any way at all to develop and > deploy ejbs > using an expanded dir structure, much like in the development > of a .war > file..where you have the whole www dir, WEB-INF, etc > expanded..but then jar > it up and rename it to .war for deployment? It seems rather > tedious on ejb > development every time a change is made, the whole thing has to be > repackaged and deployed. I know there are some tools, such as > JBuilder, > VisualCafe, etc that do this for you somewhat nicely..but > even those take a > little bit of time to do it. So, for the purposes of > development, where many > changes are happening on any regular basis, how can I quickly > develop and > test ejb, with Orion, or any app server for that matter. I do want the > ability for the context.lookup() call to work. The reason > is..I have two > computers, networked. I want to develop the ejbs on one > computer, and have > my www stuff on the other hitting them over the network so > that i can get > some kind of feel of the performance. I have a 4-way switch, so I can > develop www stuff, then switch over to the other computer and > do some ejb > stuff. I will run one instance of Orion on each computer. > However, I don't > mind also being able to run www and ejb stuff in the same on > instance on one > computer, as long as the lookup stuff is used the same way, > even though the > ejb's are running locally. > > Any pointers on how to set up Orion to do this, including the > application.xml tag (how to point it to the right > place instead of > the ejb.jar file, for example so that the ejbs will get > picked up by the > server), web.xml, orion-web.xml, server.xml, etc..anything > that needs to be > done to get this to work. > > Thanks so much for any help. > >
RE: EJB Help..
Thanks for the note. One thing..since I compile all of my classes into the www/WEB-INF/classes dir, should I put a META-INF in the /classes dir, and just point the module to the WEB-INF/classes folder? Would that work? Not that I want you to tell me everything, ok..I do, but what exactly do I need to get EJB deployed in that way? My first stab that I want to do is create a login process. I would like to use statless session beans, and also use an entity bean..using CMP. I created 3 classes, Login, LoginBean and LoginHome. I have them in com.mycompany.ejb package. That compiles to www/WEB-INF/classes dir. So do I make application.xml like so: /www/WEB-INF/classes where the com folder starts? Or do I actually have to point them directly to the .class files themselves? If the classes are compiled in a package, I assume I need to point the ejb module setting to the root package right? Furthermore, do I need that ejb.xml file in META-INF? If so, what should it be set to if I am using an expanded dir? Lastly, how the heck to I get the entity bean added..is that a forth class, or a whole set of 3 different classes, one being the entity bean, the other two being like the home and remote objects? It seems kind of silly that I would need 6 classes to do the login process..3 for the session/logic stuff, and 3 for the entity/database mapping. Thanks so much..I appreciate the help. > -Original Message- > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 19, 2000 3:39 PM > To: Orion-Interest > Subject: RE: EJB Help.. > > > Kevin, > > With any *ar file in Orion, you can use a directory instead. > > eg > > ./myejbs.jar > > > can just be > > > ./myejbs > > > where ./myejbs is a directory structure which has the same structure > (META-INF directories etc) as inside the myejbs.jar > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Duffey, Kevin > Sent: Friday, October 20, 2000 5:37 AM > To: Orion-Interest > Subject: EJB Help.. > > > Hi all, > > I am trying my hand at EJB with Orion, and I am wondering if > there is any > way to avoid the hassle of always having to package the ejb > classes into a > .jar file, and so on. Is there any way at all to develop and > deploy ejbs > using an expanded dir structure, much like in the development > of a .war > file..where you have the whole www dir, WEB-INF, etc > expanded..but then jar > it up and rename it to .war for deployment? It seems rather > tedious on ejb > development every time a change is made, the whole thing has to be > repackaged and deployed. I know there are some tools, such as > JBuilder, > VisualCafe, etc that do this for you somewhat nicely..but > even those take a > little bit of time to do it. So, for the purposes of > development, where many > changes are happening on any regular basis, how can I quickly > develop and > test ejb, with Orion, or any app server for that matter. I do want the > ability for the context.lookup() call to work. The reason > is..I have two > computers, networked. I want to develop the ejbs on one > computer, and have > my www stuff on the other hitting them over the network so > that i can get > some kind of feel of the performance. I have a 4-way switch, so I can > develop www stuff, then switch over to the other computer and > do some ejb > stuff. I will run one instance of Orion on each computer. > However, I don't > mind also being able to run www and ejb stuff in the same on > instance on one > computer, as long as the lookup stuff is used the same way, > even though the > ejb's are running locally. > > Any pointers on how to set up Orion to do this, including the > application.xml tag (how to point it to the right > place instead of > the ejb.jar file, for example so that the ejbs will get > picked up by the > server), web.xml, orion-web.xml, server.xml, etc..anything > that needs to be > done to get this to work. > > Thanks so much for any help. > >
RE: EJB Help..
Title: RE: EJB Help.. I use ant. Check jakarta.apache.org for it. When I change a file with JBuilder or TextPad, I run ant in a console window. It builds the jar file and moves it to the right place for orion to pick it up. Kurt in Atlanta >-Original Message- >From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] >Sent: Thursday, October 19, 2000 3:37 PM >To: Orion-Interest >Subject: EJB Help.. > > >Hi all, > >I am trying my hand at EJB with Orion, and I am wondering if >there is any >way to avoid the hassle of always having to package the ejb >classes into a >.jar file, and so on. Is there any way at all to develop and >deploy ejbs >using an expanded dir structure, much like in the development of a .war >file..where you have the whole www dir, WEB-INF, etc >expanded..but then jar >it up and rename it to .war for deployment? It seems rather >tedious on ejb >development every time a change is made, the whole thing has to be >repackaged and deployed. I know there are some tools, such as JBuilder, >VisualCafe, etc that do this for you somewhat nicely..but even >those take a >little bit of time to do it. So, for the purposes of >development, where many >changes are happening on any regular basis, how can I quickly >develop and >test ejb, with Orion, or any app server for that matter. I do want the >ability for the context.lookup() call to work. The reason >is..I have two >computers, networked. I want to develop the ejbs on one >computer, and have >my www stuff on the other hitting them over the network so >that i can get >some kind of feel of the performance. I have a 4-way switch, so I can >develop www stuff, then switch over to the other computer and >do some ejb >stuff. I will run one instance of Orion on each computer. >However, I don't >mind also being able to run www and ejb stuff in the same on >instance on one >computer, as long as the lookup stuff is used the same way, >even though the >ejb's are running locally. > >Any pointers on how to set up Orion to do this, including the >application.xml tag (how to point it to the right >place instead of >the ejb.jar file, for example so that the ejbs will get picked >up by the >server), web.xml, orion-web.xml, server.xml, etc..anything >that needs to be >done to get this to work. > >Thanks so much for any help. >
RE: EJB Help..
Kevin, With any *ar file in Orion, you can use a directory instead. eg ./myejbs.jar can just be ./myejbs where ./myejbs is a directory structure which has the same structure (META-INF directories etc) as inside the myejbs.jar Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin Sent: Friday, October 20, 2000 5:37 AM To: Orion-Interest Subject: EJB Help.. Hi all, I am trying my hand at EJB with Orion, and I am wondering if there is any way to avoid the hassle of always having to package the ejb classes into a .jar file, and so on. Is there any way at all to develop and deploy ejbs using an expanded dir structure, much like in the development of a .war file..where you have the whole www dir, WEB-INF, etc expanded..but then jar it up and rename it to .war for deployment? It seems rather tedious on ejb development every time a change is made, the whole thing has to be repackaged and deployed. I know there are some tools, such as JBuilder, VisualCafe, etc that do this for you somewhat nicely..but even those take a little bit of time to do it. So, for the purposes of development, where many changes are happening on any regular basis, how can I quickly develop and test ejb, with Orion, or any app server for that matter. I do want the ability for the context.lookup() call to work. The reason is..I have two computers, networked. I want to develop the ejbs on one computer, and have my www stuff on the other hitting them over the network so that i can get some kind of feel of the performance. I have a 4-way switch, so I can develop www stuff, then switch over to the other computer and do some ejb stuff. I will run one instance of Orion on each computer. However, I don't mind also being able to run www and ejb stuff in the same on instance on one computer, as long as the lookup stuff is used the same way, even though the ejb's are running locally. Any pointers on how to set up Orion to do this, including the application.xml tag (how to point it to the right place instead of the ejb.jar file, for example so that the ejbs will get picked up by the server), web.xml, orion-web.xml, server.xml, etc..anything that needs to be done to get this to work. Thanks so much for any help.
RE: EJB Help..
I acomplish this by simply: Creating a directory (in orion\applications) with the same name than the ear (directory: Test.ear) then there I put the contents of my .ear, then repeat the process for ejb-jar and war files... then, simply put your updated classes there(below your ejb-jar dir, like say orion\applications\Test.ear\ejb-jar-ic.jar to update the descriptor, use earassembler and open your .ear dir within orion\applications. Works great for me! HTH, JP -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] Sent: Jueves, 19 de Octubre de 2000 16:37 To: Orion-Interest Subject: EJB Help.. Hi all, I am trying my hand at EJB with Orion, and I am wondering if there is any way to avoid the hassle of always having to package the ejb classes into a .jar file, and so on. Is there any way at all to develop and deploy ejbs using an expanded dir structure, much like in the development of a .war file..where you have the whole www dir, WEB-INF, etc expanded..but then jar it up and rename it to .war for deployment? It seems rather tedious on ejb development every time a change is made, the whole thing has to be repackaged and deployed. I know there are some tools, such as JBuilder, VisualCafe, etc that do this for you somewhat nicely..but even those take a little bit of time to do it. So, for the purposes of development, where many changes are happening on any regular basis, how can I quickly develop and test ejb, with Orion, or any app server for that matter. I do want the ability for the context.lookup() call to work. The reason is..I have two computers, networked. I want to develop the ejbs on one computer, and have my www stuff on the other hitting them over the network so that i can get some kind of feel of the performance. I have a 4-way switch, so I can develop www stuff, then switch over to the other computer and do some ejb stuff. I will run one instance of Orion on each computer. However, I don't mind also being able to run www and ejb stuff in the same on instance on one computer, as long as the lookup stuff is used the same way, even though the ejb's are running locally. Any pointers on how to set up Orion to do this, including the application.xml tag (how to point it to the right place instead of the ejb.jar file, for example so that the ejbs will get picked up by the server), web.xml, orion-web.xml, server.xml, etc..anything that needs to be done to get this to work. Thanks so much for any help.
Re: EJB Help..
We actually don't have any jar files at all for our EJBs. They are just in the classpath (I think we have a library path="classpath" somewhere that points to the class files). The module tag, I think can just point to a directory. -joel shellman > Hi all, > > I am trying my hand at EJB with Orion, and I am wondering if there is any > way to avoid the hassle of always having to package the ejb classes into a > .jar file, and so on. Is there any way at all to develop and deploy ejbs > using an expanded dir structure, much like in the development of a .war > file..where you have the whole www dir, WEB-INF, etc expanded..but then jar > it up and rename it to .war for deployment? It seems rather tedious on ejb > development every time a change is made, the whole thing has to be > repackaged and deployed. I know there are some tools, such as JBuilder, > VisualCafe, etc that do this for you somewhat nicely..but even those take a > little bit of time to do it. So, for the purposes of development, where many > changes are happening on any regular basis, how can I quickly develop and > test ejb, with Orion, or any app server for that matter. I do want the > ability for the context.lookup() call to work. The reason is..I have two > computers, networked. I want to develop the ejbs on one computer, and have > my www stuff on the other hitting them over the network so that i can get > some kind of feel of the performance. I have a 4-way switch, so I can > develop www stuff, then switch over to the other computer and do some ejb > stuff. I will run one instance of Orion on each computer. However, I don't > mind also being able to run www and ejb stuff in the same on instance on one > computer, as long as the lookup stuff is used the same way, even though the > ejb's are running locally. > > Any pointers on how to set up Orion to do this, including the > application.xml tag (how to point it to the right place instead of > the ejb.jar file, for example so that the ejbs will get picked up by the > server), web.xml, orion-web.xml, server.xml, etc..anything that needs to be > done to get this to work. > > Thanks so much for any help. > >