Stop Tomcat from persisting sessions
I can't seem to find the blog post about how to disable Session persistence for a given <Context>. Anyone got a link?
The Angular Mini-Book is a
guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and
deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.
Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.
For book updates, follow @angular_book on Twitter.
The JHipster Mini-Book is a
guide to getting started with hip technologies today: Angular, Bootstrap, and Spring
Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.
This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.
For book updates, follow @jhipster-book on Twitter.
I can't seem to find the blog post about how to disable Session persistence for a given <Context>. Anyone got a link?
Big news baby - the best Java tool in the world has a new release. I don't know that I'll use any of the new features (such as antlib, macrodef, presetdef, ssh tasks), but I do love to upgrade. Downloading now...
Later: It looks like Canoo's WebTest is not compatible with Ant 1.6. Reverting back to 1.5.4.
C:\Source\appfuse\test\web\web-tests.xml:29: Task must be of type "Step": invoke at C:\Source\appfuse\test\web\login.xml:1: is of type org.apache.tools.ant.UnknownElement
Line 29 is: <canoo name="login">. I've notified the webtest mailing list, hopefully there will be a resolution shortly.
There's a flurry of e-mails about Struts 2.0 dancing around on the Struts Developers Mailing List. Looking at the Overview or the ReadMe, you can see that there's some major (revolutionary) changes being discussed. The Struts Bandwagon is alive and well. The proposal is called Jericho (since it tries to tear-down the walls within the Struts architecture) and proposes to open-up Struts by:
Also under consideration - adding Struts Menu to the core. Good stuff my friends, good stuff.
Also noticed on the mailing list - Tomcat is not the Servlet/JSP reference implementation (news to me):
There is a (mis)conception, for example, that Tomcat is the RI for the servlet and JSP APIs. That is not the case -- the official RI is the "J2EE SDK" available at http://java.sun.com/j2ee/1.4/download-dr.html. It happens to *include* code from Tomcat, but this is the real RI.
After looking at Hibernate's AdminApp, as well as other WW2 apps - I've noticed something. WW2 developers don't seem to give a rats ass about referencing their POJOs in their Actions, or using Hibernate directly in their actions. At first glance, I think to myself, "boy that sure makes things easier." But then again - doesn't that tightly couple your web layer to your persistence layer?
I can understand the POJO reference in Actions - I'm about to give up on doing a parent/child relationship with Hibernate where the children are converted to ActionForms and then converted back (Hibernate loves to tell me "a different object with the same identifier value was already associated with the session: 1").
It would be SO much easier (with this particular problem) if I could just toss up POJOs to my view. The thought of importing "persistence.User" into my Action makes me cringe though. I don't know why, it just does. I need to get out of this patterns mindset I've been in for the last couple of years and get back to what really matters - simple, easy to learn, and fast to develop. I'm tired of banging my head against the wall with Struts and Hibernate.... I've been doing it for two days. It's not Hibernate, and it's not Struts, it's me... (thud, thud, thud).
I was going to leave a comment on Chris's site about his About having babies post, but I'm afraid I'll probably ramble on about this, so I might as well put it here.
I am a proud father of Abbie Loo, now 13 months old. I should probably preface this post with the fact that I've always wanted kids since I was one myself. I always had a knack for entertaining them and being their friend. Even in high school and college if there was a kid (under 5) at a party, I ended up playing with them over any adults. So when I met Julie, it was definitely something we discussed in the first few weeks of dating (we knew we would get married w/in two weeks of meeting). We both knew we wanted them, so it was just a matter of time after we got married.
Let's get to Chris's questions and my answers:
Would my spare time be so drastically reduced that I would no longer be able to work on open source?
I think it depends. Before Abbie was born, the earliest I ever got up was 6 a.m. Now I get up at 4 a.m. and sometimes stay up until 6 a.m. When I do this, it's always to code and it's about 50/50 open source vs. paid stuff. So, you'll still be able to work on open source, but you will have to sacrifice sleeping hours. In the first month that Abbie was born, I worked from home and got the Wrox deal - so I really had no concept of night or day. That's what got me on the 4 a.m. kick - and now I've found it works awesome for productivity-addiction.
Julie does yell at me a lot to "get off the computer" and "take care of your daughter!" She definitely does most of the work, and I feel my computer time is justified because I'm improving my skills to bring home more bacon. I'm not allowed to ever say I'm the one who pays for everything though, so I've never explained my justification. I guess I feel like Abbie won't remember this part of her life, so I can get away with it, but I'd better quit working so much in the next couple of years - it's not healthy.
Would we be able to travel?
This depends on you and your wife. Are you willing and ready to travel with a small child? Julie and I take Abbie everywhere and I think she's better behaved because of it. During the first year, Julie took her on an airplane every month and now she's an angel on the plane. If you're willing to put up with a crabby kid every once in a while on a plane, of course you can travel. They're not like dogs. ;-)
Do we really need any more babies?
No, but we do need more smart babies. Wouldn't you rather have your genes around to shape tomorrow rather than someone else's? Kids are the most rewarding thing in the world - some folks are addicted to it, which probably takes the coolness out of it. Two is good, if you have older friends without kids - they're the ones helping the problem. I know LOTS of folks without kids.
But then again there's the whole area of taking care of children with disabilities.
You sound like a chick - do you fear getting in your car because you might get in a car accident? ;-) I think depends a lot on your family history. If you have a history of disabled kids, you might want to think twice. Adopting is an excellent option - I've thought about doing it simply because I feel sorry for kids w/o parents.
Kids rock, no matter what anyone says. I've never laughed or smiled so much in my entire life before Abbie. We certainly don't have the night (drunk) life like we used to, but we certainly feel better about ourselves and the world. The coolest part is how close it brings your family together (husband/wife, parents, siblings).
And then you have Julie's Aunt and Uncle's opinion - party like a rock start until your late 30s, and then have kids. I prefer to party with my kids and I'd like to retire at 50, shortly after they leave. ;-D
Tonight I attented the Denver Java User Group meeting. Tom McQueeney did a nice basic concepts meeting on XSLT. Tom's presentation was a nice refresher on XSL and I learned a few things I hope I can remember the next time I use it. I've used XSL a couple of times in the last few years, and for those applications that I still maintain - I'm very glad I did. The e-learning app I developed last year uses JSTL's XML Transformation tags to render assets with different HTML (i.e. Flash, QuickTime, Image). It's worked great, and has always been very easy to add a new asset type to the XSL stylesheet.
The main speaker tonight was Kathy Sierra, the founder of JavaRanch. Her presentation was supposed to be on the new EJB 2.0 Certification, but it turned out to be a explanation of how EJBs work. Only about 1/3 of the room (approx. 40 attendees) had used EJBs, so I guess that's why she went that route. She didn't ask if we weren't using them by choice. ;-).
She started off her presentation talking about how the brain works and how it fights all day long to forget stuff. Your brain has
a built-in crap filter. It only remembers those things that it needs to survive. It will only automatically remember those events that spark high emotions - fear, humor, arousal - because the chemicals caused by the emotions help you remember better. So when you're studying for your Java Certification (or any certification), the brain is going "screw this shit, I can survive without it." Repetition is a way to convince your brain that it is important. Another way is to get involved with your learning - be the EJB. Kathy did a captivating one-hour presentation with a number of audience members who acted out how EJBs work.
It was a very humorous presentation and great fun. An EJB presentation that was fun - WTF?! At one point, I looked around the room and almost everyone was learning forward and smiling. This lady is a captivating speaker, one of the best I've ever seen. I was very impressed with
her teaching/learning techniques and I might just have to buy her book, Head First Java. Another highlight of the evening was that I actually won a free book.
Later: I forgot to mention what Kathy said about upcoming Sun Certifications. A couple new ones are coming: Mobile Application Developer, Web Services and an update to the Web Component Developer exam. She mentioned that the EJB 2.0 exam would probably remain at 2.0 for at least another year - until all the vendors caught up and support EJB 2.1. She said the Web Services one is going to be hard as will the next Web Component Developer Exam. The Web Component Developer exam will cover JSP 2.0 and Servlet 2.4. She also mentioned that she was reading Pro JSP to help create the WCD exam. How's that for an endorsement?!
At my current project, we're using AppFuse for our baseline and (currently) Tomcat and MySQL for our databases. Soon we'll be migrating to DB2 for our database. I'm assuming everything will work smoothly with Hibernate, but there's probably some Ant things I will need to modify. For instance, with MySQL, I currently create a new database with the following script:
create database if not exists appfuse; grant all privileges on appfuse.* to test@"%" identified by "test"; grant all privileges on appfuse.* to test@localhost identified by "test";
Is this possible with DB2? It's no biggie if it isn't - at my Comcast gig earlier in the year, we tied AppFuse/Hibernate into Oracle and simply didn't use the db-create nor db-init (creates tables) tasks. I use Hibernate's <schemaexport> task to create the tables - hopefully this will work in DB2. As for Tomcat, has anyone successfully configured DB2 with Tomcat's DBCP? We'll eventually be migrating to Websphere 5, hopefully it's not a big leap from Tomcat 4.1.27.
I haven't done any research on this yet, just wanted to put out some feelers and get any helpful advice before I start banging my head against the wall (hopefully I won't have to).
I guess it happened yesterday, beginning upgrade at 3:10 MST... Done at 3:15 - let me know if you see any issues.
Later: There's issues all right. First thing is that the flag to allow symlinks used to be adding the following in your <Context> tag:
<Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" caseSensitive="true" />
And with 5.0.16, this doesn't work. Adding allowLinking="true" on your <Context> does allow symlinks, and should have been this way the whole time IMO. I also got a good ol' OutOfMemory error and I have a sneak suspicion it's not Roller (though Roller does though an exception when I do Weblog → Edit:
ERROR 2003-12-04 15:54:07,948 | HibernateStrategy:query | During QUERY net.sf.hibernate.QueryException: could not resolve property type: weblogEntryId [select p from p in class org.roller.pojos.RefererData where p.weblogEntryId=? and not title is null and not excerpt is null order by p.totalHits desc]
Maybe this has something to do with the fact that my referers are not getting cleaned out every night. Anyway, back to my sneaky suspicion of OOM errors. I have two domains hosted on this site - raible.net and raibledesigns.com. The first just redirects to my family blog, but that's not the point. What I'm seeing in Tomcat's logs is that it tries to load all apps for both domains - and it pukes on a few. Time to play around with server.xml and see if I can get raible.net to just load it's own context.
Solution Found: You have to configure 2 different appBase's for each host.
Simon posted today that Pebble supports RSS Feeds by Category. Just so you know, Roller also has this feature, - just add "?catname=categoryName" after /page/$username. Here's all my current categories.
This is a great feature to have in your blogging software. Without it, javablogs.com would be getting all my posts, rather than just my Java and Roller categories.
At first, I thought that Google's AdSense was kind of annoying. Then I realized, from Russ, that you can actually pay for your hosting costs with it. So I tried to sign up (this was about a month ago now). I was denied with a vague reason like my site was too personal or something. "Oh well" I thought, "at least I tried." But now I'm seeing these suckers on almost everyone's blogs. "Sheot" I say to myself, "those bastards are making money and I'm still stuck paying $50+/month for this site!!"
So on one hand, I'm jealous of all your Google Ad Bastards, but on the other hand, I'm proud to be Ad Free!
No wait. I take that back. I'm just jealous. Money talks...