Re: [JBoss-user] Login Module Question
Scott, you are almost certainly right, but I am at a loss as to how to do what I need to do. My webapp is a servlet and a set of html and jsp pages, all protected by JBoss security. If the user enters at the "top" of the site he runs the servlet and all is well. If he later uses his browser history or just remembers the url for one of the pages and enters directly in to the "middle" of the site, JBoss security protects the page and forces authentication, but the user gets to the page without running the servlet and his session info is not set. Gerry - Original Message - From: "Scott M Stark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 11:19 PM Subject: Re: [JBoss-user] Login Module Question > Why is this necessary? This seems like a web container implementation detail > and JAAS login modules are about abstracting out authentication mechanisms. > If there is some session info that needs to be returned do it from the > secured > servlet or jsp page. > > - Original Message - > From: Gerry Duhig > To: [EMAIL PROTECTED] > Sent: Thursday, September 27, 2001 1:46 PM > Subject: [JBoss-user] Login Module Question > > > Hi! > > In a Custom Login Module, is it possible to communicate with the user? > > I have replaced a servlet by a custom Login module, but I need to write a > cookie or force a servlet to be run. > > Is this possible? > > Is it a stupid idea? It doesn't seem so! > > Gerry > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] castor and transactions
throwing an applcation exception doesn't automatically rollback the tx. you'll need to call setRollbackOnly on the bean context for that to happen - do it before you throw the exception as a general rule. I've been told that this behaviour is in the spec to make it compliant with CORBA... someone might want to elaborate on the reasoning behind it though. cheers dim On Thu, 27 Sep 2001, Dominik Baranowski wrote: > hello, > > I'm trying to integrate castor into jboss. Everything seems to be running > fine. I'm wondering how I can get a data object managed by castor to be > included in a trasaction started by the container. (container managed > transactions) > > that is, > > I have a transacted session bean which asks Castor for an object. I change > the object and then I call update on the database object I got from castor, > before I exit the session bean method (and therefore commit)I throw an > exception from the session bean which should cause a rollback and no changes > commited to the database. > > is there a way to do this? > > the bahavior that I'm seeing is that the change goes into the db > > > thanks > -dom > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] What is my JBOSS_DIST?
thank you... sir john - Original Message - From: "Imran Bohoran" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 28, 2001 12:42 PM Subject: RE: [JBoss-user] What is my JBOSS_DIST? > it should point to > > /opt/JBoss-2.4.0_Tomcat-3.2.3/jboss > > cheers > > Imran > > -Original Message- > From: John LYC [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 9:34 AM > To: Jboss Mailing List > Subject: [JBoss-user] What is my JBOSS_DIST? > > > Hi all, > Im using jboss with tomcat. > I'm just need to confirm where my JBOSS_DIST should point to. > it is > /opt/JBoss-2.4.0_Tomcat-3.2.3 > or > /opt/JBoss-2.4.0_Tomcat-3.2.3/jboss > ? > > thanks > John > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] What is my JBOSS_DIST?
it should point to /opt/JBoss-2.4.0_Tomcat-3.2.3/jboss cheers Imran -Original Message- From: John LYC [mailto:[EMAIL PROTECTED]] Sent: Friday, September 28, 2001 9:34 AM To: Jboss Mailing List Subject: [JBoss-user] What is my JBOSS_DIST? Hi all, Im using jboss with tomcat. I'm just need to confirm where my JBOSS_DIST should point to. it is /opt/JBoss-2.4.0_Tomcat-3.2.3 or /opt/JBoss-2.4.0_Tomcat-3.2.3/jboss ? thanks John ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] What is my JBOSS_DIST?
Hi all, Im using jboss with tomcat. I'm just need to confirm where my JBOSS_DIST should point to. it is /opt/JBoss-2.4.0_Tomcat-3.2.3 or /opt/JBoss-2.4.0_Tomcat-3.2.3/jboss ? thanks John ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] castor and transactions
hello, I'm trying to integrate castor into jboss. Everything seems to be running fine. I'm wondering how I can get a data object managed by castor to be included in a trasaction started by the container. (container managed transactions) that is, I have a transacted session bean which asks Castor for an object. I change the object and then I call update on the database object I got from castor, before I exit the session bean method (and therefore commit)I throw an exception from the session bean which should cause a rollback and no changes commited to the database. is there a way to do this? the bahavior that I'm seeing is that the change goes into the db thanks -dom ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Performance...
Lots of stuff (been doing Java for a while ;-), but here are some techniques (in extremly short format) when you have gc problems. 1) Monitoring Find out what does not get collected. Either use a tool like OptimizeIt - but I find them a bit clunky to use or do it "by hand": Identify your "key" objects - the ones which you need to create for every page transition / request and instance count them (+1 in the constructor -1 in finalize) and make the info available at any time (we have a "MemoryStatus" servlet / dump thread). Finalizing does not mean it gets collected, but not being finalized means it won't get collected. You need to be somewhat "strategic" on which objects to keep track of so the monitoring does not slow your app down. 2) Write "Destructors" Once you know what does not get collected, fix it. For frameworks I found it useful to have a _clean() method which gets called from the framework to unhook references (especially to cut circular references) Especially key an eye on hashtables, vectors and any other reference hugging data structures and clear() them when they are no longer needed. 3) Write a GC kicking / monitoring thread Search this list for "GC kicking bean", I posted the code for an MBean for Jboss a few weeks ago. Doing all this works fine for server side stuff. Last time I was involved with client side (swing) Java was two years ago and it was almost impossible to make Swing not leak - the API just did not allow to clean up after you are done (e.g. removing all listeners was often not possible) and the gc was not good enough to collect the complex structures. This might have changed with 1.3 - I don't know. Comments anyone? Hope this helps. Am interested in any futher approaches. Cheers, Robert. > -Original Message- > From: Cor Hofman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 7:21 PM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] Performance... > > > Robert, > > Are you willing to share some gc tricks with us. > What is it you focussed on to make the gc behave. > > Regards, > >Cor. > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Robert Schulz > Sent: Thursday, September 27, 2001 09:55 > To: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Subject: RE: [JBoss-user] Performance... > > > Jo napot kivanok (this is as far as my Hungarian will go) > > We have a very similar setup > > Single CPU P4-1.4G, 1G RAM, fast SCSI disk running > RH 7.1, SUN JDK1.3.1, Apache, Resin, JBoss2.4 and Postgres. > > This setup runs around 50 concurent users mucking around > with the web app easily (we did not push it further as we > only use it in-house at the moment) and we have it running > for weeks with consistent response times. We talking hundreds > of thousands of bean method invocations and millions of SQL > queries. Due to the nature of the app, our session are all pretty > long running (whereas yours sounds like a couple of pages per > session app, right?) > > The only thing with Postgres is to VACUUM it periodically > if you have a lot of updates (we do it every 10 minutes which > takes around 3 secs). > > We have around 30 beans - jboss sits at about 48M (up from > 39 for JBoss2.2) and our servlet engine at about (25) - however > we did a lot of work to make sure our app logic gc-s properly. > > Let us know how you go! > > Robert. > > -Original Message- > > From: Jarecsni János [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 27, 2001 4:35 PM > > To: JBoss-User > > Subject: [JBoss-user] Performance... > > > > > > Hi, > > > > we developed an antiquarian bookstore using Sun's RI (and taking the > > Petstore as the basis for the architecture of our system - > > more or less > > successfully :-) Albeit I kept on telling my boss not to go > > into production > > with Sun RI, we did last week. Ads appeared, and so on. And > > to turn to the > > subject, dozens of users are now coming and the number is going up. > > > > What I experienced was that the server just gave up after an > > hour and a half > > or so. Response times grew, and finally it stalled. So, we > > decided to switch > > to JBoss (latest stable build), and we're now at the final > > stage of this > > transition. (The hardware is a two-way Intel PC, 800Mhz, with > > 512 Megs of > > RAM running Debian GNU/Linux [kernel 2.4]. The server's mere > > duty is to run > > J2EE and a PostgreSQL server plus two standalone Java apps > > that run some > > scheduled tasks [sleeping mostly]). > > > > My question is what we can expect from JBoss? I mean I have > > evil forebodings > > as whether our application has been written correctly (in > > terms that JBoss > > can run it optimally), because it was the very first J2EE app > > written at us, > > and we had really no expert guidance at hand (only the > > Petstore example). I > > have some hopes regard
RE: [JBoss-user] Performance...
No, separate VMs.I look at it breifly but we don't really need it and it looks quite messy to get right in terms of class loading ... R. > -Original Message- > From: Tahir Awan [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 1:49 AM > To: '[EMAIL PROTECTED]' > Subject: RE: [JBoss-user] Performance... > > > were you able to run JBoss 2.4 and Resin in same VM? > If so, can you share the configuration? > > Tahir > > -Original Message- > From: Robert Schulz [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 3:55 AM > To: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Subject: RE: [JBoss-user] Performance... > > > Jo napot kivanok (this is as far as my Hungarian will go) > > We have a very similar setup > > Single CPU P4-1.4G, 1G RAM, fast SCSI disk running > RH 7.1, SUN JDK1.3.1, Apache, Resin, JBoss2.4 and Postgres. > > This setup runs around 50 concurent users mucking around > with the web app easily (we did not push it further as we > only use it in-house at the moment) and we have it running > for weeks with consistent response times. We talking hundreds > of thousands of bean method invocations and millions of SQL > queries. Due to the nature of the app, our session are all pretty > long running (whereas yours sounds like a couple of pages per > session app, right?) > > The only thing with Postgres is to VACUUM it periodically > if you have a lot of updates (we do it every 10 minutes which > takes around 3 secs). > > We have around 30 beans - jboss sits at about 48M (up from > 39 for JBoss2.2) and our servlet engine at about (25) - however > we did a lot of work to make sure our app logic gc-s properly. > > Let us know how you go! > > Robert. > > -Original Message- > > From: Jarecsni János [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 27, 2001 4:35 PM > > To: JBoss-User > > Subject: [JBoss-user] Performance... > > > > > > Hi, > > > > we developed an antiquarian bookstore using Sun's RI (and taking the > > Petstore as the basis for the architecture of our system - > > more or less > > successfully :-) Albeit I kept on telling my boss not to go > > into production > > with Sun RI, we did last week. Ads appeared, and so on. And > > to turn to the > > subject, dozens of users are now coming and the number is going up. > > > > What I experienced was that the server just gave up after an > > hour and a half > > or so. Response times grew, and finally it stalled. So, we > > decided to switch > > to JBoss (latest stable build), and we're now at the final > > stage of this > > transition. (The hardware is a two-way Intel PC, 800Mhz, with > > 512 Megs of > > RAM running Debian GNU/Linux [kernel 2.4]. The server's mere > > duty is to run > > J2EE and a PostgreSQL server plus two standalone Java apps > > that run some > > scheduled tasks [sleeping mostly]). > > > > My question is what we can expect from JBoss? I mean I have > > evil forebodings > > as whether our application has been written correctly (in > > terms that JBoss > > can run it optimally), because it was the very first J2EE app > > written at us, > > and we had really no expert guidance at hand (only the > > Petstore example). I > > have some hopes regarding the in-VM calls available in jBoss > > (no remote > > calls between EJBs that run in the same VM), but what I'd > > really like to > > know is what one needs to be able to serve hundreds of > > concurrent users??? > > So given that there are no severe architectural flaws in our > > application, > > will jBoss be able to serve such a load without dramatic performance > > degradation? Or should we apply some alternatives as server > clustering > > and/or improve hardware (eg. use a separate machine as DB server)? > > > > You know it's very important for me that this project > > succeeds since I get > > criticisms every day saying that it would have all been done > > with PHP in a > > few weeks time and would not crash even with hundreds of > > users... (which I > > hardly believe). It would be so great to be able to prove > > that my idea to go > > the J2EE way was right... > > > > Thanks for your patience reading this and for your valuable answers! > > > > Cheers, > > > > János Jarecsni > > Budapest, Hungary > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Login Module Question
Why is this necessary? This seems like a web container implementation detail and JAAS login modules are about abstracting out authentication mechanisms. If there is some session info that needs to be returned do it from the secured servlet or jsp page. - Original Message - From: Gerry Duhig To: [EMAIL PROTECTED] Sent: Thursday, September 27, 2001 1:46 PM Subject: [JBoss-user] Login Module Question Hi! In a Custom Login Module, is it possible to communicate with the user? I have replaced a servlet by a custom Login module, but I need to write a cookie or force a servlet to be run. Is this possible? Is it a stupid idea? It doesn't seem so! Gerry ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JBoss/Linux thread probs
-server is the server version of hotspot. -hotspot is the default (a client orientated version), and -classic is the old version of the JIT. If you look in your jvm.cfg file you'll see a list of what's installed on your system. Now, as a point of fact, I see the -hotspot (sometimes known as -client) outperforming the -server setting. I wouldn't use -server, it has had issues in the past, and I haven't seen a real benefit as of this time. In reference to what I said before about ulimits, I forgot to add you might need to add the following to your java runtime command: -Drespect.ulimit Sun's JVM has a nasty habit (BUG) of ignoring the environment settings for sockets and file descriptors. GL, // EvilJohn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Herve Tchepannou Sent: Thursday, September 27, 2001 2:57 PM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBoss/Linux thread probs What's the theorical difference between having the -server set or not? Does anyone know how to monitor JBoss? I tryed to run monitor.jar, but that app does nothing :-( Is there any JBoss develloper who can explain me why JBoss use that much threads?? Once again, what will be the best JBoss config for develloping on Linux (in terms of GC, caching and pooling)? -Original Message- From: Bill Burke [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBoss/Linux thread probs We experienced some weird shit with Linux 7.1, jdk 1.3.1 and JBoss 2.2.2. It may be related. We saw huge amounts of memory being allocated for no apparent reason. We reverted to jdk1.3.0 and everything worked fine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ferguson, Doug Sent: Thursday, September 27, 2001 2:50 PM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message- From: Herve Tchepannou [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] EJB 2.0 CMP implementation class must be abstrac t
Dain, basically explained. I had a look at the source. JBoss uses a 'special' class loader to dynamically generate a 'byte code' class presumably 'wrapper' the ejb abstract class before it is instantiated. Very clever! Kar - Original Message - From: "Andreas Joseph Krogh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 24, 2001 5:56 PM Subject: RE: [JBoss-user] EJB 2.0 CMP implementation class must be abstrac t Dain Sundstrom <[EMAIL PROTECTED]> said: > > > According to this article > > > http://developer.java.sun.com/developer/technicalArticles/ebeans/ejbmigrate/ > ?frontpage-jdc > > an EJB 2.0 CMP bean implementation class must be abstract, will it > > work in JBoss? > > Yes. > > > As I understand it JBoss does not generate "wrapper" class instead > > it uses the Proxy class to "wrap" the bean, the call to > > Class.newInstance() will not work on an abstract class. I am just > > wondering how it is done. > > Kar > > You got it half right. We use a proxy class, but the proxy does not as you > put it, "wrap the bean." JBoss uses dynamic proxies > (java.lang.reflect.Proxy). Read the javadocs, but to summarize, a dynamic > proxy is a lot of black magic that code generates the byte code for a class > that implements an arbitrary set of interfaces. For CMP JBoss uses a custom > implementation of dynamic proxies that will generate a proxy that is a > subclass of an abstract class. > > It is pretty simple except for the code that generates the proxy, which I > didn't write. I thought the dynamic proxy thing wouldn't work with CMP-2.0 and that JBoss would seriously suffer from this as SUN wouldn't take it out of the spec. Can you/anyone please elaborate more on this, and how JBoss solved it? -- Andreas Joseph Krogh <[EMAIL PROTECTED]> ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Login Module Question
Hi! In a Custom Login Module, is it possible to communicate with the user? I have replaced a servlet by a custom Login module, but I need to write a cookie or force a servlet to be run. Is this possible? Is it a stupid idea? It doesn't seem so! Gerry
Re: [JBoss-user] JBoss/Linux thread probs
Title: JBoss/Linux thread probs JDK 1.3.x have a bug with -server and memory allocation... You will find this as most voted bug in JDC... Probably is the problem you are having. - Original Message - From: Herve Tchepannou To: [EMAIL PROTECTED] Sent: Thursday, September 27, 2001 4:56 PM Subject: RE: [JBoss-user] JBoss/Linux thread probs What's the theorical difference between having the -server set or not? Does anyone know how to monitor JBoss? I tryed to run monitor.jar, but that app does nothing :-( Is there any JBoss develloper who can explain me why JBoss use that much threads?? Once again, what will be the best JBoss config for develloping on Linux (in terms of GC, caching and pooling)? -Original Message-From: Bill Burke [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 3:10 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] JBoss/Linux thread probs We experienced some weird shit with Linux 7.1, jdk 1.3.1 and JBoss 2.2.2. It may be related. We saw huge amounts of memory being allocated for no apparent reason. We reverted to jdk1.3.0 and everything worked fine. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ferguson, DougSent: Thursday, September 27, 2001 2:50 PMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message-From: Herve Tchepannou [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 12:21 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.
RE: [JBoss-user] JBoss/Linux thread probs
Title: JBoss/Linux thread probs The -server affects the runtime compilation of the 20% of java code that is interpreted. It is supposed to optimize it for running over and over. For instance a loop that gets executed 15000 times will get compiled on the fly. I would not use it though. I found that my servers VM would occasionally just die with no message except that a java error had occurred that needed to be logged with Sun. Remove the -server and presto, the error went away. Note: this was on Win2K, Weblogic5.1, and JDK 1.3.0. Mica Cooper -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Herve TchepannouSent: Thursday, September 27, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] JBoss/Linux thread probs What's the theorical difference between having the -server set or not? Does anyone know how to monitor JBoss? I tryed to run monitor.jar, but that app does nothing :-( Is there any JBoss develloper who can explain me why JBoss use that much threads?? Once again, what will be the best JBoss config for develloping on Linux (in terms of GC, caching and pooling)? -Original Message-From: Bill Burke [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 3:10 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] JBoss/Linux thread probs We experienced some weird shit with Linux 7.1, jdk 1.3.1 and JBoss 2.2.2. It may be related. We saw huge amounts of memory being allocated for no apparent reason. We reverted to jdk1.3.0 and everything worked fine. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ferguson, DougSent: Thursday, September 27, 2001 2:50 PMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message-From: Herve Tchepannou [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 12:21 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.
RE: [JBoss-user] JBoss/Linux thread probs
Title: JBoss/Linux thread probs What's the theorical difference between having the -server set or not? Does anyone know how to monitor JBoss? I tryed to run monitor.jar, but that app does nothing :-( Is there any JBoss develloper who can explain me why JBoss use that much threads?? Once again, what will be the best JBoss config for develloping on Linux (in terms of GC, caching and pooling)? -Original Message-From: Bill Burke [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 3:10 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] JBoss/Linux thread probs We experienced some weird shit with Linux 7.1, jdk 1.3.1 and JBoss 2.2.2. It may be related. We saw huge amounts of memory being allocated for no apparent reason. We reverted to jdk1.3.0 and everything worked fine. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ferguson, DougSent: Thursday, September 27, 2001 2:50 PMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message-From: Herve Tchepannou [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 12:21 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.
RE: [JBoss-user] JBoss/Linux thread probs
Removing Server is just going to change the way HotSpot works. I don't think this is going to affect your problem directly. Check your ulimit's. Sometimes running out of open file descriptors will mask it self as a process limit problem. Note, this is a java issue, not a JBoss problem. Also, I've had much better luck with 2.4 kernels in handling large numbers of java threads. Volano, WebLogic and JBoss all benchmark better under 2.4, mostly due to the threading improvements. Good Luck, John M. Carney - [EMAIL PROTECTED] Sr. Software Engineer TowerJ Corporation - http://www.towerj.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bill Burke Sent: Thursday, September 27, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBoss/Linux thread probs We experienced some weird shit with Linux 7.1, jdk 1.3.1 and JBoss 2.2.2. It may be related. We saw huge amounts of memory being allocated for no apparent reason. We reverted to jdk1.3.0 and everything worked fine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ferguson, Doug Sent: Thursday, September 27, 2001 2:50 PM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message- From: Herve Tchepannou [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] HELP! java.lang.Error: id may not be null
The reason we can not use a primary key that is automatically assigned in the database has to do with the limitations of the JDBC drivers. Until JDBC 3.0 there was no way to know the final value of the auto generated columns in a INSERT statement, so there would be no way to know the key for the new entity. I know that there are some proprietary extension that allow for this, but it is not realistic to support all of the vendors. So, expect that when JDBC 3.0 drivers are commonplace JBoss will support DB generated PKs. Until then you will still have to use decoupled key generator. -dain > -Original Message- > From: danch [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 1:18 PM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] HELP! java.lang.Error: id may not be null > > > Or decouple the key generation from the row insert so that > you can get > the key from the database withing ejbCreate, then assign that > value to > your primary key field > > Adam Esterline wrote: > > > You cannot use a DB generated key with CMP. You must use > BMP or some other > > mechanism, if you want to use a DB generated key. > > > > Adam > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 27, 2001 12:21 PM > > To: [EMAIL PROTECTED] > > Subject: [JBoss-user] HELP! java.lang.Error: id may not be null > > > > > > > > We have a CMP entity bean which has an ejbCreate(Integer, > String, String) > > method which returns null since the database should > generate the key for us > > (from an Oracle 8i sequence). > > The ejbCreate is declared to return an Integer (the type of > the primary key > > field). > > > > Any pointers on where to start looking? > > > > The error we get is: > > > > [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be > null; nested > > exception > > is: > > java.lang.Error: id may not be null > > [IniConfig] java.lang.Error: id may not be null > > [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) > > [IniConfig] at > > org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti > > tyInstanceCache.java:48) > > [IniConfig] at > > org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP > > ersistenceManager.java:237) > > [IniConfig] at > > org.jboss.ejb.EntityContainer.createHome(EntityContainer.java > > :616) > > [IniConfig] at java.lang.reflect.Method.invoke(Native Method) > > [IniConfig] at > > org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome > > (EntityContainer.java:843) > > [IniConfig] at > > org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke > > Home(EntitySynchronizationInterceptor.java:231) > > [IniConfig] at > > org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En > > tityInstanceInterceptor.java:154) > > [IniConfig] at > > org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity > > LockInterceptor.java:108) > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JBoss/Linux thread probs
Title: JBoss/Linux thread probs We experienced some weird shit with Linux 7.1, jdk 1.3.1 and JBoss 2.2.2. It may be related. We saw huge amounts of memory being allocated for no apparent reason. We reverted to jdk1.3.0 and everything worked fine. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ferguson, DougSent: Thursday, September 27, 2001 2:50 PMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message-From: Herve Tchepannou [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 12:21 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.
RE: [JBoss-user] JBoss/Linux thread probs
Title: JBoss/Linux thread probs One thing I noticed is that the -server options sucks.. trying removing that.. d. -Original Message-From: Herve Tchepannou [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 12:21 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.
Re: [JBoss-user] EJB Naming in 2.4.1
Add an ejb-link to the web.xml descriptor: ejb/SessionTest Session SessionTestHome SessionTest SessionTest Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Juergen Fiedler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 11:29 AM Subject: [JBoss-user] EJB Naming in 2.4.1 > Hello, > > I just started using JBoss 2.4.1 and an application that worked > without a problem under 2.2.2 stopped working now. > I have a simple Session Bean and a Servlet that uses it. > > My ejb-jar.xml looks like this: > --- > > > > Test Application > EJB Test > > > SessionTest > SessionTestHome > SessionTest > SessionTestBean > Stateless > Bean > > > > --- > > My web.xml looks like this: > --- > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > > > > > ejb/SessionTest > Session > SessionTestHome > SessionTest > > > > --- > > Now, if I try to deploy the application, JBoss complains thus: > --- > [...] > [Container factory] Begin java:comp/env for EJB: SessionTest > [Container factory] TCL: java.net.URLClassLoader@6d835f > [Container factory] End java:comp/env for EJB: SessionTest > [...] > [WebContainer] linkEjbRefs > [WebContainer] Linking ejb-ref: ejb/SessionTest to JNDI name: null > [Default] javax.naming.NamingException: ejb-ref: ejb/SessionTest, > expected jndi-name in jboss-web.xml > [Default] at > org.jboss.web.AbstractWebContainer.linkEjbRefs(AbstractWebContainer.java:367 ) > --- > > What is the meaning of this? I didn't need a jboss-web.xml with 2.2.2. > Is there any way to work around this without using JBoss specific XML > files? > > Thanks, > Juergen > ~ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] EJB Naming in 2.4.1
Hello, I just started using JBoss 2.4.1 and an application that worked without a problem under 2.2.2 stopped working now. I have a simple Session Bean and a Servlet that uses it. My ejb-jar.xml looks like this: --- Test Application EJB Test SessionTest SessionTestHome SessionTest SessionTestBean Stateless Bean --- My web.xml looks like this: --- http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> ejb/SessionTest Session SessionTestHome SessionTest --- Now, if I try to deploy the application, JBoss complains thus: --- [...] [Container factory] Begin java:comp/env for EJB: SessionTest [Container factory] TCL: java.net.URLClassLoader@6d835f [Container factory] End java:comp/env for EJB: SessionTest [...] [WebContainer] linkEjbRefs [WebContainer] Linking ejb-ref: ejb/SessionTest to JNDI name: null [Default] javax.naming.NamingException: ejb-ref: ejb/SessionTest, expected jndi-name in jboss-web.xml [Default] at org.jboss.web.AbstractWebContainer.linkEjbRefs(AbstractWebContainer.java:367) --- What is the meaning of this? I didn't need a jboss-web.xml with 2.2.2. Is there any way to work around this without using JBoss specific XML files? Thanks, Juergen ~ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] HELP! java.lang.Error: id may not be null
Or decouple the key generation from the row insert so that you can get the key from the database withing ejbCreate, then assign that value to your primary key field Adam Esterline wrote: > You cannot use a DB generated key with CMP. You must use BMP or some other > mechanism, if you want to use a DB generated key. > > Adam > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 12:21 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-user] HELP! java.lang.Error: id may not be null > > > > We have a CMP entity bean which has an ejbCreate(Integer, String, String) > method which returns null since the database should generate the key for us > (from an Oracle 8i sequence). > The ejbCreate is declared to return an Integer (the type of the primary key > field). > > Any pointers on where to start looking? > > The error we get is: > > [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be null; nested > exception > is: > java.lang.Error: id may not be null > [IniConfig] java.lang.Error: id may not be null > [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) > [IniConfig] at > org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti > tyInstanceCache.java:48) > [IniConfig] at > org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP > ersistenceManager.java:237) > [IniConfig] at > org.jboss.ejb.EntityContainer.createHome(EntityContainer.java > :616) > [IniConfig] at java.lang.reflect.Method.invoke(Native Method) > [IniConfig] at > org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome > (EntityContainer.java:843) > [IniConfig] at > org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke > Home(EntitySynchronizationInterceptor.java:231) > [IniConfig] at > org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En > tityInstanceInterceptor.java:154) > [IniConfig] at > org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity > LockInterceptor.java:108) > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] HELP! java.lang.Error: id may not be null
I am assuming that you are leaving your pk field null in the ejbCreate, because you are using Oracle's sequence field. JBoss does not like it when your pk field is null. If you notice, in the example you are using, they do assign the id field a value in the ejbCreate. The bottom line: You cannot use auto generated fields in CMP, unless you do some magic (use a mbean, a session bean, a helper). JBoss, or any app server that I am aware of, does not understand how to get an auto generated field from a DB with CMP. Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 1:02 PM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] HELP! java.lang.Error: id may not be null I have been following the example at: http://www.jboss.org/documentation/HTML/ch05s08.html Is the example wrong? or am I not understanding it? btw.. i am using Jboss2.4.1 bundled with tomcat 3.2.3. Adam Esterline <[EMAIL PROTECTED]> To: "'[EMAIL PROTECTED]'" Sent by: <[EMAIL PROTECTED]> [EMAIL PROTECTED] cc: eforge.net Subject: RE: [JBoss-user] HELP! java.lang.Error: id may not be null 09/27/2001 01:28 PM Please respond to jboss-user You cannot use a DB generated key with CMP. You must use BMP or some other mechanism, if you want to use a DB generated key. Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] HELP! java.lang.Error: id may not be null We have a CMP entity bean which has an ejbCreate(Integer, String, String) method which returns null since the database should generate the key for us (from an Oracle 8i sequence). The ejbCreate is declared to return an Integer (the type of the primary key field). Any pointers on where to start looking? The error we get is: [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be null; nested exception is: java.lang.Error: id may not be null [IniConfig] java.lang.Error: id may not be null [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti tyInstanceCache.java:48) [IniConfig] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP ersistenceManager.java:237) [IniConfig] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java :616) [IniConfig] at java.lang.reflect.Method.invoke(Native Method) [IniConfig] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome (EntityContainer.java:843) [IniConfig] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke Home(EntitySynchronizationInterceptor.java:231) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En tityInstanceInterceptor.java:154) [IniConfig] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity LockInterceptor.java:108) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] HELP! java.lang.Error: id may not be null
Even if you don't have the pk as a parameter to ejbCreate, you still need to set it in your code. Popular ways include having a session bean or an mbean to get the next sequence value, and having your ejbCreate get the value from one of these. At least if you use an mbean, you can set your sequence to step 10, 20 or whatever and hand out the in-between numbers from your mbean, reducing db access. If anyone else is inserting into this table you probably want an insert trigger that supplies the sequence value only if the pk is null. There have been long discussions (wars?) about how to do this in the user list -- none too recently. david jencks On 2001.09.27 13:20:39 -0400 [EMAIL PROTECTED] wrote: > > We have a CMP entity bean which has an ejbCreate(Integer, String, String) > method which returns null since the database should generate the key for > us > (from an Oracle 8i sequence). > The ejbCreate is declared to return an Integer (the type of the primary > key > field). > > Any pointers on where to start looking? > > The error we get is: > > [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be null; nested > exception > is: > java.lang.Error: id may not be null > [IniConfig] java.lang.Error: id may not be null > [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) > [IniConfig] at > org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti > tyInstanceCache.java:48) > [IniConfig] at > org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP > ersistenceManager.java:237) > [IniConfig] at > org.jboss.ejb.EntityContainer.createHome(EntityContainer.java > :616) > [IniConfig] at java.lang.reflect.Method.invoke(Native Method) > [IniConfig] at > org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome > (EntityContainer.java:843) > [IniConfig] at > org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke > Home(EntitySynchronizationInterceptor.java:231) > [IniConfig] at > org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En > tityInstanceInterceptor.java:154) > [IniConfig] at > org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity > LockInterceptor.java:108) > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] HELP! java.lang.Error: id may not be null
I have been following the example at: http://www.jboss.org/documentation/HTML/ch05s08.html Is the example wrong? or am I not understanding it? btw.. i am using Jboss2.4.1 bundled with tomcat 3.2.3. Adam Esterline <[EMAIL PROTECTED]> To: "'[EMAIL PROTECTED]'" Sent by: <[EMAIL PROTECTED]> [EMAIL PROTECTED] cc: eforge.net Subject: RE: [JBoss-user] HELP! java.lang.Error: id may not be null 09/27/2001 01:28 PM Please respond to jboss-user You cannot use a DB generated key with CMP. You must use BMP or some other mechanism, if you want to use a DB generated key. Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] HELP! java.lang.Error: id may not be null We have a CMP entity bean which has an ejbCreate(Integer, String, String) method which returns null since the database should generate the key for us (from an Oracle 8i sequence). The ejbCreate is declared to return an Integer (the type of the primary key field). Any pointers on where to start looking? The error we get is: [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be null; nested exception is: java.lang.Error: id may not be null [IniConfig] java.lang.Error: id may not be null [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti tyInstanceCache.java:48) [IniConfig] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP ersistenceManager.java:237) [IniConfig] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java :616) [IniConfig] at java.lang.reflect.Method.invoke(Native Method) [IniConfig] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome (EntityContainer.java:843) [IniConfig] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke Home(EntitySynchronizationInterceptor.java:231) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En tityInstanceInterceptor.java:154) [IniConfig] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity LockInterceptor.java:108) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] HELP! java.lang.Error: id may not be null
You cannot use a DB generated key with CMP. You must use BMP or some other mechanism, if you want to use a DB generated key. Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] HELP! java.lang.Error: id may not be null We have a CMP entity bean which has an ejbCreate(Integer, String, String) method which returns null since the database should generate the key for us (from an Oracle 8i sequence). The ejbCreate is declared to return an Integer (the type of the primary key field). Any pointers on where to start looking? The error we get is: [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be null; nested exception is: java.lang.Error: id may not be null [IniConfig] java.lang.Error: id may not be null [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti tyInstanceCache.java:48) [IniConfig] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP ersistenceManager.java:237) [IniConfig] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java :616) [IniConfig] at java.lang.reflect.Method.invoke(Native Method) [IniConfig] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome (EntityContainer.java:843) [IniConfig] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke Home(EntitySynchronizationInterceptor.java:231) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En tityInstanceInterceptor.java:154) [IniConfig] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity LockInterceptor.java:108) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] HELP! java.lang.Error: id may not be null
We have a CMP entity bean which has an ejbCreate(Integer, String, String) method which returns null since the database should generate the key for us (from an Oracle 8i sequence). The ejbCreate is declared to return an Integer (the type of the primary key field). Any pointers on where to start looking? The error we get is: [IniConfig] TRANSACTION ROLLBACK EXCEPTION:id may not be null; nested exception is: java.lang.Error: id may not be null [IniConfig] java.lang.Error: id may not be null [IniConfig] at org.jboss.ejb.CacheKey.(CacheKey.java:67) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(Enti tyInstanceCache.java:48) [IniConfig] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPP ersistenceManager.java:237) [IniConfig] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java :616) [IniConfig] at java.lang.reflect.Method.invoke(Native Method) [IniConfig] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome (EntityContainer.java:843) [IniConfig] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke Home(EntitySynchronizationInterceptor.java:231) [IniConfig] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En tityInstanceInterceptor.java:154) [IniConfig] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity LockInterceptor.java:108) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JBoss/Linux thread probs
Title: JBoss/Linux thread probs Im develloping my app on Linux RH 6.2/JBoss 2.4 and HypersonicSQL. My app has: - 4 session beans - 6 entity beans using CMP - 4 MDB - 120 test cases. When I start JBoss, they are 48 threads that are spawned. When I run all my test cases the 1st time , 230 threads are spawned the 2nd time 340 threads the 3rd time 500 threads until my JBoss crashed because too many processed are spawned. I understand that Linux thread managemenent is not the best, but how can I configure my JBoss in order to reduce that threading behaviour (gc config? caching size? pool size?). Does anyone has a clue? By the way, when I run my test-cases on Win2K, I have no prob.. Herve Tchepannou Software Engineer Objexis Coorporation Phone: (514) 932 3295 Ext. 231 mailto:[EMAIL PROTECTED] Objexis Coorporation http://www.objexis.com 1635 Sherbrooke West, Suite #405 Montreal, Qc H3H 1E2 Tel: 514.932.3295 Fax: 514.932.4639 http://www.objexis.com Important - This message may contain privileged and confidential information. It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.
RE: [JBoss-user] Performance...
were you able to run JBoss 2.4 and Resin in same VM? If so, can you share the configuration? Tahir -Original Message- From: Robert Schulz [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 3:55 AM To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] Performance... Jo napot kivanok (this is as far as my Hungarian will go) We have a very similar setup Single CPU P4-1.4G, 1G RAM, fast SCSI disk running RH 7.1, SUN JDK1.3.1, Apache, Resin, JBoss2.4 and Postgres. This setup runs around 50 concurent users mucking around with the web app easily (we did not push it further as we only use it in-house at the moment) and we have it running for weeks with consistent response times. We talking hundreds of thousands of bean method invocations and millions of SQL queries. Due to the nature of the app, our session are all pretty long running (whereas yours sounds like a couple of pages per session app, right?) The only thing with Postgres is to VACUUM it periodically if you have a lot of updates (we do it every 10 minutes which takes around 3 secs). We have around 30 beans - jboss sits at about 48M (up from 39 for JBoss2.2) and our servlet engine at about (25) - however we did a lot of work to make sure our app logic gc-s properly. Let us know how you go! Robert. > -Original Message- > From: Jarecsni János [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 4:35 PM > To: JBoss-User > Subject: [JBoss-user] Performance... > > > Hi, > > we developed an antiquarian bookstore using Sun's RI (and taking the > Petstore as the basis for the architecture of our system - > more or less > successfully :-) Albeit I kept on telling my boss not to go > into production > with Sun RI, we did last week. Ads appeared, and so on. And > to turn to the > subject, dozens of users are now coming and the number is going up. > > What I experienced was that the server just gave up after an > hour and a half > or so. Response times grew, and finally it stalled. So, we > decided to switch > to JBoss (latest stable build), and we're now at the final > stage of this > transition. (The hardware is a two-way Intel PC, 800Mhz, with > 512 Megs of > RAM running Debian GNU/Linux [kernel 2.4]. The server's mere > duty is to run > J2EE and a PostgreSQL server plus two standalone Java apps > that run some > scheduled tasks [sleeping mostly]). > > My question is what we can expect from JBoss? I mean I have > evil forebodings > as whether our application has been written correctly (in > terms that JBoss > can run it optimally), because it was the very first J2EE app > written at us, > and we had really no expert guidance at hand (only the > Petstore example). I > have some hopes regarding the in-VM calls available in jBoss > (no remote > calls between EJBs that run in the same VM), but what I'd > really like to > know is what one needs to be able to serve hundreds of > concurrent users??? > So given that there are no severe architectural flaws in our > application, > will jBoss be able to serve such a load without dramatic performance > degradation? Or should we apply some alternatives as server clustering > and/or improve hardware (eg. use a separate machine as DB server)? > > You know it's very important for me that this project > succeeds since I get > criticisms every day saying that it would have all been done > with PHP in a > few weeks time and would not crash even with hundreds of > users... (which I > hardly believe). It would be so great to be able to prove > that my idea to go > the J2EE way was right... > > Thanks for your patience reading this and for your valuable answers! > > Cheers, > > János Jarecsni > Budapest, Hungary > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Security question on Webapps
OK. Thanks for the few clues, I now have my own LoginModule operating. Can I get output back to the user in any way? ie can I produce HTML or get a servlet to execute from the LoginModule, so that a cookie can be written? (Then let the user get to the page he requested) Gerry - Original Message - From: "Gerry Duhig" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 12:27 PM Subject: Re: [JBoss-user] Security question on Webapps > It does a separate "login" operation in a different database and writes a > cookie so that some data from that database is available to subsequent > operations. > > I am guessing that what I have to do is subclass DatabaseServerLoginModule > and run my code from that subclass. Which I have started to experiment with, > but JBoss keeps saying it cannot find my class. I put it in a jar file in > lib/ext, but it still can't find it. > > What is the trick here? > > Gerry > > - Original Message - > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 27, 2001 11:52 AM > Subject: Re: [JBoss-user] Security question on Webapps > > > > So what does the "login servlet" do? Sounds more like a front controller > > style pattern... is it responsible for directing the request to the > > appropriate place? > > > > cheesr > > dim > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > Dim, > > > > > > I am using realms and form based login. > > > > > > The user doesn't request the login PAGE directly, it requests the login > > > servlet which is a protected resource. That bit works. > > > > > > The problem is that there are other protected resources and if the user > > > requests one of those, after authentication, the user gets them, but I > need > > > the login servlet to be run whenever they are accessed. > > > > > > Gerry > > > > > > - Original Message - > > > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, September 27, 2001 8:59 AM > > > Subject: Re: [JBoss-user] Security question on Webapps > > > > > > > > > > If you're using security realms and form based login (not sure if you > > > > are) then you shouldn't ever directly request the login page, simply > > > > request the protected resource and let the contain send the login page > as > > > > required and then continue the user onto the requested > > > > (protected) resource. > > > > > > > > cheesr > > > > dim > > > > > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > > > > > Hi! > > > > > > > > > > I have configured a webapp to be deployed by the embedded Tomcat and > > > > > use the JBoss security system to protect it. It works but there is a > > > > > flaw I overlooked. > > > > > > > > > > The webapp is a login servlet and a number of html and jsp pages. > > > > > > > > > > I designed it so that JBoss protects all the pages and the login > > > > > servlet and uses FORM authentication. > > > > > > > > > > If the user accesses the app in the "proper" way, the url directs > him > > > > > to the logiin servlet which is protected. JBoss puts up the FORM, > > > > > authenticates the user and directs him to the servlet. He is logged > in > > > > > to our database, a cookie is written and he is redirected to the > html > > > > > pages. All is well. > > > > > > > > > > If he later (new session) uses his browser history to access an html > > > > > page directly, JBoss intercepts, puts up the FORM and authenticates > > > > > him, and he then gains access to the html page but has not run the > > > > > login servlet and has no cookie which is required later in the > > > > > process. > > > > > > > > > > How can I force the login servlet to be run whatever route the user > > > > > comes in by? > > > > > > > > > > Gerry > > > > > > > > > > > > > > > > > > > > > > ___ > > > > JBoss-user mailing list > > > > [EMAIL PROTECTED] > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > > > ___ > > > JBoss-user mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JSP compilation error (JBoss+Tomcat)
I had a problem just like this recently. I ended up hacking around it by putting a second copy of common.jar in WEB-INF/lib. As far as the ejb1.jar - create a client version of the jar (home and remote i/f classes only) and put that in WEB-INF/lib. Sorry this isn't more helpful! - Original Message - From: "Adison" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 2:59 AM Subject: [JBoss-user] JSP compilation error (JBoss+Tomcat) > Hi all, > > I am deploying an EAR that contains EJB and WAR. > The EJB and WAR both uses some common classes (stored in a JAR file, say > common.jar) > > So here's the structure of the EAR file: > > example.ear > META-INF/ > application.xml > web.war > META-INF/ > MANIFEST.MF (Class-Path: lib/common.jar ejb1.jar) > (some jsp files) > ejb1.jar > META-INF/ > MANIFEST.MF (Class-Path: lib/common.jar) > lib/ > common.jar > > > The EAR deploys just fine. However, when I tried to run the JSP (Apache > Jasper), it complains about not finding the classes in both common.jar > and ejb1.jar. > > BTW, the application.xml specifies both the web.war and ejb1.jar modules > (but no common.jar). > > Have I packaged it right? > > Thanks for any help. > > Adison > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Security question on Webapps
Answering my own question: I put the jar file on the classpath in run.sh and it works so it seems you need it directly on that classpath when starting JBoss not just in the lib/ext. Is that right? Gerry - Original Message - From: "Gerry Duhig" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 12:27 PM Subject: Re: [JBoss-user] Security question on Webapps > It does a separate "login" operation in a different database and writes a > cookie so that some data from that database is available to subsequent > operations. > > I am guessing that what I have to do is subclass DatabaseServerLoginModule > and run my code from that subclass. Which I have started to experiment with, > but JBoss keeps saying it cannot find my class. I put it in a jar file in > lib/ext, but it still can't find it. > > What is the trick here? > > Gerry > > - Original Message - > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 27, 2001 11:52 AM > Subject: Re: [JBoss-user] Security question on Webapps > > > > So what does the "login servlet" do? Sounds more like a front controller > > style pattern... is it responsible for directing the request to the > > appropriate place? > > > > cheesr > > dim > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > Dim, > > > > > > I am using realms and form based login. > > > > > > The user doesn't request the login PAGE directly, it requests the login > > > servlet which is a protected resource. That bit works. > > > > > > The problem is that there are other protected resources and if the user > > > requests one of those, after authentication, the user gets them, but I > need > > > the login servlet to be run whenever they are accessed. > > > > > > Gerry > > > > > > - Original Message - > > > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, September 27, 2001 8:59 AM > > > Subject: Re: [JBoss-user] Security question on Webapps > > > > > > > > > > If you're using security realms and form based login (not sure if you > > > > are) then you shouldn't ever directly request the login page, simply > > > > request the protected resource and let the contain send the login page > as > > > > required and then continue the user onto the requested > > > > (protected) resource. > > > > > > > > cheesr > > > > dim > > > > > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > > > > > Hi! > > > > > > > > > > I have configured a webapp to be deployed by the embedded Tomcat and > > > > > use the JBoss security system to protect it. It works but there is a > > > > > flaw I overlooked. > > > > > > > > > > The webapp is a login servlet and a number of html and jsp pages. > > > > > > > > > > I designed it so that JBoss protects all the pages and the login > > > > > servlet and uses FORM authentication. > > > > > > > > > > If the user accesses the app in the "proper" way, the url directs > him > > > > > to the logiin servlet which is protected. JBoss puts up the FORM, > > > > > authenticates the user and directs him to the servlet. He is logged > in > > > > > to our database, a cookie is written and he is redirected to the > html > > > > > pages. All is well. > > > > > > > > > > If he later (new session) uses his browser history to access an html > > > > > page directly, JBoss intercepts, puts up the FORM and authenticates > > > > > him, and he then gains access to the html page but has not run the > > > > > login servlet and has no cookie which is required later in the > > > > > process. > > > > > > > > > > How can I force the login servlet to be run whatever route the user > > > > > comes in by? > > > > > > > > > > Gerry > > > > > > > > > > > > > > > > > > > > > > ___ > > > > JBoss-user mailing list > > > > [EMAIL PROTECTED] > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > > > ___ > > > JBoss-user mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
AW: [JBoss-user] Security question on Webapps
U have to use the ProxyLoginModule. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Im Auftrag von Gerry Duhig Gesendet: Donnerstag, 27. September 2001 13:28 An: [EMAIL PROTECTED] Betreff: Re: [JBoss-user] Security question on Webapps It does a separate "login" operation in a different database and writes a cookie so that some data from that database is available to subsequent operations. I am guessing that what I have to do is subclass DatabaseServerLoginModule and run my code from that subclass. Which I have started to experiment with, but JBoss keeps saying it cannot find my class. I put it in a jar file in lib/ext, but it still can't find it. What is the trick here? Gerry - Original Message - From: "Dmitri Colebatch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 11:52 AM Subject: Re: [JBoss-user] Security question on Webapps > So what does the "login servlet" do? Sounds more like a front controller > style pattern... is it responsible for directing the request to the > appropriate place? > > cheesr > dim > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > Dim, > > > > I am using realms and form based login. > > > > The user doesn't request the login PAGE directly, it requests the login > > servlet which is a protected resource. That bit works. > > > > The problem is that there are other protected resources and if the user > > requests one of those, after authentication, the user gets them, but I need > > the login servlet to be run whenever they are accessed. > > > > Gerry > > > > - Original Message - > > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, September 27, 2001 8:59 AM > > Subject: Re: [JBoss-user] Security question on Webapps > > > > > > > If you're using security realms and form based login (not sure if you > > > are) then you shouldn't ever directly request the login page, simply > > > request the protected resource and let the contain send the login page as > > > required and then continue the user onto the requested > > > (protected) resource. > > > > > > cheesr > > > dim > > > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > > > Hi! > > > > > > > > I have configured a webapp to be deployed by the embedded Tomcat and > > > > use the JBoss security system to protect it. It works but there is a > > > > flaw I overlooked. > > > > > > > > The webapp is a login servlet and a number of html and jsp pages. > > > > > > > > I designed it so that JBoss protects all the pages and the login > > > > servlet and uses FORM authentication. > > > > > > > > If the user accesses the app in the "proper" way, the url directs him > > > > to the logiin servlet which is protected. JBoss puts up the FORM, > > > > authenticates the user and directs him to the servlet. He is logged in > > > > to our database, a cookie is written and he is redirected to the html > > > > pages. All is well. > > > > > > > > If he later (new session) uses his browser history to access an html > > > > page directly, JBoss intercepts, puts up the FORM and authenticates > > > > him, and he then gains access to the html page but has not run the > > > > login servlet and has no cookie which is required later in the > > > > process. > > > > > > > > How can I force the login servlet to be run whatever route the user > > > > comes in by? > > > > > > > > Gerry > > > > > > > > > > > > > > > > > ___ > > > JBoss-user mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Security question on Webapps
It does a separate "login" operation in a different database and writes a cookie so that some data from that database is available to subsequent operations. I am guessing that what I have to do is subclass DatabaseServerLoginModule and run my code from that subclass. Which I have started to experiment with, but JBoss keeps saying it cannot find my class. I put it in a jar file in lib/ext, but it still can't find it. What is the trick here? Gerry - Original Message - From: "Dmitri Colebatch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 11:52 AM Subject: Re: [JBoss-user] Security question on Webapps > So what does the "login servlet" do? Sounds more like a front controller > style pattern... is it responsible for directing the request to the > appropriate place? > > cheesr > dim > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > Dim, > > > > I am using realms and form based login. > > > > The user doesn't request the login PAGE directly, it requests the login > > servlet which is a protected resource. That bit works. > > > > The problem is that there are other protected resources and if the user > > requests one of those, after authentication, the user gets them, but I need > > the login servlet to be run whenever they are accessed. > > > > Gerry > > > > - Original Message - > > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, September 27, 2001 8:59 AM > > Subject: Re: [JBoss-user] Security question on Webapps > > > > > > > If you're using security realms and form based login (not sure if you > > > are) then you shouldn't ever directly request the login page, simply > > > request the protected resource and let the contain send the login page as > > > required and then continue the user onto the requested > > > (protected) resource. > > > > > > cheesr > > > dim > > > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > > > Hi! > > > > > > > > I have configured a webapp to be deployed by the embedded Tomcat and > > > > use the JBoss security system to protect it. It works but there is a > > > > flaw I overlooked. > > > > > > > > The webapp is a login servlet and a number of html and jsp pages. > > > > > > > > I designed it so that JBoss protects all the pages and the login > > > > servlet and uses FORM authentication. > > > > > > > > If the user accesses the app in the "proper" way, the url directs him > > > > to the logiin servlet which is protected. JBoss puts up the FORM, > > > > authenticates the user and directs him to the servlet. He is logged in > > > > to our database, a cookie is written and he is redirected to the html > > > > pages. All is well. > > > > > > > > If he later (new session) uses his browser history to access an html > > > > page directly, JBoss intercepts, puts up the FORM and authenticates > > > > him, and he then gains access to the html page but has not run the > > > > login servlet and has no cookie which is required later in the > > > > process. > > > > > > > > How can I force the login servlet to be run whatever route the user > > > > comes in by? > > > > > > > > Gerry > > > > > > > > > > > > > > > > > ___ > > > JBoss-user mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Security question on Webapps
So what does the "login servlet" do? Sounds more like a front controller style pattern... is it responsible for directing the request to the appropriate place? cheesr dim On Thu, 27 Sep 2001, Gerry Duhig wrote: > Dim, > > I am using realms and form based login. > > The user doesn't request the login PAGE directly, it requests the login > servlet which is a protected resource. That bit works. > > The problem is that there are other protected resources and if the user > requests one of those, after authentication, the user gets them, but I need > the login servlet to be run whenever they are accessed. > > Gerry > > - Original Message - > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 27, 2001 8:59 AM > Subject: Re: [JBoss-user] Security question on Webapps > > > > If you're using security realms and form based login (not sure if you > > are) then you shouldn't ever directly request the login page, simply > > request the protected resource and let the contain send the login page as > > required and then continue the user onto the requested > > (protected) resource. > > > > cheesr > > dim > > > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > > > Hi! > > > > > > I have configured a webapp to be deployed by the embedded Tomcat and > > > use the JBoss security system to protect it. It works but there is a > > > flaw I overlooked. > > > > > > The webapp is a login servlet and a number of html and jsp pages. > > > > > > I designed it so that JBoss protects all the pages and the login > > > servlet and uses FORM authentication. > > > > > > If the user accesses the app in the "proper" way, the url directs him > > > to the logiin servlet which is protected. JBoss puts up the FORM, > > > authenticates the user and directs him to the servlet. He is logged in > > > to our database, a cookie is written and he is redirected to the html > > > pages. All is well. > > > > > > If he later (new session) uses his browser history to access an html > > > page directly, JBoss intercepts, puts up the FORM and authenticates > > > him, and he then gains access to the html page but has not run the > > > login servlet and has no cookie which is required later in the > > > process. > > > > > > How can I force the login servlet to be run whatever route the user > > > comes in by? > > > > > > Gerry > > > > > > > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JBOSS 2.4.1 and JacOrb 1.3.3
Hi again, more and more I'm investigating it appears to me that surprisingly the jacorb properties file is not read in this specific case, something change regarding the security management on JBoss 2.4 regarding properties file ??? jc ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Performance...
Robert, Are you willing to share some gc tricks with us. What is it you focussed on to make the gc behave. Regards, Cor. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Robert Schulz Sent: Thursday, September 27, 2001 09:55 To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] Performance... Jo napot kivanok (this is as far as my Hungarian will go) We have a very similar setup Single CPU P4-1.4G, 1G RAM, fast SCSI disk running RH 7.1, SUN JDK1.3.1, Apache, Resin, JBoss2.4 and Postgres. This setup runs around 50 concurent users mucking around with the web app easily (we did not push it further as we only use it in-house at the moment) and we have it running for weeks with consistent response times. We talking hundreds of thousands of bean method invocations and millions of SQL queries. Due to the nature of the app, our session are all pretty long running (whereas yours sounds like a couple of pages per session app, right?) The only thing with Postgres is to VACUUM it periodically if you have a lot of updates (we do it every 10 minutes which takes around 3 secs). We have around 30 beans - jboss sits at about 48M (up from 39 for JBoss2.2) and our servlet engine at about (25) - however we did a lot of work to make sure our app logic gc-s properly. Let us know how you go! Robert. > -Original Message- > From: Jarecsni János [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 4:35 PM > To: JBoss-User > Subject: [JBoss-user] Performance... > > > Hi, > > we developed an antiquarian bookstore using Sun's RI (and taking the > Petstore as the basis for the architecture of our system - > more or less > successfully :-) Albeit I kept on telling my boss not to go > into production > with Sun RI, we did last week. Ads appeared, and so on. And > to turn to the > subject, dozens of users are now coming and the number is going up. > > What I experienced was that the server just gave up after an > hour and a half > or so. Response times grew, and finally it stalled. So, we > decided to switch > to JBoss (latest stable build), and we're now at the final > stage of this > transition. (The hardware is a two-way Intel PC, 800Mhz, with > 512 Megs of > RAM running Debian GNU/Linux [kernel 2.4]. The server's mere > duty is to run > J2EE and a PostgreSQL server plus two standalone Java apps > that run some > scheduled tasks [sleeping mostly]). > > My question is what we can expect from JBoss? I mean I have > evil forebodings > as whether our application has been written correctly (in > terms that JBoss > can run it optimally), because it was the very first J2EE app > written at us, > and we had really no expert guidance at hand (only the > Petstore example). I > have some hopes regarding the in-VM calls available in jBoss > (no remote > calls between EJBs that run in the same VM), but what I'd > really like to > know is what one needs to be able to serve hundreds of > concurrent users??? > So given that there are no severe architectural flaws in our > application, > will jBoss be able to serve such a load without dramatic performance > degradation? Or should we apply some alternatives as server clustering > and/or improve hardware (eg. use a separate machine as DB server)? > > You know it's very important for me that this project > succeeds since I get > criticisms every day saying that it would have all been done > with PHP in a > few weeks time and would not crash even with hundreds of > users... (which I > hardly believe). It would be so great to be able to prove > that my idea to go > the J2EE way was right... > > Thanks for your patience reading this and for your valuable answers! > > Cheers, > > János Jarecsni > Budapest, Hungary > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Security question on Webapps
Dim, I am using realms and form based login. The user doesn't request the login PAGE directly, it requests the login servlet which is a protected resource. That bit works. The problem is that there are other protected resources and if the user requests one of those, after authentication, the user gets them, but I need the login servlet to be run whenever they are accessed. Gerry - Original Message - From: "Dmitri Colebatch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 8:59 AM Subject: Re: [JBoss-user] Security question on Webapps > If you're using security realms and form based login (not sure if you > are) then you shouldn't ever directly request the login page, simply > request the protected resource and let the contain send the login page as > required and then continue the user onto the requested > (protected) resource. > > cheesr > dim > > On Thu, 27 Sep 2001, Gerry Duhig wrote: > > > Hi! > > > > I have configured a webapp to be deployed by the embedded Tomcat and > > use the JBoss security system to protect it. It works but there is a > > flaw I overlooked. > > > > The webapp is a login servlet and a number of html and jsp pages. > > > > I designed it so that JBoss protects all the pages and the login > > servlet and uses FORM authentication. > > > > If the user accesses the app in the "proper" way, the url directs him > > to the logiin servlet which is protected. JBoss puts up the FORM, > > authenticates the user and directs him to the servlet. He is logged in > > to our database, a cookie is written and he is redirected to the html > > pages. All is well. > > > > If he later (new session) uses his browser history to access an html > > page directly, JBoss intercepts, puts up the FORM and authenticates > > him, and he then gains access to the html page but has not run the > > login servlet and has no cookie which is required later in the > > process. > > > > How can I force the login servlet to be run whatever route the user > > comes in by? > > > > Gerry > > > > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Refresh or Reload Bean
Hi Ole, thanks for your advice. I'am not totally clear that I know what you exactly mean. Do you have a short example for me? It sounds that the isModified() is for prevent that it will an update to the DB performed. Is it right? I have implemented proxies that call the bean to increase the performance but when do a findByPrimaryKey it will took 2s an more. Is this normal? Best Regards, Rainer Winter - Original Message - Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Ole Husgaard Gesendet: Dienstag, 25. September 2001 17:12 An: [EMAIL PROTECTED] Betreff: Re: [JBoss-user] Refresh or Reload Bean Hi, [EMAIL PROTECTED] wrote: > I want to refresh or reload an CMP entitybean on JBoss 2.4. > Another application read's and write's the tables too (direct > without ejb). > The bean is deployed with commit-option"A" because with commit-option"B" > our DB is very slow. > But the other application informs me about changes to the DB. In > this case JBoss shell load the beandata from DB and not from cache. > > Any ideas for a solution? It is hard to get this right transaction-wise. Problem is that there is a delay from the time the other app changes the db until your bean code receives the notification. In this time, your bean _not_ do a load unless commit option A is used, and then write the old data back to the db on the store at the end of the transaction. If many transactions do not change your beans, you may get petter performance if you implement the isModified() hack to avoid doing a store of unchanged data. Best Regards, Ole Husgaard. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Performance...
Jo napot kivanok (this is as far as my Hungarian will go) We have a very similar setup Single CPU P4-1.4G, 1G RAM, fast SCSI disk running RH 7.1, SUN JDK1.3.1, Apache, Resin, JBoss2.4 and Postgres. This setup runs around 50 concurent users mucking around with the web app easily (we did not push it further as we only use it in-house at the moment) and we have it running for weeks with consistent response times. We talking hundreds of thousands of bean method invocations and millions of SQL queries. Due to the nature of the app, our session are all pretty long running (whereas yours sounds like a couple of pages per session app, right?) The only thing with Postgres is to VACUUM it periodically if you have a lot of updates (we do it every 10 minutes which takes around 3 secs). We have around 30 beans - jboss sits at about 48M (up from 39 for JBoss2.2) and our servlet engine at about (25) - however we did a lot of work to make sure our app logic gc-s properly. Let us know how you go! Robert. > -Original Message- > From: Jarecsni János [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 4:35 PM > To: JBoss-User > Subject: [JBoss-user] Performance... > > > Hi, > > we developed an antiquarian bookstore using Sun's RI (and taking the > Petstore as the basis for the architecture of our system - > more or less > successfully :-) Albeit I kept on telling my boss not to go > into production > with Sun RI, we did last week. Ads appeared, and so on. And > to turn to the > subject, dozens of users are now coming and the number is going up. > > What I experienced was that the server just gave up after an > hour and a half > or so. Response times grew, and finally it stalled. So, we > decided to switch > to JBoss (latest stable build), and we're now at the final > stage of this > transition. (The hardware is a two-way Intel PC, 800Mhz, with > 512 Megs of > RAM running Debian GNU/Linux [kernel 2.4]. The server's mere > duty is to run > J2EE and a PostgreSQL server plus two standalone Java apps > that run some > scheduled tasks [sleeping mostly]). > > My question is what we can expect from JBoss? I mean I have > evil forebodings > as whether our application has been written correctly (in > terms that JBoss > can run it optimally), because it was the very first J2EE app > written at us, > and we had really no expert guidance at hand (only the > Petstore example). I > have some hopes regarding the in-VM calls available in jBoss > (no remote > calls between EJBs that run in the same VM), but what I'd > really like to > know is what one needs to be able to serve hundreds of > concurrent users??? > So given that there are no severe architectural flaws in our > application, > will jBoss be able to serve such a load without dramatic performance > degradation? Or should we apply some alternatives as server clustering > and/or improve hardware (eg. use a separate machine as DB server)? > > You know it's very important for me that this project > succeeds since I get > criticisms every day saying that it would have all been done > with PHP in a > few weeks time and would not crash even with hundreds of > users... (which I > hardly believe). It would be so great to be able to prove > that my idea to go > the J2EE way was right... > > Thanks for your patience reading this and for your valuable answers! > > Cheers, > > János Jarecsni > Budapest, Hungary > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Security question on Webapps
If you're using security realms and form based login (not sure if you are) then you shouldn't ever directly request the login page, simply request the protected resource and let the contain send the login page as required and then continue the user onto the requested (protected) resource. cheesr dim On Thu, 27 Sep 2001, Gerry Duhig wrote: > Hi! > > I have configured a webapp to be deployed by the embedded Tomcat and > use the JBoss security system to protect it. It works but there is a > flaw I overlooked. > > The webapp is a login servlet and a number of html and jsp pages. > > I designed it so that JBoss protects all the pages and the login > servlet and uses FORM authentication. > > If the user accesses the app in the "proper" way, the url directs him > to the logiin servlet which is protected. JBoss puts up the FORM, > authenticates the user and directs him to the servlet. He is logged in > to our database, a cookie is written and he is redirected to the html > pages. All is well. > > If he later (new session) uses his browser history to access an html > page directly, JBoss intercepts, puts up the FORM and authenticates > him, and he then gains access to the html page but has not run the > login servlet and has no cookie which is required later in the > process. > > How can I force the login servlet to be run whatever route the user > comes in by? > > Gerry > > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JBOSS 2.4.1 and JacOrb 1.3.3
Hi, since several months I'm using EJBs deployed with JBoss 2.2.2 able to connect with Corba servers using JacOrb 1.3.3. I tried yesterday to upgrade to JBoss 2.4.1 but it seems that I'm not enable to connect with the ORB. As far as I can tell I have exactly the same configuration ie: I add on the jboss.properties file the following lines # Launch the jacorb ORB as the default orb org.omg.CORBA.ORBClass=org.jacorb.orb.ORB org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton add the jacorb.jar in the CLASSPATH and finally I have a jacorb.properties file on my home directory The error I get is : org.omg.CORBA.INITIALIZE can't instantiate default orb implementation org.jacorb.orb.ORB and I'm using the same jdk (1.3) on W2K. Any suggestions are welcome jc ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user