Peter Rooke

+ Follow
since Oct 21, 2004
Peter likes ...
IntelliJ IDE Java Linux Mac OS X Oracle Redhat Spring Tomcat Server VI Editor
Newcastle Upon Tyne, England, United Kingdom
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Peter Rooke

Oak, Sparkler, Pumpkin, Abigail, Brutus, Chelsea, Playground, Cricket, Kestrel, Ladybird, Merlin, Hopper, Mantis, Tiger, Mustang, Dolphin, Spider.  
Seems that major releases were (mostly) named after animals/birds and minor bugfixes after [bug eating] insects.    
4 days ago

Are you telling me that “Yes, Minister” was fictional?

Sadly it seems to be the way in which Government operates;
"Humphrey is a master of obfuscation and manipulation, baffling his opponents with long-winded technical jargon and circumlocutions, strategically appointing allies to supposedly impartial boards, and setting up interdepartmental committees to smother his minister's proposals in red tape."  [Wiki].
2 weeks ago
Just filled out a local government questionnaire, when it seemed they were trying to use emotive language and specific questions to get the result they required!
The political satire Leading Questions - Yes Prime Minister seems to sum up this perfectly!
2 weeks ago
I don't recall when I first started using a personal mobile phone, but it was some sort of Motorola brick.

However, I do recall my first (and last) company phone, a BlackBerry 7230.  Did think it was kind of cool being able to use emails and text messages anywhere at anytime, but it soon became a burden.  Head office would often send out messages and want an instance reponse, issue was that they were in America and we were in the UK.      
3 weeks ago
I'm guessing you could first start looking at log files.  

WebLogic managed servers, which I assume you are referring to as nodes, writes to a log every time it receives traffic.  I'm assuming you're sending HTTP traffic to the managed servers?    

Its' also possible to enable logging on the Apache server if you are using the wls_mod plugin, don't recall the syntax but I have used these logs before when doing failover testing.  

WebLogic HTTP access logs

3 weeks ago
Not to forget this gem from a few years back;

I should not comment however, having one of the most incomprehensible dialects / accents of the British Isles (maybe world!) ;-)
1 month ago
Do you know of the spring boot starter guides, which show small projects featuring the different technologies that spring boot can use.

There just happens to be a small project showing a "Hello, World" REST service being implemented --> Spring Boot Starter Rest Service

You could then compare in order to work out what is wrong with your project.
1 month ago
Just reading this and recalling some previous projects!  
EJB entity beans using CMP meshed in with all those J2EE design patterns    
I do think Sun made a mistake of continuing to use the Enterprise Java Beans name with the improved version 3.  

Here's a few humorous posts highlighting some of the "features" of these older technologies;

2004 A Workspace Odyssey (EJB2 CMP)
Totally Gridbag (GUI Swing)
S Stands For Simple (SOAP)
3 months ago
Just put together the exam topics in text format (taken from the oracle website);

Java SE 11 Programmer I | 1Z0-815

Understanding Java Technology  and environment
--> Describe Java Technology and the Java development environment
--> Identify key features of the Java language

Working With Java Primitive Data Types and String APIs
--> Declare and initialize variables (including casting and promoting primitive data types)
--> Identify the scope of variables
--> Use local variable type inference
--> Create and manipulate Strings
--> Manipulate data using the StringBuilder class and its methods

Working with Java Arrays
--> Declare, instantiate, initialize and use a one-dimensional array
--> Declare, instantiate, initialize and use two-dimensional array

Creating and Using Methods
--> Create methods and constructors with arguments and return values
--> Create and invoke overloaded methods
--> Apply the static keyword to methods and fields

Reusing Implementations Through Inheritance
--> Create and use subclasses and superclasses
--> Create and extend abstract classes
--> Enable polymorphism by overriding methods
--> Utilize polymorphism to cast and call methods, differentiating object type versus reference type
--> Distinguish overloading, overriding, and hiding

Handling Exceptions
--> Describe the advantages of Exception handling and differentiate among checked exceptions, unchecked exceptions, and Errors
--> Create a try-catch block and determine how exceptions alter normal program flow
--> Create and invoke a method that throws an exception

Creating a Simple Java Program
--> Create an executable Java program with a main class
--> Compile and run a Java program from the command line
--> Create and import packages

Using Operators and Decision Constructs
--> Use Java operators including the use of parenthesis to override operator precedence
--> Use Java control statements including if, if/else, if/elseif, switch , break and continue statements
--> Create and use do/while loops, while loop, and for looping statements including nested loops
--> Describing Objects and Classes

Declare and instantiate Java objects, and explain objects' lifecycles (including creation, dereferencing by reassignment, and garbage collection)
--> Define the structure of a Java class
--> Read or write to object fields

Applying Encapsulation
--> Apply access modifiers
--> Apply encapsulation principles to a class

Programming Abstractly Through Interfaces
--> Create and implement interfaces
--> Distinguish class inheritance from interface inheritance including abstract classes
--> Declare and use List and ArrayList instances
--> Understanding Lambda Expressions

Understanding Modules
--> Describe the Modular JDK
--> Declare modules and enable access between modules
--> Describe how a modular project is compiled and run

Java SE 11 Programmer II | 1Z0-816

Java Fundamentals
--> Create and use final classes
--> Create and use inner, nested and anonymous classes
--> Create and use enumerations

Java Interfaces
--> Create and use interfaces with default methods
--> Create and use interfaces with private methods

Functional Interface and Lambda Expressions
--> Define and write functional interfaces
--> Create and use lambda expressions including statement lambdas,local-variable for lambda parameters

Built-in Functional Interfaces
--> Use interfaces from java.util.function package
--> Use core functional interfaces including Predicate, Consumer, Function and Supplier
--> Use primitive and binary variations of base interfaces of java.util,function package

Migration to a Modular Application
--> Migrate the application developed using a Java version prior to SE 9 to SE 11 including top-down and bottom-up migration,
splitting a Java SE 8 application into modules for migration
--> Run a modulaized application on classpath and on modulepath
--> Use jdeps to determine dependencies and identify way to address the cyclic dependencies

--> Create worker threads using Runnable, Callable and use an ExecutorService to concurrently execute tasks
--> Use java util concurrent collections and classes including CyclicBarrier and CopyOnWriteArrayList
--> Write thread-safe code
--> Identify threading problems such as deadlocks and livelocks

I/O (Fundamentals and NIO2)
--> Read data from and write console and file data using I/O streams
--> Use I/O Streams to read and write files
--> Read and write objects by using serialization
--> Use Path interface to operate on file and directory paths
--> Use Files class to check, delete, copy or move a file or directory
--> Use Stream API with Files

Database Applications with JDBC
--> Connect to databases using JDBC URLs and DriverManager
--> Use PreparedStatement to perform CRUD operations
--> Use PreparedStatement and CallableStatement APIs to perform database operations

--> Describe the purpose of annotations and typical usage patterns
--> Apply annotations to classes and methods
--> Describe commonly used annotations in the JDK
--> Declare custom annotations

Exception Handling and Assertions
--> Use try-with-resources construct
--> Create and use custom exception classes
--> Test invariants by using assertions

Generics and Collections
--> Use wrapper classes, auto-boxing and auto-unboxing
--> Create and use generic classes, methods with diamond notation and wildcards
--> Describe Collections Framework and use key collection interfaces
--> Use Comparator and Comparable interfaces
--> Create and use convenience methods for collections

Java Stream API
--> Describe the Stream interface and pipelines
--> Use Lambda expressions and method references

Lambda Operations on Streams
--> Extract stream data using map, peek and flatMap methods
--> Search stream data using search findFirst, findAny, anyMatch, allMatch and noneMatch methods
--> Use Optional class
--> Perform calculations using count, max, min, average and sum stream operations
--> Sort a collection using lambda expressions
--> Use Collectors with streams, including the groupingBy and partitioningBy operation

Services in a Modular Application
--> Describe the components of Services including directives
--> Design a service type, load services using ServiceLoader, check for dependencies of the services including consumer and provider modules
--> Compare abstract classes with interfaces

Parallel Streams
--> Develop the code that use parallel streams
--> Implement decomposition and reduction with streams

Secure Coding in Java SE Application
--> Prevent Denial of Service in Java applications
--> Secure confidential information in Java application
--> Implement Data integrity guidelines- injections and inclusion and input validation
--> Prevent external attack of the code by limiting Accessibility and Extensibility, properly handling input validation, and mutablity
--> Secure constructing sensitive objects
--> Secure Serialization and Deserialization

--> Use Locale class
--> Use resource bundles
--> Format messages, dates, and numbers with Java
Don't worry - the thing is we are all constantly learning, that seems to be the deal as technologies are always evolving.

As for Spring - don't worry about XML configuration as that way of configuration is now old and the preferred method of configuration is either Java Configuration or / and component scanning.  

For learning I'll start with the core spring documentation, which was always quite good Spring Core

I do think that using spring adds some extra complexity to any project, but the real win is in later stages when code is more maintainable.  Some of us remember before spring and when we had J2EE enterprise java beans [2] which were just horrific ;-)  
3 months ago
Hi all, just an recommendation for a podcast that I've listened to for a few years.

Software Defined Talk

- normal topics include; kubernetes, serverless, cloud, devops, coding, software development, languages, agile, business strategy, and of course general stuff (weather/food/drink/travel), mixed up with some comedy.  

3 months ago
Just to add; (IMHO) from a high level the overall objective of Spring is to improve system design for better quality and maintainability.  
The aim is to allow as much as possible, a flexible, customisable framework in which developers can focus on the business domain logic (in plain old java classes [pojo]) rather than having to deal with all the software infrastructure complexities.  The framework uses DI (or IoC) to reduce coupling (reduce the fixed ties between parts of the system), and also increase cohesion (classes / methods do one thing).  DI has been discussed above.  

3 months ago
Docker containers would also be another option Setting up Kali Linux in Docker on Windows 10 [Micro$wipe]

Kali is a bit of a specialist linux distribution, really aimed at penetration testers.  
4 months ago
Hi, of your using bash then the following two commands placed at the top of the script will help

Then when you run the script it will;
  - set -v Display the shell input lines as they are read
  - set -x Display the commands and their arguments as they are executed

As for logging, I've just recently inherited a load of shell scripts (at work) which I did not like much.  So I've added logging and have been trying to add testing code using the bats (bash automated testing system).  The testing code is quite tricky and is work in progress ;-)

However since I've opted to write my own simple logging function, I've taken out the product specific parts and it can be seen below.  Works on Red Hat Linux, I tried on my Mac and seen a lot of date function errors.

Here's the code;

And here is an example of how to use;

I may put this into a git hub repository, time permitting.  
4 months ago