SV: Newbie Q: Can't find bean?
You allso have the ejb tag library. It should be on the orion site somewhere. then i think you can use ejb:useBean This one is used for JNDI lookups and so on. Good luck! Klaus -Opprinnelig melding- Fra: Sean P. McNamara [mailto:[EMAIL PROTECTED]] Sendt: 11. november 2000 18:00 Til: Orion-Interest Emne: Newbie Q: Can't find bean? Hi again- Baby-steps, baby-steps I've finally gotten my application packaged properly, and my 2.0 CMP EntityBean to deploy properly, but am having problems accessing the bean via JSP. I've scanned the mailing lists, but don't find anything related. Hopefully someone can lend me a clue. I'm sure I'm doing something dumb here, but am not quite sure what. Any pointers appreciated. The error I receive is: 500 Internal Server Error java.lang.InstantiationException: Could not find the bean named 'employee' in the page scope at java.lang.Throwable.init(Throwable.java:96) at java.lang.Exception.init(Exception.java:44) at java.lang.InstantiationException.init(InstantiationException.java:46) at /EmployeeEntryAction.jsp._jspService(/EmployeeEntryAction.jsp.java:34) at com.orionserver.http.OrionHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.xi(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at com.evermind.server.http.d5.sv(JAX) at com.evermind.server.http.d5.st(JAX) at com.evermind.server.http.eh.s0(JAX) at com.evermind.server.http.eh.do(JAX) at com.evermind.util.f.run(JAX) And the useBean segment from my JSP is: --- jsp:useBean id="employee" scope="page" type="com.soma.axon.ejb.entity.Employee" / -- Sean P. McNamara[EMAIL PROTECTED] SOMA Technologies, Inc. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
SV: Newbie Q: Can't find bean?
Here is an example of a bean lookup method: private SomeEntityHome getSomeEntityHome()throws NamingException { Context context = new InitialContext(); SomeEntityHome home = (SomeEntityHome)PortableRemoteObject.narrow( context.lookup("java:comp/env/ejb/SomeEntity"), SomeEntityHome.class); return home; } This one should be usable :) Then its ready to call findermethods and so on.For instance, to fine a row in the database based on the pk: try { SomeEntityHome home = getSomeEntityHome(); SomeEntity remote = home.findByPrimaryKey(new SomeEntityPK(34)); catch (NamingException ne) {} The JSP page can be coded just the same way as anything, only you dont have to give any urls or providers and so on to do it (if youre in the same vm/applicationserver) the ejb tag library i mentioned earlier use this stuff inside the tag lib so the JSP code gets a whole lot cleaner... Klaus -Opprinnelig melding- Fra: Sean P. McNamara [mailto:[EMAIL PROTECTED]] Sendt: 12. november 2000 01:15 Til: Orion-Interest Emne: Re: Newbie Q: Can't find bean? Thanks for your reply Robert, however I don't really feel it's fair for you to have judged me ignorant of both Java and the J2EE in general. I've done quite a bit of development with session beans, but very little front-end (read JSP) development, and no EntityBean work, as it wasn't supported by the EJB (1.0) containers we were working with. I've been through the JSP specification, and don't see anything in there pertaining to how EJB are expected to be referenced. There is section 2.13 describing the jsp:useBean tag, and unfortunately thought it would perhaps provide the needed functionality to automate the bean lookup process. In addition to the specification, I have a copy of the Monson-Haefel book on Enterprise JavaBeans, but there is virtually no mention of JSP-EJB interaction. I also spent some time earlier today browsing JSP-centric books in the local bookstore, and found little mention (usually about 1 paragraph) regarding EJB's. Obviously, using the same method that is used in a Servlet allows me to do what I need to do. I was simply looking for a way to skip that step. I've seen some code posted to the list using tags in the ejb: namespace, but haven't located any documentation for that particular taglib. Perhaps you could be so good as to provide a link? I'm in the process of downloading the Romans book, so perhaps that will have the details I'm looking for. Thanks for the pointer. Robert Krueger writes: At 14:25 11.11.00 , you wrote: OK... I've gotten something working by removing my use of the jsp:useBean tag, and instead grabbing the EntityBean home, and creating manually, which seems to work. yes, bean != enterprise java bean. you will do yourself a BIG favour if you read up on jsp, ejb and java in general as there are some fundamental basics missing. trial and error will not get you very far in J2EE. look at the specs (they are actually rather readable) and maybe check out ed romans ejb book (free download at www.theserverside.com). -- Sean P. McNamara[EMAIL PROTECTED] SOMA Technologies, Inc. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
Re: Newbie Q: Can't find bean?
"Sean P. McNamara" wrote: In addition to the specification, I have a copy of the Monson-Haefel book on Enterprise JavaBeans, but there is virtually no mention of JSP-EJB interaction. I also spent some time earlier today browsing JSP-centric books in the local bookstore, and found little mention (usually about 1 paragraph) regarding EJB's. I agree with you, it's hard to find information on that subject. I've been reading this list and the sun J2EE interest for a couple of months now and am almost ready doing my first complete EJB / JSP app. The thing I found is as follows. It seems that by using a tag-lib you can use your EJB directly in your jsp's, but the general opinion in this list and others is that the way to do such things is by creating 'common' java beans or classes to use with the jsp:useBean tags in the jsp. These classes than refrence stateful or stateless session beans, which in turn reference the entity beans. sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
Re: Web upload of a Java class
Storm Linux User wrote: It's not form commercial use. It's for my research project for getting my master's degree in Electrical Engineering ... I'm not concered about securety right now. Hmm as long as you're not pursueing a masters in computer security.. Take a look at http://www.servlets.com and get the /com/oreilly/servlet package. It contains a class called MultiPartRequest, which should help you upload the file to your server. Then all you should do is have your servlet copy the file from te location from where it was uploaded to the location from where you can run the classfile.. It's quite dangerous thou ;-) sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
Re: HELP! Confused about CMP and Primary Keys
Vidur Dhanda wrote: OK, Now I'm thoroughly confused.Would someone please help me before I confuse myself even more. Here's the question/scenario: I have a primary key, public class PK implements Serializable { public String fooGuts; constructor/get/Set ... } The only way it seems to work is by having a String member in the Entity bean -- fooGuts. But that seems primitive. I know the EJB 1.1 spec says the for _composite_ primary keys ... But to my thinking this is more of a OR problem -- I have a CMP field (that happens to be the primary key) and I want to control its relational representation. And with all the nice OR stuff in Orion, it must be possible. My only constraint is that I have to adhere to EJB1.1. You'll need that public string for cmp to work. The primary Key class should contain the primary key field in your table (as a public field) so oruion can manipulate it. Take a look at yeh EJB sprec, section 9.4.7.1 and 9.4.7.2 sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
Re: Get the web uploaded file
Storm Linux User wrote: form method="post" action="my_servlet" input type="file" name="my_class_file" input type="submit" /form Your form tage is missing the ENCTYPE="multipart/form-data" tag. Without this your page does not return a file. sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
SV: Newbie Q: Can't find bean?
Ahh i forgot something very important for your web application using the session/entity bean in question (web.xml)... You have to define ejb-refs for the beans you want to use, or you will not find the bean from the JSP... Here is an example of an ejb-ref you can put in the bottom of your file. ejb-ref ejb-ref-nameejb/SomeEntity/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.something.ejb.entity.SomeEntityHome/home remotecom.something.ejb.entity.SomeEntity/remote /ejb-ref Klaus -Opprinnelig melding- Fra: Sven van 't Veer [mailto:[EMAIL PROTECTED]] Sendt: 13. november 2000 12:14 Til: Orion-Interest Emne: Re: Newbie Q: Can't find bean? "Sean P. McNamara" wrote: In addition to the specification, I have a copy of the Monson-Haefel book on Enterprise JavaBeans, but there is virtually no mention of JSP-EJB interaction. I also spent some time earlier today browsing JSP-centric books in the local bookstore, and found little mention (usually about 1 paragraph) regarding EJB's. I agree with you, it's hard to find information on that subject. I've been reading this list and the sun J2EE interest for a couple of months now and am almost ready doing my first complete EJB / JSP app. The thing I found is as follows. It seems that by using a tag-lib you can use your EJB directly in your jsp's, but the general opinion in this list and others is that the way to do such things is by creating 'common' java beans or classes to use with the jsp:useBean tags in the jsp. These classes than refrence stateful or stateless session beans, which in turn reference the entity beans. sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
classes shared by all ejb jar files...
I have non-ejb classes are used by all ejb jar files and how do I let Orion know to use these classes for the ejb jars files ? Define the classpath somewhere ? I have got the error below while deploying the ejb jar files. Thansl for your help. D:\orionjava -jar orion.jar Auto-unpacking D:\orion\user-manager\usermanager.ear... done. Auto-unpacking D:\orion\user-manager\usermanager\usermanager-web.war... done. Auto-deploying usermanager (Assembly had been updated)... Error loading package at file:/D:/orion/user-manager/usermanager/ServiceManager.jar, Error loading class 'servicemanager.session.ServiceManagerBean': java.lang.NoClassDefFoundError: framework/jms/JmsQueueManager Regards, Edmund
UserManager shutdown hook?
We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references. When the orion is restarted, it creates a new instance of the usermanager, and there is know way to kill the spawned thread, so after several restart(in development mode), these threads get crazy. I would love to see a shutdown hook added to the AbstractUserManager class. Anyone else have a need for this? Anyone else have an idea how to get around it? Thanks! James Birchfield Ironmax a better way to buy, sell and rent construction equipment 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223
RMI Client in web-app
Dear orion users, I am faced in problems with rmi-client, in web container I have a rmi client that perform a lookup in an rmi-server (a simple application, where the rmi-client will lookup to rmi-server and the object in rmi-server, just execute a external native application), the simple app, just has a method doLogin (), and nothing more, the problem is in getting SecurityExceptions, in line where I am performing the Naming.lookup ("rmi://rmi-server/myReference"), before the lookup I am setting the System.setSecurityManager (new RMISecurityManager ()); (but before this I am verifying if orion has a System.getSecurityManager==null, and doesn't has one). When I perfom this rmi-client from a single dos prompt (in same server machine), all works fine, and this perform good from J2EE 1.2.1 RI too. So, if anyone known anything, please response to list. very thanks 4 all Claudio Miranda
RE: JBuilder4.0
Magnus, Here is a basic how to: There are two ways to setup JBuider4 Enterprise for debugging any class that runs under Orion: The standard java debugger, or JPDA. Usingeithermethod the first thing to do is to create a project that includes all of the code you wish to debug. This means that if you are using JSPs that you include in your project the path that you have Orion putting your source and class files it generates for JSPs. Create a library for your project that includesat least thefollowing jar files from your orion install directory: ejb.jar orion.jar jdbc.jar jaxp.jar jndi.jar jta.jar You may wish to add other jars to the list depending on what you are doing. If you are using the JavaMail API for example you will want to include the activation.jar, and mail.jar. Include any other libraries your project requires. - Non JPDA method(Any Java2 platform on which JB4 will run): select run from the menu select configurations select default select the main class ellipses button to select the main class. type: com.evermind.server.ApplicationServer now under vm parameters type: -classic If you do include the classic parameter debugging will either not work at all, or very slowly, so don't forget that step. when you want to debug with Orion you simple start Orion by clicking on the debug icon at the top of the screen or using shift-F9. Now you have an instance of Orion running in JBuilder and you can use JBuilder's built in browser, (or any browser)to access yourwork by pointing it to http://localhost You may place break points in anything that is in your source/classpath that means that you can debug EJBs, JSPs, or Servlets with ease. You will need to restart your local Orion server when you make changes to your code. - JPDA method (assumes JDK1.3) Create a batch file(NT/2K) or a shell script (Linux/UNIX/BSD/Solaris). I put this file in the orion install directory and call it debug.bat It should look something like this: %JAVA_HOME%\bin\java -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -jar orion.jar Now in JBuilder open your project. Select project from the menu. Select the debug tab. Enable remote debugging by selecting the check box associated marker "Enable remote debugging". Click the attach radio button. Select dt_socket as the transport type. Enter localhost as the host name if you are running Orion locally, otherwise use the name of the host Orion will be running on. Enter 8000 as the address. Now start Orion with your batch/shell script. Put a break point were you need one and then click the debug icon, or hit shift-F9. note: When using JPDA I have found that when I changesomething I have to stop and start the Orion server, and then restart the debugging session by removing it's tab at the bottom of the IDE. This can be annoying. If you need more details let me know. I would appreciate whatever credit is appropriate. Also since I wrote this very quickly let me know if there are any holes, and feel free to edit. Russ -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus RydinSent: Monday, November 13, 2000 1:59 AMTo: Orion-InterestSubject: RE: JBuilder4.0 Russ, can you send in a setup description for your JBuilder 4 environment so that we can add it to orionsupport? WR -Original Message-From: Russ White [mailto:[EMAIL PROTECTED]]Sent: den 9 november 2000 13:31To: Orion-InterestSubject: RE: JBuilder4.0 It must be a configuration problem as I do this regularly with no problems. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]m]On Behalf Of Savotchkin EgorSent: Thursday, November 09, 2000 4:54 AMTo: Orion-InterestSubject: JBuilder4.0 Hi all, I try to use JB4.0 with to debug apps in Orion, so when I run orion with jdk1.3 (in dubug mode) it just hangs and finally "java commits a system error ... ". With 1.2.2 it works fine! Is it a jdk 1.3 bug or some other issue? P.S. When I run it (not in debug) everything works ok. Egor Savotchkin.
Re: UserManager shutdown hook?
At 08:41 13.11.00 , you wrote: We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references. When the orion is restarted, it creates a new instance of the usermanager, and there is know way to kill the spawned thread, so after several restart(in development mode), these threads get crazy. I would love to see a shutdown hook added to the AbstractUserManager class. Anyone else have a need for this? Anyone else have an idea how to get around it? you could put the code that inititates a cleanup thread in a method of the usermanager that checks when the last cleanup has been invoked. this will be more robust and won't give you a noticable performance penalty. It's not that nice (sort of a heuristic approach because it relies on the fact that getUser() is probably called often enough to ensure that your cleanup works reliably). pseudo code: getUser(String userName){ if(lastCleanupWasTooLongAgo()){ doCleanUpActionAsyncronouslyAndSetTimestamp(); } return getCustomUser(userName); } Thanks! James Birchfield Ironmax a better way to buy, sell and rent construction equipment 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223 (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
interim solution to dependent object issues
Orion seems to have several issues with dependent object; the worse being that DO-DO relationships don't work. While this sucks, Orion is still light years ahead of BEA since they don't intend to support dependent objects in the 6.0 beta. The interim solution seems to be to make everything an entity bean. My question is this: what are the issues with making all objects entity beans? Speed is the first thing that comes to mind, but I understand the Orion optimizes same-server beans to pass-by-value instead of by-reference. Is this true? Can anyone think of any other issues? I'm probably going to re-design my app to use all entity beans (with some simple EJB-DO relationships) for the time being. -tim
Re: UserManager shutdown hook?
The problem is the creation of the new Thread will happen, and two threads will be running. Restart again, and now I have 3 threads running. I have played around with different ways to get it to run more efficiently, but I still have no way of knowing when to stop(or destroy) the other threads. James Birchfield Ironmax a better way to buy, sell and rent construction equipment 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223 |+ || Robert Krueger| || [EMAIL PROTECTED] | || Sent by: | || owner-orion-interest@orion| || server.com| ||| ||| || 11/13/00 10:42 AM | || Please respond to | || Orion-Interest| ||| |+ -| | | | To: Orion-Interest [EMAIL PROTECTED] | | cc: | | Subject: Re: UserManager shutdown hook? | -| At 08:41 13.11.00 , you wrote: We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references. When the orion is restarted, it creates a new instance of the usermanager, and there is know way to kill the spawned thread, so after several restart(in development mode), these threads get crazy. I would love to see a shutdown hook added to the AbstractUserManager class. Anyone else have a need for this? Anyone else have an idea how to get around it? you could put the code that inititates a cleanup thread in a method of the usermanager that checks when the last cleanup has been invoked. this will be more robust and won't give you a noticable performance penalty. It's not that nice (sort of a heuristic approach because it relies on the fact that getUser() is probably called often enough to ensure that your cleanup works reliably). pseudo code: getUser(String userName){ if(lastCleanupWasTooLongAgo()){ doCleanUpActionAsyncronouslyAndSetTimestamp(); } return getCustomUser(userName); } Thanks! James Birchfield Ironmax a better way to buy, sell and rent construction equipment 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223 (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
RE: JBuilder4.0
For those interested in a serious debugger and don't mind spending a little bit of money for one, I can heartily recommend using BugSeeker 2 from http://www.karmira.com/ It takes a few minutes to set up (the setup is trivial, if anyone uses it and has trouble, let me know and I'll help out), and lets you do pretty much anything you might want to do with a debugger. Their support forums are also excellent, and they tend to take user feedback and suggestions very seriously when it comes to defining new features and suchlike. The only annoyance I have with it is that it's not possible to see field values for Orion's JAX'ed classes! Hani On Mon, 13 Nov 2000, Russ White wrote: Magnus, Here is a basic how to: There are two ways to setup JBuider4 Enterprise for debugging any class that runs under Orion: The standard java debugger, or JPDA. Using either method the first thing to do is to create a project that includes all of the code you wish to debug. This means that if you are using JSPs that you include in your project the path that you have Orion putting your source and class files it generates for JSPs. Create a library for your project that includes at least the following jar files from your orion install directory: ejb.jar orion.jar jdbc.jar jaxp.jar jndi.jar jta.jar You may wish to add other jars to the list depending on what you are doing. If you are using the JavaMail API for example you will want to include the activation.jar, and mail.jar. Include any other libraries your project requires. - Non JPDA method(Any Java2 platform on which JB4 will run): select run from the menu select configurations select default select the main class ellipses button to select the main class. type: com.evermind.server.ApplicationServer now under vm parameters type: -classic If you do include the classic parameter debugging will either not work at all, or very slowly, so don't forget that step. when you want to debug with Orion you simple start Orion by clicking on the debug icon at the top of the screen or using shift-F9. Now you have an instance of Orion running in JBuilder and you can use JBuilder's built in browser, (or any browser) to access your work by pointing it to http://localhost You may place break points in anything that is in your source/classpath that means that you can debug EJBs, JSPs, or Servlets with ease. You will need to restart your local Orion server when you make changes to your code. - JPDA method (assumes JDK1.3) Create a batch file(NT/2K) or a shell script (Linux/UNIX/BSD/Solaris). I put this file in the orion install directory and call it debug.bat It should look something like this: %JAVA_HOME%\bin\java -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjd wp:transport=dt_socket,server=y,suspend=n,address=8000 -jar orion.jar Now in JBuilder open your project. Select project from the menu. Select the debug tab. Enable remote debugging by selecting the check box associated marker "Enable remote debugging". Click the attach radio button. Select dt_socket as the transport type. Enter localhost as the host name if you are running Orion locally, otherwise use the name of the host Orion will be running on. Enter 8000 as the address. Now start Orion with your batch/shell script. Put a break point were you need one and then click the debug icon, or hit shift-F9. note: When using JPDA I have found that when I change something I have to stop and start the Orion server, and then restart the debugging session by removing it's tab at the bottom of the IDE. This can be annoying. If you need more details let me know. I would appreciate whatever credit is appropriate. Also since I wrote this very quickly let me know if there are any holes, and feel free to edit. Russ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus Rydin Sent: Monday, November 13, 2000 1:59 AM To: Orion-Interest Subject: RE: JBuilder4.0 Russ, can you send in a setup description for your JBuilder 4 environment so that we can add it to orionsupport? WR -Original Message- From: Russ White [mailto:[EMAIL PROTECTED]] Sent: den 9 november 2000 13:31 To: Orion-Interest Subject: RE: JBuilder4.0 It must be a configuration problem as I do this regularly with no problems. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] m]On Behalf Of Savotchkin Egor Sent: Thursday, November 09, 2000 4:54 AM To: Orion-Interest Subject: JBuilder4.0 Hi all, I try to use JB4.0 with to debug apps in Orion, so when I run orion with jdk1.3 (in
transaction error message
whenever I specify exclusive-write-access="false" in my orion-ejb-jar.xml descriptor, I get the following error message when trying to deploy the application: Auto-deploying cstool-ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)... UserAuthHome_EntityHomeWrapper50.java:197: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:199: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:231: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:598: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:600: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:633: Undefined variable: transaction if(transaction != null) Any ideas on why this is happening? I am using CMP and container-managed transactions... Thanks. begin:vcard n:Braginskiy;Dmitriy fn:Dmitriy Braginskiy org:Inforocket.com version:2.1 email;internet:[EMAIL PROTECTED] end:vcard
Re: transaction error message
which orion version? I'd generally stay away from exclusive-write-access="false" since there are some unsolved issues and at the moment IMHO it's not really reliable. I think magnus is looking at it but at the moment it still means trouble. I'd try setting low validity timeouts for the time being. regards, robert At 13:26 13.11.00 , you wrote: whenever I specify exclusive-write-access="false" in my orion-ejb-jar.xml descriptor, I get the following error message when trying to deploy the application: Auto-deploying cstool-ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)... UserAuthHome_EntityHomeWrapper50.java:197: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:199: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:231: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:598: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:600: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:633: Undefined variable: transaction if(transaction != null) Any ideas on why this is happening? I am using CMP and container-managed transactions... Thanks. (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
REPOST: Multiple websites on one server not found [NEED HELP]
I posted this last week, but haven't gotten any resolution. I've followed the how-to's and such in the Orion docs, and have searched the archive. None of the stuff that is mentioned there is working, so I implore any of you out there with multiple websites running to give this a look and help me figure out what I'm doing wrong. If you'd rather contact me off list, that's fine toobut I need to get this little problem solved, and I'm running out of places to look THE SETUP (in $ORION_HOME/config, on host "orionhost") 1. I have a web-site.xml file for each of the two sites that I want to run under Orion (cs2k-web-site.xml and twsm-web-site.xml). Each file contains a line like this (sub "cs2k" in for "twsm" for cs2k-web-site.xml): default-web-app application="twsm" name="twsm-web" shared="true" root="/twsm" / 2. I have added the following lines to the end of server.xml: application name="twsm" path="../applications/twsm/" / web-site path="./twsm-web-site.xml" / application name="cs2k" path="../applications/cs2k/" / web-site path="./cs2k-web-site.xml" / 3. I have added the following lines to application.xml, under the default web-module tag: web-module id="cs2k" path="../applications/cs2k" / web-module id="twsm" path="../applications/twsm" / 4. All other files remain unmodified, and the default-web-site.xml has the root set to "/". Now, the application that comes up when entering a URL of http://orionhost/ is the first app to be defined in server.xml. I have verified this by switching the declarations, and the other site comes up as the default. I do not know how to get the browser to display the other site, as http://orionhost/cs2k and http://orionhost/twsm both yield 404 errors. Also, since I have defined the default website with a root of "/", shouldn't http://orionhost/ output the default web page, rather than one of my webapps? Currently, the same host:port will be serving both websites. They may get differing virtual domains in the future. So, can anyone tell me how I can view both websites on the same server? Can anyone see what I'm missing here? -- Andrew Kidder L3 SW/Support Engineer, IBU Tivoli Systems 512-436-4544 [EMAIL PROTECTED] http://www.tivoli.com
Re: REPOST: Multiple websites on one server not found [NEED HELP]
At 13:19 13.11.00 , you wrote: I posted this last week, but haven't gotten any resolution. I've followed the how-to's and such in the Orion docs, and have searched the archive. None of the stuff that is mentioned there is working, so I implore any of you out there with multiple websites running to give this a look and help me figure out what I'm doing wrong. If you'd rather contact me off list, that's fine toobut I need to get this little problem solved, and I'm running out of places to look THE SETUP (in $ORION_HOME/config, on host "orionhost") 1. I have a web-site.xml file for each of the two sites that I want to run under Orion (cs2k-web-site.xml and twsm-web-site.xml). Each file contains a line like this (sub "cs2k" in for "twsm" for cs2k-web-site.xml): default-web-app application="twsm" name="twsm-web" shared="true" root="/twsm" / this doesn't make sense. the default-web-app of a site is always mounted to "/". what you want is probably one web-site.xml that reads default-web-app application="whatever" name="whatever" root="/" / web-app application="twsm" name="twsm-web" root="/twsm" / web-app application="cs2k" name="cs2k-web" root="/cs2k" / HTH robert 2. I have added the following lines to the end of server.xml: application name="twsm" path="../applications/twsm/" / web-site path="./twsm-web-site.xml" / application name="cs2k" path="../applications/cs2k/" / web-site path="./cs2k-web-site.xml" / 3. I have added the following lines to application.xml, under the default web-module tag: web-module id="cs2k" path="../applications/cs2k" / web-module id="twsm" path="../applications/twsm" / 4. All other files remain unmodified, and the default-web-site.xml has the root set to "/". Now, the application that comes up when entering a URL of http://orionhost/ is the first app to be defined in server.xml. I have verified this by switching the declarations, and the other site comes up as the default. I do not know how to get the browser to display the other site, as http://orionhost/cs2k and http://orionhost/twsm both yield 404 errors. Also, since I have defined the default website with a root of "/", shouldn't http://orionhost/ output the default web page, rather than one of my webapps? Currently, the same host:port will be serving both websites. They may get differing virtual domains in the future. So, can anyone tell me how I can view both websites on the same server? Can anyone see what I'm missing here? -- Andrew Kidder L3 SW/Support Engineer, IBU Tivoli Systems 512-436-4544 [EMAIL PROTECTED] http://www.tivoli.com (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: REPOST: Multiple websites on one server not found [NEED HELP]
In your application.xml for each file, specify the context root. Eg, in cs2k/META-INF/application.xml specify: module web web-urics2k-web/web-uri !-- directory where the website lives, eg applications/cs2k/cs2k-web, must have a WEB-INF/web.xml file in it -- context-rootcs2k//context-root /web /module On Mon, 13 Nov 2000, Drew Kidder wrote: I posted this last week, but haven't gotten any resolution. I've followed the how-to's and such in the Orion docs, and have searched the archive. None of the stuff that is mentioned there is working, so I implore any of you out there with multiple websites running to give this a look and help me figure out what I'm doing wrong. If you'd rather contact me off list, that's fine toobut I need to get this little problem solved, and I'm running out of places to look THE SETUP (in $ORION_HOME/config, on host "orionhost") 1. I have a web-site.xml file for each of the two sites that I want to run under Orion (cs2k-web-site.xml and twsm-web-site.xml). Each file contains a line like this (sub "cs2k" in for "twsm" for cs2k-web-site.xml): default-web-app application="twsm" name="twsm-web" shared="true" root="/twsm" / 2. I have added the following lines to the end of server.xml: application name="twsm" path="../applications/twsm/" / web-site path="./twsm-web-site.xml" / application name="cs2k" path="../applications/cs2k/" / web-site path="./cs2k-web-site.xml" / 3. I have added the following lines to application.xml, under the default web-module tag: web-module id="cs2k" path="../applications/cs2k" / web-module id="twsm" path="../applications/twsm" / 4. All other files remain unmodified, and the default-web-site.xml has the root set to "/". Now, the application that comes up when entering a URL of http://orionhost/ is the first app to be defined in server.xml. I have verified this by switching the declarations, and the other site comes up as the default. I do not know how to get the browser to display the other site, as http://orionhost/cs2k and http://orionhost/twsm both yield 404 errors. Also, since I have defined the default website with a root of "/", shouldn't http://orionhost/ output the default web page, rather than one of my webapps? Currently, the same host:port will be serving both websites. They may get differing virtual domains in the future. So, can anyone tell me how I can view both websites on the same server? Can anyone see what I'm missing here? -- Andrew Kidder L3 SW/Support Engineer, IBU Tivoli Systems 512-436-4544 [EMAIL PROTECTED] http://www.tivoli.com
EJB-EJB CMP
Hi, I'm having problems configuring orion to create the tables for entity EJBs with references to other entity EJBs (using CMP). Can somebody, please, enumerate the steps for doing this. Thanks in advance, Juan Gargiulo
Examples of pre-JDBC 2.0 datasources.xml
Does someone have examples of how to set up config/datasources.xml for use with pre-2.0 JDBC drivers? How and when should I use OrionCMTDataSource, DriverManagerConnectionPoolDataSource, DriverManagerXADataSource, etc.? Thanks, Andrew - Andrew Chisholm Director of Application Development Colabranet, Inc.[EMAIL PROTECTED] 3415 Greystone Dr., Suite 102 Phone: (512) 231-1026 ext. 104 Austin, TX 78731 Fax: (512) 795-8508
Re: REPOST: Multiple websites on one server not found [NEED HELP]
At 14:59 13.11.00 , you wrote: In your application.xml for each file, specify the context root. Eg, in cs2k/META-INF/application.xml specify: module web web-urics2k-web/web-uri !-- directory where the website lives, eg applications/cs2k/cs2k-web, must have a WEB-INF/web.xml file in it -- context-rootcs2k//context-root /web /module have you actually tried this?? I wasn't aware that the context root actually does anything. would be a surprise to me. I'm quite sure the only thing that's honoured is the root attribute in the web-app element. robert (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: EJB-EJB CMP
Well, here's an example of a parent-child 1-N relationship: A has a Set member field of type B The class outlines are: public interface A extends EJBObject { public Set getB() throws RemoteException; ... } public interface B extends EJBObject { ... } public class AEJB implements EntityBean { public static final Class b_types = B.class; //required by Orion I think public Set b; public Set getB() { return b; } ... } public class BEJB implements EntityBean { ... } That models the relationship using entity beans and CMP Next you'll need to specify all this in the ejb-jar.xml, here are the relevant sections: ejb-jar enterprise-beans entity !-- all attributes for bean A -- cmp-field descriptionA set of B/description field-nameb/field-name /cmp /entity !-- rest of ejb-jar file, with attributes for entity B -- /enterprise-beans relationships ejb-relation ejb-relation-nameA-B/ejb-relation-name ejb-relationship-role ejb-relationship-role-name a-has-b /ejb-relationship-role-name multiplicityone/multiplicity role-source ejb-nameA/ejb-name /role-source cmr-field cmr-field-nameb/cmr-field-name cmr-field-typejava.util.Set/cmr-field-type /cmr-field /ejb-relationship-role ejb-relationship-role ejb-relationship-role-name b-belongsto-a /ejb-relationship-role-name multiplicitymany/multiplicity role-source ejb-nameB/ejb-name /role-source /ejb-relationship-role /ejb-relation /relationships /ejb-jar When you deploy this, Orion will automatically create all the appropriate entries in orion-ejb-jar.xml, including datasource, database field and table names, and so on. You can then tweak it further to fit your needs. I hope you find this helpful... Hani On Mon, 13 Nov 2000, Juan Gargiulo wrote: Hi, I'm having problems configuring orion to create the tables for entity EJBs with references to other entity EJBs (using CMP). Can somebody, please, enumerate the steps for doing this. Thanks in advance, Juan Gargiulo
Re: REPOST: Multiple websites on one server not found [NEED HELP]
Yep, it's how I have things set up! I don't have a web-app defined, just an application, with ejb and web modules, and it all works very nicely, unless I'm missing something here... On Mon, 13 Nov 2000, Robert Krueger wrote: At 14:59 13.11.00 , you wrote: In your application.xml for each file, specify the context root. Eg, in cs2k/META-INF/application.xml specify: module web web-urics2k-web/web-uri !-- directory where the website lives, eg applications/cs2k/cs2k-web, must have a WEB-INF/web.xml file in it -- context-rootcs2k//context-root /web /module have you actually tried this?? I wasn't aware that the context root actually does anything. would be a surprise to me. I'm quite sure the only thing that's honoured is the root attribute in the web-app element. robert (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: REPOST: Multiple websites on one server not found [NEED HELP]
Ooops, spoke too soon. I just combed through my config files and it does look like I have a web-app root defined in default-web-site.xml, my mistake. On Mon, 13 Nov 2000, Robert Krueger wrote: At 14:59 13.11.00 , you wrote: In your application.xml for each file, specify the context root. Eg, in cs2k/META-INF/application.xml specify: module web web-urics2k-web/web-uri !-- directory where the website lives, eg applications/cs2k/cs2k-web, must have a WEB-INF/web.xml file in it -- context-rootcs2k//context-root /web /module have you actually tried this?? I wasn't aware that the context root actually does anything. would be a surprise to me. I'm quite sure the only thing that's honoured is the root attribute in the web-app element. robert (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
NameNotFoundException
Title: NameNotFoundException I am getting this error from Jsp.. Can someone point me to right direction? Here is my orion-ejb-jar.xml ?xml version=1.0? !DOCTYPE orion-ejb-jar PUBLIC -//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN http://www.orionserver.com/dtds/orion-ejb-jar.dtd orion-ejb-jar deployment-version=1.4.4 deployment-time=e2cfc5c10b enterprise-beans entity-deployment name=EBAddress location=EBAddress wrapper=EBAddressHome_EntityHomeWrapper1 table=EBAddress resource-ref-mapping name=jdbc/modevdb / /entity-deployment /enterprise-beans assembly-descriptor default-method-access security-role-mapping name=lt;default-ejb-caller-rolegt; impliesAll=true / /default-method-access /assembly-descriptor /orion-ejb-jar -Original Message- From: Dmitriy Braginskiy [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 1:27 PM To: Orion-Interest Subject: transaction error message whenever I specify exclusive-write-access=false in my orion-ejb-jar.xml descriptor, I get the following error message when trying to deploy the application: Auto-deploying cstool-ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)... UserAuthHome_EntityHomeWrapper50.java:197: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:199: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:231: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:598: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:600: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:633: Undefined variable: transaction if(transaction != null) Any ideas on why this is happening? I am using CMP and container-managed transactions... Thanks.
NameNotFoundException
Title: NameNotFoundException InitialContext ctx = new InitialContext(); // if (ctx == null) { out.println(Ctx is null); } else { out.println(CTX is not null); } Object obj = ctx.lookup(EBAddress); And here is the jsp code that I use to get the JNDI ref. Sorry for not putting it together in the last email.. Any help? Se Hee -Original Message- From: Dmitriy Braginskiy [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 1:27 PM To: Orion-Interest Subject: transaction error message whenever I specify exclusive-write-access=false in my orion-ejb-jar.xml descriptor, I get the following error message when trying to deploy the application: Auto-deploying cstool-ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)... UserAuthHome_EntityHomeWrapper50.java:197: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:199: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:231: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:598: Undefined variable: transaction wrapper = new UserAuth_EntityBeanWrapper40(context, transaction != null); UserAuthHome_EntityHomeWrapper50.java:600: Undefined variable: transaction if(transaction != null) UserAuthHome_EntityHomeWrapper50.java:633: Undefined variable: transaction if(transaction != null) Any ideas on why this is happening? I am using CMP and container-managed transactions... Thanks.
RE: UserManager shutdown hook?
Title: RE: UserManager shutdown hook? How do you determine expired user references? Will you be able to cleanup stateful session beans that were in use by that user? Thank's Andrej -Original Message- From: Robert Krueger [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 7:43 AM To: Orion-Interest Subject: Re: UserManager shutdown hook? At 08:41 13.11.00 , you wrote: We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references.
Orion as JBuilder Servlet Engine
I have JB4 Enterprise and have figured out (thanks to help from some folks on this list) how to replace IAS with Orion for running EJBs. I also would like to replace Tomcat with Orion as the web server/servlet engine so I can maintain the integrated JSP and servlet debugging. These seems to be a bit more complicated and requires using Borland's OpenTools API. Has anyone done this or know where I can find some starting code? Thanks, Marc
Orion + Weblogic via JNDI?
Hello, For reasons beyond my control, I have to use WebLogic as my EJB container. My EJB clients live in Orion. I am trying to get the EJB clients to lookup the EJBs (over on WebLogic) via JNDI. I believe I have constructed the IntialContext correctly, but I keep running into classpath issues. My initialcontext looks like this: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.T3InitialContextFactory"); p.put(Context.PROVIDER_URL, "t3://localhost:7001"); return new InitialContext(p); When I run this, I always get: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.T3InitialContextFactory. Root exception is java.lang.ClassNotFoundException: weblogic.jndi.T3InitialContextFactory Yet I am positive that I have weblogic.jndi.T3InitialContextFactory in my classpath. In fact, I have specified it on the command line, and in my environment. Both of those don't seem to make any difference. Is Orion taking over the InitialContext? What am I not understanding here? Any help or pointers would be greatly appreciated! Thanks very much, Seth Seth Ladd | Software Engineer, Product Development Brivo Systems, Inc. [EMAIL PROTECTED] Confidential and Proprietary, Brivo Systems, Inc.
RE: UserManager shutdown hook?
Luckily, we are using *NO* stateful session beans for this user. For each user, we keep track of a timestamp of when the last time the getUser method was called. If it has been more than an hour, we remove them and the next call will pull that user back from the database, and back into the users cache. But the thread that *reaps* this table gets spawned everytime we restart, and since the program never exits, the threads do not get cleaned up. James Birchfield Ironmax a better way to buy, sell and rent construction equipment 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223 |+ || Andrej Gabara | || [EMAIL PROTECTED] | || Sent by: | || owner-orion-interest@orion| || server.com| ||| ||| || 11/13/00 04:05 PM | || Please respond to | || Orion-Interest| ||| |+ | | | | To: Orion-Interest [EMAIL PROTECTED] | | cc: | | Subject: RE: UserManager shutdown hook? | | How do you determine expired user references? Will you be able to cleanup stateful session beans that were in use by that user? Thank's Andrej -Original Message- From: Robert Krueger [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 7:43 AM To: Orion-Interest Subject: Re: UserManager shutdown hook? At 08:41 13.11.00 , you wrote: We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references.
Re: Orion + Weblogic via JNDI?
perhaps you should try to load the WebLogic classes with your bootstrap classpath(we have to do this for our encryption packages). try somehing like java -Xbootclasspath/p:lib\some.jar -jar orion.jar James Birchfield Ironmax a better way to buy, sell and rent construction equipment 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223 |+ || "Seth Ladd" | || [EMAIL PROTECTED] | || Sent by: | || owner-orion-interest@orion| || server.com| ||| ||| || 11/13/00 04:34 PM | || Please respond to | || Orion-Interest| ||| |+ | | | | To: Orion-Interest [EMAIL PROTECTED] | | cc: | | Subject: Orion + Weblogic via JNDI? | | Hello, For reasons beyond my control, I have to use WebLogic as my EJB container. My EJB clients live in Orion. I am trying to get the EJB clients to lookup the EJBs (over on WebLogic) via JNDI. I believe I have constructed the IntialContext correctly, but I keep running into classpath issues. My initialcontext looks like this: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.T3InitialContextFactory"); p.put(Context.PROVIDER_URL, "t3://localhost:7001"); return new InitialContext(p); When I run this, I always get: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.T3InitialContextFactory. Root exception is java.lang.ClassNotFoundException: weblogic.jndi.T3InitialContextFactory Yet I am positive that I have weblogic.jndi.T3InitialContextFactory in my classpath. In fact, I have specified it on the command line, and in my environment. Both of those don't seem to make any difference. Is Orion taking over the InitialContext? What am I not understanding here? Any help or pointers would be greatly appreciated! Thanks very much, Seth Seth Ladd | Software Engineer, Product Development Brivo Systems, Inc. [EMAIL PROTECTED] Confidential and Proprietary, Brivo Systems, Inc.
RE: UserManager shutdown hook?
Title: RE: UserManager shutdown hook? what is a 'raper' thread?? . . . . . . . . . . Now I'm sorry I asked ;-) JP -Original Message-From: Andrej Gabara [mailto:[EMAIL PROTECTED]]Sent: Lunes, 13 de Noviembre de 2000 18:05To: Orion-InterestSubject: RE: UserManager shutdown hook? How do you determine expired user references? Will you be able to cleanup stateful session beans that were in use by that user? Thank's Andrej -Original Message- From: Robert Krueger [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 7:43 AM To: Orion-Interest Subject: Re: UserManager shutdown hook?At 08:41 13.11.00 , you wrote: We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references.
Context path of web-apps..can someone clarify for me..
Hi, I seem to be confused about how web-apps and their context play into relative and aboslute paths on JSP pages and servlets. I have two applications deployed. One uses 3 web-apps, the other is just one. In the one with 3 web-apps, they all 3 share the common www dir, (the only difference is a variable that indicates what "media" they belong in..so as to get the right database connection). I have them as 3 separate web-apps to keep the 3 from being able to share memory..so each web-app has its own memory space in Orion. When I access any images in the /www/images folder (where /www is from the root of the application), I have to use img src="./images/imagename.gif". But in my single app, I only use /images/imagename.gif..no . before the first / . I also set a variable on every page called contextPath that is like: % String contextPath = request.getServletPath().substring(0, request.getServletPath().lastIndexOf("/")); % I can't use getContextPath() because our site runs in production on JRun 2.3.2 right now (please..no flame mail ;), which only supports Servlet 2.1/JSP 1.0. The getContext() method doesn't exist in Servlet 2.1. That is why I get a substring of the requestURI. At any rate..what is the true facts on relative and absolute paths? I thought in any web-app, I can use / and that gets me to the root of the app. So, using /images should always get me to the root of the web-app, not the root of the application itself. It appears when running 3 web-apps all pointing to the same one www dir, the root is the / BEFORE the www, not the www itself. That is why I use ./images. Thanks for any explanation on this.
RE: UserManager shutdown hook?
Sorry, Slip of the fingers, I meant to type 'reaper'. A 'reaper' thread is a thread that does a clean-up chore of some kind.Better start using the spell check option...:)James BirchfieldIronmaxa better way to buy, sell and rent construction equipment5 Corporate Center9960 Corporate Campus Drive, Suite 2000Louisville, KY 40223@Sent by: [EMAIL PROTECTED]11/13/2000 08:11 PM NSTPlease respond to Orion-Interest To: Orion-Interest [EMAIL PROTECTED] cc: bcc: Subject: RE: UserManager shutdown hook? what is a 'raper' thread??. . .. .. .. ..Now I'm sorry I asked ;-)JP-Original Message-From: Andrej Gabara [mailto:[EMAIL PROTECTED]]Sent: Lunes, 13 de Noviembre de 2000 18:05To: Orion-InterestSubject: RE: UserManager shutdown hook?How do you determine expired user references? Will you be able to cleanup stateful session beans that were in use by that user? Thank's Andrej -Original Message- From: Robert Krueger [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 7:43 AM To: Orion-Interest Subject: Re: UserManager shutdown hook?At 08:41 13.11.00 , you wrote: We have implemented our own usermanager, and it all works great. But we would like to know when the server is restarted at least, if not shutdown. We start up a 'raper' thread, which is responsible for cleaning up expired user references.
RE: UserManager shutdown hook?
Title: RE: UserManager shutdown hook? What do you gain by doing it this way? Can you update your cache when getUser() is called, and reap any idle users then? What is this cache used for? What kind of user manager are you using? Thank's Andrej -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 2:23 PM To: Orion-Interest Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: UserManager shutdown hook? Luckily, we are using *NO* stateful session beans for this user. For each user, we keep track of a timestamp of when the last time the getUser method was called. If it has been more than an hour, we remove them and the next call will pull that user back from the database, and back into the users cache. But the thread that *reaps* this table gets spawned everytime we restart, and since the program never exits, the threads do not get cleaned up. James Birchfield
Re: There has GOTTA be a BETTER way !!!!
EJBs can be less work to use, but more work to build, and then you discover they don't scale and have to rewrite the underpinnings. Jaz Keith Kwiatek wrote: Hello, EJB's are great if you like tripling the amount of code you have to write How is everyone building their web apps with hand coded programs, or using automagic tools? It sure seems like there should be some sort of tool that you can just point at database tables, and have it build the jsp or ejb entity bean. AND shouldn't there be a tool that you can just drop the bean on an html template thus allowing visual access to the bean fields? You can't access ejb's directly from a jsp page (like a normal bean) can you? Any tools that will automagically wrap an ejb in a bean for presentation in a JSP? Am I off base here, or are ejb's a lot more work? How can people talk about how EJB's "speed development time"?!? Keith
DataSource and Transaction
Hi! I have an orion-specific questionabout DataSources and transactions. I have a session bean in whichIstart a UserTransaction: ut = context.getUserTransaction(); ut.begin(); .. stuff .. ut.commit(); In the "sutff" section above Icreate different entity-beans like user.create(userDetails) and updates different data in others and thenI use a method to insert some data into a table that's not an entity-bean like this: EntityBean.insertLine(lineData) and the insertLine method uses JNDI to obtain a DataSource like "jdbc/PooledDataSource and from that DataSourceI call getConnection to get a java.sql.Connection object. What should I do to make sure that the DataSource I get from the JNDI lookup is in the same transactional-scope as my transaction from the session-bean, so that if the UserTransaction does a rollback, my inserts will be rolledback aswell Is there a special DataSource for this purpose? Lars Borup JensenSoftware Developer CONSCIUSBådehavnsvej 15DK-9000 AalborgPhone: (+45) 98 164 663Mobil: (+45) 28 594 103Email: [EMAIL PROTECTED]Home: http://www.conscius.com