Friday, November 4, 2016

Very ipsum such dolor amet wow so margin very divs very spans, very picture many padding wow so divs. Such margin very so excuse many develop. Such content such divs very divs, many develop very layer much develop many margin much excuse very content so beta. Many padding very padding many border so border so styling such spans.

This is just a post with a really long title for testing something. KTHXBY

Very ipsum such dolor amet wow so margin very divs very spans, very picture many padding wow so divs. Such margin very so excuse many develop. Such content such divs very divs, many develop very layer much develop many margin much excuse very content so beta. Many padding very padding many border so border so styling such spans.

Thursday, June 12, 2014

Java Encapsulation Needs an Easy Button

We have all done it, some might not even remember why.  You wrote a private variable with public/protected getters and setters.  We do this for encapsulation, so if by some chance you wanted to change what happens when you set or get that value, you can change it with no effect to the code that utilizes your super fancy class.  However, 99.9% of the time, we are just returning or setting the value.  In a dream the other night I had [what I hope to be] a premonition that Java 9 had added @getter and @Setter annotations.  The next day I did a Google search for said software, curious how they dealt with the whole "the function exists, but it doesn't exist in a file" thing.  I found Project Lombok.  Neat project, full of useful annotations.  The trick they do is changing your IDE to be okay with no real getter/setter. Neat!

I think Java needs to take this project in house and have it be part of the compiler (just like Java is doing with Joda Time, yay!).  In the end it is just space saver for your .java file as the .class would presumably have these methods. However, think of the countless dev hours that you will save with not having to read/write/generate your getters/setters.

I mean, look how much cleaner this code is:  http://projectlombok.org/features/GetterSetter.html.

Thoughts?

Tuesday, June 18, 2013

pushd & popd

If you are ever writing a shell script that has to change the directory but you want to go back to wherever the user was, use pushd & popd. Here is my example case where I wanted to write a shortcut for deploying a portlet to my portal project.
function upDeployPortlet() 
{
  pushd  ~/projects/uPortal/myuw-madison/
  ant deployPortletApp -DportletApp="$@"
  popd
}

New Syntax Highlighter

I came across this syntax highlighter on Eric's Notes (thanks Eric). It works quite well. I am impressed. I added the following to my blog setup:

Thursday, January 3, 2013

To The Cloud!

The League
Oracle is releasing Oracle Database 12c this year.  What does the C stand for, cloud.  There are some interesting features that they are pushing with the latest trend, cloud networks (or private cloud as they called it).  My second favorite feature in 12c is the plug-able databases.  With a cluster setup, you can create a database that lives on some of your nodes.  Technically you can do this now in 11gR2, but now it is more transparent and easier in 12c.

My favorite feature of 12c isn't even part of cloud, but it is when creating a table you can put in a sequence as the default value.  No more row level triggers on insert/update to get a nextval.  Woot!

The "cloud" is the mighty buzzword of the year, and a lot of companies are jumping on board.  It seems to be cost saving (businesses love saving the money), however it does have its downfalls.  You see a lot of redundant cloud based services going down with complete outages, and when the company utilizing the service comes out with a statement, they blame the service provider they are using.  A great example is the latest outage with a popular streaming service utilizing a competitors cloud service (names removed, but google search "Christmas streaming outage" and you will find it).  Is that reasonable?  I'm not sure.  Regardless if it is tagged as "cloud" or "fully redundant" there can still be an outage.  Nothing is that safe, yet.  What the cloud does introduce is dependencies on other companies.

Most of you admins with any experience is shaking there head, yup.  A part of me thinks, we will get there eventually, but we will see.

Tuesday, June 19, 2012

Enterprise Manager 12c

As most of you know Oracle came out with a new major release to there enterprise management software.  This is a major upgrade with a lot of new integration points and features.  The major thing that changed, everything is all-in-one, meaning that you don't need separate EM's for your Weblogic instances, databases, etc...

We knew coming into it that the product would have a couple bugs that we would have to overcome since it is so new to the world. (12.0 patch set 1).

The Setup

I had our hosting guy (thanks dude) setup a 2GB RAM VM with 2 cores.  Oracle recommended 3GB minimum for the OMS home, but we tried with 2 (and later upped to 4gb).  For the OS we went with SentOS 5.5.  We allocated 20GB of storage, of which now its utilizing 13GB.  For the database we just created a SID with catalog/catproc, nothing else.

The Install

It was fairly straight forward, good old ./runInstaller.  An awesome change from the last release, it does the Weblogic install for you (thank you runInstaller programmer guy/girl!).  That was always such a pain to make sure you got the right version, etc...  You basically say, here are my passwords, here is where I want the base home to be, go...

And about 1 hour later (give or take) you have EM (or you don't in my first 2 cases, see "Bugs").

Once the EM was up and running I went to go setup the S/K scripts to automate the startup of the system.  To my surprise the installer did it as part of the install of the root scripts.  I like that feature.

After poking around a bit on the EM front end I decided it was time to install an agent.

The Agent Install

So I went to go download the agent installer for 12c and noticed a clause saying you can't use it to do an install.  That is strange, than what is the point of having the link for the installer?  After reading through the documentation they no longer support agent installs via the command line, sigh...  So I sucked it up and went to the GUI to setup the agent.  I went to add host and noticed my database server's OS was "not available". After some documentation reading I found you have to go download the agent software using the "self update" feature.  In order to do this you have to supply your Oracle Support creds.  After you supply the creds you refresh the available software download list, then find your OS in the list of available agents.  Click download, and then go home for the day because its going to run a job in the background, eventually.

I picked a development database server as my guinea pig and did the GUI install.  It was actually quite awesome.  The install was smooth and it worked on the 1st try*, weird.

* - see bugs ;)

Adding Targets

After the agent was up and running I added the databases, listeners, etc that lived on that database server.  This process was just about the same as it was in the other releases except getting to the setup was a little different.  You have to click, setup -> add target -> add target manually.  You can also setup recon tasks to automatically search for new targets daily/weekly/etc, then you can just review that list on a regular basis.

Bugs

I hit a couple snags during the install process:

1) Hard limit during OMS install.  There is a bug during the Weblogic install that crashes the installer.  The hard limit requirement is 4096, we had to set it to 30000 to get the install to pass, then we dropped it back down after.

2) After the first failure I tried cleaning up the database manually, that didn't go very well :)  I suggest taking a snapshot of your datafiles right before you do the install so if it fails just go back to that version (I used flashback, it worked like a boss).

3)  RAM.  They were not joking about requiring 3GB, i would say it might run on 3GB.  We have 4GB up and its consuming 86% of that so....

4) OMS crash during agent install.  I had the OMS completely crash during my first attempt at the agent install.  Not sure what that is about so I tried again, and it didn't occur.  Not sure if it was related or if it was just a coincidence.

5) Collection error incidents not auto clearing.  After a couple days I noticed my queue of incidents was piling up with collection errors.  Those should auto clear once they have a successful upload.  Blarg.  Having the Oracle support integrated with EM was an awesome idea btw.  I clicked the Oracle support tab and found that it was a bug with EM 12c patch set 1. ha.  Here is the patch id: 13692486.  Note its only an issue with patch set 1.

Cluster Configuration 

If you have Clusterware installed I suggest doing the following:  Install the agent on all nodes in the cluster.  Then from there add a cluster target to identify where the cluster exists.  Then do auto-discovery for the remainder targets.  This way your database instances in the cluster will fall under the cluster and not independent nodes.  In our development environment our clustered databases still showed up as single instances for some weird reason, not sure what that is about, but I'm still in search for a solution.

Features

All the database features that you know and love are still there, and some are improved.  The speed of the system seems better (that might be hardware related tho) when compared to EM 11g.  I really like a the landing pages that they developed.  Its super easy to setup multiple groups and users.

I have yet to install a FMW server on it, but I will have an update soon on those features.

They also added a bunch of dashboards that would be super neat if you have a couple computers setup for such an activity (we do).  It shows basic "UP/DOWN" status, if things are in normal range (I/O, CPU, etc...).  That feature will be really nice for our operations department.

Overall

Get it, its awesome!  If you don't have EM at all I suggest getting it.  It makes life so much better (not necessarily easier).  If you are on EM 10g, I feel bad for you son (you got 99 problems and ... thats about it) .  If you are on EM 11g and looking at 12c saying "is it stable enough?"  I would say, yeah.  I also have only had it installed for about a week so take that with a gran of salt.