01:37.15 | *** join/#tomcat AJ_Z0 (~AJ_Z0@pdpc/supporter/professional/ajz0) |
02:40.18 | *** join/#tomcat Romeo` (~Romi@dslb-188-104-158-002.pools.arcor-ip.net) |
02:40.18 | *** join/#tomcat Romeo` (~Romi@unaffiliated/romeo/x-000000001) |
04:29.28 | *** join/#tomcat twb (~twb@203.7.155.77) |
04:30.22 | twb | I'm a sysadmin who set up a linux/sunacle java 7/tomcat 7 stack for a customer, and they are now complaining because their app "works on windows, but not on linux, so you must have broke it" |
04:30.47 | twb | I can see this http://paste.debian.net/198367/ in their app's log |
04:31.23 | twb | The rename HAS worked when I look in /tmp, so AFAICT something at the java layer or above is having a tmp rename race condition or something. |
04:31.33 | twb | What can I do to further isolate this fault? |
04:32.53 | twb | Exact versions are 7.0.26-1ubuntu1.1 (tomcat) and 7.7-1~precise1 (java), if that matters. |
04:59.33 | *** join/#tomcat factor (~factor@74.196.97.204) |
06:24.18 | *** join/#tomcat mturk (~mturk@redhat/jboss/mturk) |
06:30.56 | *** join/#tomcat lkoranda (lkoranda@nat/redhat/x-rotrlkjwydmmekwb) |
06:45.04 | *** join/#tomcat alcir (~alcir@159.213.59.135) |
07:04.06 | *** join/#tomcat opalka (~ropalka@84.64.broadband3.iol.cz) |
07:04.07 | *** join/#tomcat opalka (~ropalka@redhat/jboss/opalka) |
07:13.16 | *** join/#tomcat ccorn (~ccorn@oosteinde.castasoftware.com) |
07:40.05 | *** join/#tomcat surfdue (surfdue@unaffiliated/surfdue) |
07:48.22 | *** join/#tomcat _Qman (~Q@213.177.160.238) |
07:51.29 | *** join/#tomcat _moon (~moon@LNeuilly-152-22-7-151.w193-251.abo.wanadoo.fr) |
08:10.39 | *** join/#tomcat papegaaij (~papegaaij@5ee53fc2.ftth.concepts.nl) |
08:48.01 | *** join/#tomcat pmorris (~pmorris@31.222.136.197) |
08:49.25 | pmorris | Why do I keep getting org.h2.jdbc.JdbcSQLException: Error while creating file "/usr/share/tomcat5" on tomcat6? |
08:53.03 | twb | You noticed that 5 is not a 6 right? |
08:54.42 | pmorris | My point exactly |
08:54.52 | twb | My work here is done |
08:55.48 | pmorris | I can't stop it trying to write to the wrong directory |
08:56.03 | pmorris | I've grepped the shit out of the configs and tomcat5 isn't defined anywhere |
08:56.07 | pmorris | Only place it appears is in the logs |
08:56.11 | pmorris | What the hell is going on |
08:58.21 | twb | pmorris: did you look in /var? |
08:58.36 | twb | Did you strings the binaries? Did you check the environment variables? |
09:02.48 | pmorris | Ah shit |
09:02.53 | pmorris | It's the user's home dir |
09:08.33 | *** join/#tomcat rmannibucau (~rmannibuc@2a01:20:6::13) |
09:08.51 | rmannibucau | Hi, any known sample using digest auth on tomcat 7? |
09:19.32 | *** join/#tomcat _Qman (~Q@213.177.160.238) |
09:24.36 | *** join/#tomcat surfdue (surfdue@unaffiliated/surfdue) |
09:42.27 | *** join/#tomcat alcir (~alcir@159.213.59.135) |
09:53.41 | *** join/#tomcat mturk (~mturk@47-21.dsl.iskon.hr) |
09:53.42 | *** join/#tomcat mturk (~mturk@redhat/jboss/mturk) |
09:56.05 | *** join/#tomcat micw (~micw@178-24-236-6-dynip.superkabel.de) |
09:56.07 | micw | hi |
09:56.33 | micw | i have several problems with streaming of big files (random stream corruptions). now i created a minimal servlet: |
09:56.34 | micw | http://pastebin.com/vPf9qByx |
09:56.53 | micw | with all http/1.1 clients i have random problems |
09:57.07 | micw | i tried with differnt versions of tomcat 7.0.x |
09:57.43 | micw | the client either stalls (with read timeout) or has random errors when decoding the chunked stream |
09:57.53 | micw | with http/1.0 clients there's no such effect |
10:02.37 | *** part/#tomcat pmorris (~pmorris@31.222.136.197) |
11:53.06 | *** join/#tomcat alcir (~alcir@159.213.59.135) |
12:11.06 | *** join/#tomcat snuff (~Daron@ppp118-209-170-34.lns20.mel6.internode.on.net) |
13:09.31 | *** join/#tomcat randrewj (~u1@dyn-128-59-52-18.dyn.columbia.edu) |
13:20.53 | *** join/#tomcat kantlivelong (~kantlivel@home.kantlivelong.com) |
13:49.28 | *** join/#tomcat hybridpollo (~hybridpol@50.56.228.65) |
14:11.56 | *** join/#tomcat alcir (~alcir@159.213.59.135) |
14:16.08 | *** join/#tomcat yassine (~yassine@unaffiliated/yassine) |
14:26.35 | *** join/#tomcat zerobravo (~zerobravo@93-136-85-143.adsl.net.t-com.hr) |
14:37.01 | *** join/#tomcat whartung_ (~whartung@wsip-98-189-78-118.oc.oc.cox.net) |
14:38.55 | *** join/#tomcat papegaaij_ (~papegaaij@5ee53fc2.ftth.concepts.nl) |
14:40.31 | *** join/#tomcat vanksi_ (~vanksi@ec2-176-34-84-91.eu-west-1.compute.amazonaws.com) |
14:40.32 | *** join/#tomcat hybridpo1lo (~hybridpol@50.56.228.65) |
14:47.04 | *** join/#tomcat Romeo- (~Romi@dslb-188-104-158-002.pools.arcor-ip.net) |
14:47.05 | *** join/#tomcat Romeo- (~Romi@unaffiliated/romeo/x-000000001) |
15:13.54 | *** join/#tomcat opalka (~ropalka@redhat/jboss/opalka) |
15:31.22 | *** join/#tomcat emilyp (~Emily@103.247.49.138) |
15:31.50 | emilyp | hi all |
15:33.20 | emilyp | i have an issue with the maven tomcat plugin |
15:33.40 | emilyp | I was unable to deply a war using mvn tomcat:deploy |
15:34.21 | emilyp | it says Cannot invoke Tomcat manager |
15:34.26 | *** join/#tomcat Romeo- (~Romi@dslb-188-104-158-002.pools.arcor-ip.net) |
15:34.27 | *** join/#tomcat Romeo- (~Romi@unaffiliated/romeo/x-000000001) |
15:35.15 | emilyp | I tried various fixes on the web |
15:35.25 | emilyp | can someone please help me |
15:35.43 | *** join/#tomcat Romeo- (~Romi@dslb-188-104-158-002.pools.arcor-ip.net) |
15:35.43 | *** join/#tomcat Romeo- (~Romi@unaffiliated/romeo/x-000000001) |
15:35.58 | emilyp | I have changed the settings on pom file and also the maven settings |
15:37.10 | *** join/#tomcat Romeo- (~Romi@dslb-188-104-158-002.pools.arcor-ip.net) |
15:37.10 | *** join/#tomcat Romeo- (~Romi@unaffiliated/romeo/x-000000001) |
15:44.25 | *** join/#tomcat rnt (~rnt@200.137.65.105) |
15:45.29 | rnt | can someone please tell me if there is a guide showing/explaining about virtual hosting tomcat with ssl. in my case i need one different ssl certificate for each virtual host. |
15:57.57 | rnt | please? |
15:58.01 | rnt | :/ |
16:08.22 | *** join/#tomcat iarebatman (3f47096c@gateway/web/freenode/ip.63.71.9.108) |
16:09.06 | iarebatman | OK, so here's a good one for you all (and a stupid one, IMO - but it's been asked of our dev team..) |
16:09.20 | iarebatman | On this page, http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html |
16:09.48 | iarebatman | the third bullet point indicates that jasper 2 can now detect when a page included at compile time from a JSP has changed and then recompile the parent jsp. |
16:10.28 | iarebatman | Our integration department has determined that the binary files differ too much after making a minor change, and it has come back down the chain to us that we must disable this feature. |
16:10.32 | iarebatman | Does anyone know how? |
16:11.47 | iarebatman | It apparently adds a version or timestamp or some kind of value to keep track of things internally now, and it has caused our binaries to differ more than they are expecting. |
16:17.38 | rNt | can someone please tell me if there is a guide showing/explaining about virtual hosting tomcat with ssl. in my case i need one different ssl certificate for each virtual host. |
16:20.22 | pucko | might work on tc7 with java7. sure sure though |
16:21.56 | pucko | actually I was wrong. it doesn work; http://tomcat.markmail.org/thread/q6d5czzlgih3r2ys |
16:39.19 | whartung | iarebatman: WTF? I mean, srs, what's the problem here? |
16:50.27 | iarebatman | whartung: I'm not saying it's not completely retarded to ask, I'm saying - We were asked to do this.. |
16:51.12 | whartung | yea, I don't think there's a way to disable this. It doesn't make any sense, AT ALL, anyway. |
16:51.46 | iarebatman | yeah, I don't know why they are diffing binaries anyway. |
16:51.57 | whartung | …of JSPs... |
16:52.12 | whartung | they're probably looking for root kits and exploits or something |
16:52.22 | whartung | looking for things that change |
16:52.29 | iarebatman | I wouldn't give them that much credit.. I think someone just 'noticed' it |
16:53.07 | whartung | what they should be doing, if they care that much, is not sending JSPs at all -- build them all at compile time and disable runtime JSP compilation completely. |
16:53.29 | whartung | just ship up compiled servlets. |
16:53.52 | whartung | it's a pain to set up, but it's possible, and it works. Just ugly |
16:53.54 | iarebatman | Maybe I said things wrong - they precompile everything already |
16:53.59 | iarebatman | they are comparing the blobs |
16:54.15 | whartung | to what? |
16:54.20 | whartung | to "old blobs"? |
16:54.20 | iarebatman | previous version to new version |
16:54.28 | whartung | yea ok |
16:54.39 | whartung | well that makes sense. (sorta) |
16:55.01 | iarebatman | basically, we made a 2 line change - and a lot of the binary changed. They had us investigate why |
16:55.07 | whartung | yea |
16:55.21 | whartung | you can always rebuild tomcat :) |
16:55.28 | whartung | and patch that out |
16:55.32 | iarebatman | yeah, don't say that too loud |
16:55.33 | whartung | what it's doing |
16:55.45 | iarebatman | I wouldn't put it past them to make something stupid like that a priority |
16:55.55 | iarebatman | we have branches and labels in source control for a reason. |
16:56.03 | iarebatman | if they don't trust those..... |
16:56.06 | whartung | is it's recording the files and mod times of the files and embedding that information as static data in the generated .java files from the JSP |
16:56.33 | whartung | that's why the binaries "change" |
16:56.58 | whartung | (and they don't change that much, but when MD5 is your indicator of change, well, any change is a "big change") |
16:58.12 | iarebatman | well, thanks for your time.. I'm going to relay the message that short of rolling our own tomcat - it's not a feature that can be disabled |
16:58.23 | whartung | yea, that basically sums it up. |
16:58.42 | iarebatman | later. |
16:58.45 | whartung | take care |
17:07.10 | *** join/#tomcat cjz (~Adium@173-13-190-57-sfba.hfc.comcastbusiness.net) |
17:14.22 | eghm_ | so they are already precompiling and the don't want the JSPs to change, remove the JSP source files. Sounds like a place I used to work at |
17:17.26 | whartung | no the problem, eghm_, is that they're comparing binaries to see what's changed. If you have a JSP that includes another JSP, even if neither source file changed, when it's rebuilt, the binaries will differ. |
17:21.09 | eghm_ | even if there are no jsp files available to recompile? |
17:21.42 | whartung | no they're building the entire distro, including compiling the JSPs. Then they compare the resulting binaries. |
17:22.24 | eghm | ah |
17:22.33 | eghm | lol, can't wait till the upgrade their JDK |
17:27.25 | rNt | can someone please tell me if there is a guide showing/explaining about virtual hosting tomcat with ssl. in my case i need one different ssl certificate for each virtual host. |
17:53.33 | *** part/#tomcat _moon (~moon@LNeuilly-152-22-7-151.w193-251.abo.wanadoo.fr) |
17:58.28 | LzrdKing | damn, this jboss+mod_jk is kicking my ass |
18:32.29 | *** join/#tomcat Mimiko (~Mimiko@89.28.88.177) |
19:10.28 | *** join/#tomcat yassine (~yassine@unaffiliated/yassine) |
19:14.10 | *** join/#tomcat kringa (~kringa@38.104.34.122) |
19:14.13 | *** join/#tomcat jamespage_ (~jamespage@host81-154-13-244.range81-154.btcentralplus.com) |
19:35.27 | *** join/#tomcat ChanServ (ChanServ@services.) |
19:35.27 | *** mode/#tomcat [+o ChanServ] by pratchett.freenode.net |
19:35.43 | *** join/#tomcat Gletster (~Thunderbi@static-96-252-180-210.tampfl.fios.verizon.net) |
19:36.02 | *** join/#tomcat Gletster (~Thunderbi@static-96-252-180-210.tampfl.fios.verizon.net) |
19:46.07 | *** join/#tomcat factor (~factor@74.196.97.204) |
19:47.57 | *** join/#tomcat jamespage_ (~jamespage@host81-154-13-244.range81-154.btcentralplus.com) |
20:33.43 | *** part/#tomcat randrewj (~u1@dyn-128-59-52-18.dyn.columbia.edu) |
20:34.42 | *** join/#tomcat devmikey (~irc@unaffiliated/devmikey) |
20:34.58 | devmikey | What are the min reqs for running tomcat on a linux VPS? |
20:35.17 | devmikey | This is for development, not production |
20:36.12 | devmikey | Assume I have MySql and Postgres running too |
20:36.37 | *** join/#tomcat micw (~micw@178-24-236-6-dynip.superkabel.de) |
20:40.40 | whartung | depends? |
20:40.50 | whartung | depends on what you're developing |
20:41.05 | whartung | tomcat doesn't need a whole lot out of the box, you can crank it down. |
20:41.33 | whartung | you can probably do "OK" with 256M |
20:41.51 | whartung | 192 can work too |
20:43.02 | devmikey | I was hoping 512 would suffice |
20:43.33 | devmikey | Like on the starter plan here for example: http://www.accuwebhosting.com/linux-cloud.html |
20:44.13 | devmikey | And I'd just be developing toy apps to demonstrate hypothetical development ability |
20:45.33 | whartung | oh yea |
20:45.36 | whartung | 512 would be ample |
20:45.42 | whartung | Just. Don't Swap. |
20:45.46 | whartung | You. Will. Die. |
20:46.18 | devmikey | What do you mean? |
20:46.23 | devmikey | Is that enough processor? |
20:47.07 | whartung | it's fine. The point is, if you want to see a server seize and die, just use up enough RAM to cause a long running Java process to swap. |
20:47.57 | devmikey | if I could increase either processor or RAM, which would you recommend? |
20:48.01 | whartung | RAM |
20:48.22 | whartung | very few server based systems are CPU bound |
20:48.23 | devmikey | k thx |
20:48.26 | whartung | most are I/O bound |
20:48.30 | whartung | RAM helps address that |
20:48.35 | whartung | but for you |
20:48.37 | whartung | 512 is fine |
20:48.51 | whartung | just be conscious of a) the Heap size that you give java is NOT how much memory it will use |
20:49.11 | whartung | and b) if you use too much, your server process slows down painfully |
20:49.29 | whartung | with a 512M RAM, I wouldn't give Tomcat more than 256 of that. |
20:49.34 | whartung | 192 would be better |
20:49.47 | whartung | and that will be more than enough for any dev work you are ilkely to do |
20:51.47 | devmikey | Is there a standard for what a "virtual processor" is? I'm looking at someone else who offers 8 standard |
20:51.59 | whartung | 8 what, cores? |
20:51.59 | devmikey | I guess let me ask them |
20:52.11 | devmikey | i dont think so, lemme ask them |
21:11.03 | devmikey | they were not helpful |
21:12.57 | whartung | "8 standard" doesn't mean much, what does that mean? |
21:29.55 | *** join/#tomcat jaimipassos (~chatzilla@189.74.229.231) |
21:32.59 | devmikey | They basically said "8 tasks" |
21:33.10 | devmikey | I have no idea |
21:33.47 | whartung | "They"? They who? |
21:34.44 | devmikey | myhosting.com |
21:34.57 | devmikey | But they offer a good deal on barebones VPS |
21:35.14 | devmikey | Only thing I cant compare is the processor |
21:36.05 | whartung | right, it's a matter of how much they're overselling their procesors |
21:36.57 | devmikey | It appears a2hosting offers 8 vCPUs also |
21:36.58 | whartung | well either way |
21:37.08 | whartung | I can safely say |
21:37.14 | whartung | that for most random development |
21:37.19 | whartung | the biggest hit you'll take to CPU |
21:37.26 | whartung | is compiling JSPs on the fly. |
21:37.59 | whartung | http://d.pr/i/39jx |
21:38.11 | whartung | "11 virtual processors", man that's a warning flag to me |
21:38.18 | whartung | because here's the deal |
21:38.23 | whartung | with multiprocessing |
21:38.37 | whartung | multiple CPUs/Cores gives your machine "torque" |
21:38.48 | whartung | you can throw more work at it, and notice it less |
21:39.03 | whartung | but it doesn't give "horsepower", or speed. |
21:39.16 | whartung | you can get 8 or 11 SLOW "vCPUs" |
21:39.33 | whartung | which means everything is slow, but you can do a lot of slow things all at once |
21:39.46 | LzrdKing | AWS is the same way |
21:39.50 | whartung | rather have 2 fast ones than 11 slow ones |
21:40.23 | whartung | they could be saying "you have 1.1GHz" yes, in .1GHz pieces…that's awful. |
21:44.40 | whartung | buy this and colo it: http://d.pr/i/39jx |
21:44.47 | whartung | sorry |
21:44.48 | whartung | http://www.ebay.com/itm/APPLE-MAC-MINI-INTEL-CORE-DUO-1-83-GHZ-2GB-80GB-DVD-RW-Snow-Leopard-/130777685711?pt=Apple_Desktops&hash=item1e72f51ecf |
22:02.31 | devmikey | Can I colo for under $20/month |
22:06.53 | *** part/#tomcat devmikey (~irc@unaffiliated/devmikey) |
22:11.40 | whartung | oh well -- you can do it for $27 per month :) |
23:01.49 | *** join/#tomcat verdagon (81419547@gateway/web/freenode/ip.129.65.149.71) |
23:02.29 | verdagon | sup tomcatters, can anyone tell me why log4j needs its own servlets to be able to log stuff? |
23:03.13 | verdagon | all the examples i see for using log4j have it add a logging servlet... but i just want something thatll write to a file, i dont see why a servlet is needed for that |
23:03.37 | *** join/#tomcat acidjnk (~havenone@p57B8CA43.dip.t-dialin.net) |
23:03.50 | whartung | it doesn't |
23:04.53 | verdagon | why would so many tutorials have me add a logging servlet? |
23:05.05 | whartung | dunno -- can't say I've ever seen one of those |
23:05.10 | verdagon | http://www.avajava.com/tutorials/lessons/how-do-i-initialize-log4j-in-a-web-application.html |
23:05.12 | verdagon | its quite strange |
23:06.08 | whartung | oh this is different |
23:06.24 | verdagon | weird huh? |
23:06.38 | whartung | no, it makes sense |
23:06.56 | whartung | they're referring to someething specific |
23:07.06 | whartung | something I've never had to do for log4j myself |
23:07.22 | whartung | what they are doing |
23:07.39 | whartung | is they're using a servlet to tie in to the web app lifecycle |
23:07.40 | whartung | that is |
23:07.55 | whartung | by leveraging a servlet, they can "know" when a web app is starting up and when it is shutting down |
23:08.05 | verdagon | interesting |
23:08.10 | verdagon | ah, i see |
23:08.13 | whartung | they're using that so they can init log4j at the very beginning, and only once |
23:08.35 | whartung | I've never needed to do that myself, I just use log4j.properties in WEB-INF/classes, and leave it alone. |
23:08.56 | whartung | and today, it's "better" to use a ServletContextListener for this than a servlet. |
23:09.06 | verdagon | oh awesome, ill take a look at that |
23:09.17 | verdagon | one thing i cant understand is how the servlets can communicate with each other |
23:09.22 | verdagon | i thought each servlet lived in its own little world |
23:09.29 | whartung | like what? |
23:09.31 | verdagon | so im wondering how my app can communicate with a log4j servlet |
23:09.49 | whartung | no, it doesn't need to |
23:09.50 | whartung | at all |
23:09.52 | verdagon | O.o |
23:10.02 | verdagon | a magic logger! |
23:10.03 | verdagon | lol |
23:10.09 | whartung | no, hardly |
23:10.14 | whartung | It's Just Java(tm) |
23:10.17 | verdagon | hahah |
23:10.24 | whartung | your web app is running in a shared space. |
23:10.31 | whartung | all of your classes can see each other, etc. |
23:10.38 | whartung | so what this is doing |
23:10.40 | whartung | is on startup |
23:10.49 | whartung | it's configuring the global log4j state |
23:11.07 | whartung | so that when you do log.debug(…) later, it goes to the correctplaces |
23:11.48 | verdagon | interesting! so static Logger log = Logger.getLogger(Log4JTestServlet.class); can hook into the global that was created in the init servlet? |
23:11.49 | whartung | Servlets are as "isolated" as any other class instance |
23:11.53 | whartung | yes |
23:12.13 | whartung | log4j is setting up some internal static state that the Loggers use |
23:13.41 | verdagon | OH |
23:13.43 | verdagon | i think i see it! |
23:13.49 | verdagon | the root logger is set to myAppender |
23:13.50 | whartung | Just Java |
23:13.53 | verdagon | lol |
23:13.59 | whartung | nothing magic here |
23:14.11 | verdagon | so when i try to getLogger(Log4jTestServlet.class) |
23:14.24 | verdagon | itll just... hmmm |
23:15.01 | verdagon | ah, itll look for a logger of name "Log4JTestServlet" and wont find it so itll revert to the root thing |
23:15.16 | verdagon | which was previously configured to be myAppender, because the log4jinit servlet already ran |
23:15.20 | verdagon | BAM magic |
23:15.55 | verdagon | hey whartung, so i can just communicate between servlets by having public static variables, right? |
23:16.13 | whartung | yea, bt that's likely not what you want to do |
23:17.13 | verdagon | right, not for this log4j stuff. im wondering because i have a connection to a database |
23:17.28 | verdagon | that i want my users servlet, my posts servlet, and my stats servlet to share |
23:17.29 | whartung | use a database pool |
23:18.24 | verdagon | ok ill take a look |
23:18.34 | verdagon | hypothetically, i could share it with a static variable though, right? |
23:19.03 | whartung | yes |
23:19.08 | whartung | but I wouldn't |
23:19.37 | verdagon | okay cool |
23:19.40 | verdagon | ill take a look at that pool thing |
23:19.43 | verdagon | thanks a bunch for your help! |
23:19.45 | whartung | si |
23:19.47 | whartung | de nada |
23:20.14 | whartung | Lookup Default Initialization for Log4j |
23:20.18 | whartung | it's a lot easier |
23:20.32 | whartung | just create a log4j.properties file and plop it in WEB-INF/classes |
23:20.36 | whartung | Just Works, no code necessary |
23:36.30 | *** join/#tomcat verdagon (81419547@gateway/web/freenode/ip.129.65.149.71) |
23:36.57 | verdagon | hey whartung, does database pooling use static variables under the hood, or do you think it uses servlet contexts? |
23:37.11 | whartung | I'm sure it uses some static variables |
23:37.15 | verdagon | i dont think it could use servlet contexts because all of the stuff stored in it have to be serialized |
23:37.20 | verdagon | ok cool |
23:37.30 | whartung | I mean, who knows -- the key is you don't care |
23:37.39 | verdagon | well said |
23:37.40 | whartung | servlet contexts do not have to be serialized |
23:38.28 | verdagon | http://fixunix.com/weblogic/227097-servletcontext-attributes-must-serializable-not.html |
23:38.56 | verdagon | what do you think of that? the original poster may have meant session |
23:39.06 | verdagon | but i just want to be sure that attributes are not serialized |
23:39.07 | whartung | Servlet Context != Sessions |
23:39.17 | verdagon | okay cool, thats a relief |
23:39.38 | verdagon | so, it seems to me that static variables would be a bit better for encapsulation |
23:39.50 | verdagon | anything in a servlet context can be accessed by anyone who has access to that context |
23:39.50 | whartung | perhaps |
23:40.02 | verdagon | oh, just occurred to me, i can just restrict access to the context |
23:40.17 | whartung | me thinks you're over thinking it and getting lost in the weeds. |
23:40.36 | verdagon | perhaps... |
23:40.43 | verdagon | i just want to make this application right the first time |
23:40.50 | whartung | that's not going to happen. |
23:41.04 | verdagon | so down the road someones like "wow this verdagon guys an idiot why didnt he use redynamic modulated servlet storage?" |
23:41.21 | whartung | the field is too broad and deep to "get it right" the first time, especially for a novice. |
23:41.31 | verdagon | tis a shame |
23:41.45 | whartung | it's a robust platform, lots (lots (lots lots)) of options |
23:42.14 | verdagon | uh oh |
23:42.15 | verdagon | http://stackoverflow.com/questions/1184556/servlet-context-scope-vs-global-variable |
23:42.20 | verdagon | "The servlet context will survive these things as the web container knows about it and can serialize it or have a common repository." |
23:42.43 | whartung | seriously, don't worry about it |
23:42.59 | whartung | getting a connection pool working is more useful than sweating this stuff |
23:43.24 | verdagon | but what about things that arent connections |
23:43.34 | whartung | like what? |
23:43.44 | whartung | store them in the DB -- let the DB cache them |
23:43.49 | verdagon | well, right now, im making a simple database thats just a bunch of in-memory java hash maps |
23:43.54 | verdagon | this will live alongside my real database |
23:43.58 | verdagon | they will compare their results against each other |
23:43.59 | whartung | yea, don't do that. |
23:44.02 | whartung | why bother? |
23:44.03 | verdagon | letting us catch bugs sooner |
23:44.06 | verdagon | for more quality |
23:44.10 | whartung | no, that will fail |
23:44.19 | whartung | you're writing twice the code to no purpose |
23:44.28 | verdagon | well, the purpose is to catch bugs in the real one |
23:44.35 | verdagon | its like a sanity check, run on every transaction |
23:44.41 | whartung | no, that's insane |
23:44.42 | verdagon | making sure what comes out is the same for what goes in |
23:44.59 | verdagon | well, i am kind of insane |
23:44.59 | whartung | that means you're writing/reading from two separate sources of truth. |
23:45.12 | verdagon | but hypothetically, if this was a good idea, |
23:45.15 | verdagon | how would i share this data |
23:45.16 | whartung | and writing two separate persistence models |
23:45.20 | whartung | it's a lousy idea |
23:45.26 | whartung | really really awful |
23:45.47 | whartung | go look up "unit testing", and test that way. |
23:45.55 | whartung | this way is the path to ruin |
23:45.56 | verdagon | i suppose theres no way to have it both persist across multiple nodes, yet not be serializable |
23:46.06 | whartung | you don't need that either |
23:46.29 | verdagon | perhaps |
23:46.32 | whartung | you're worrying about far far too much minutae |
23:46.43 | verdagon | heh, it must seem that way |
23:46.46 | whartung | you can't even get a basic servlet and a db connection up and running. |
23:46.57 | whartung | and you don't have the fundamental understanding of the model |
23:47.03 | whartung | to even address these questions |
23:47.08 | whartung | it's a distratction |
23:47.13 | whartung | focus on the basics |
23:47.18 | verdagon | well, thanks for the help, i now understand servlet contexts vs static variables |
23:47.37 | verdagon | i will think on your words regarding my sanity-checking database |
23:47.42 | verdagon | thanks and adios! |
23:47.47 | whartung | vía con dios |