Ron McLeod

+ Follow
since Feb 12, 2013
Ron likes ...
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
Forum Moderator
Ron McLeod currently moderates these forums:
Richmond, BC, Canada
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
(keep public parts private until JForum day)
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Ron McLeod

Randy Maddocks wrote:The Dutch are phenomenal speed skaters!

Of course they are - according to Katie Couric in the winter the Dutch get practice daily using the frozen canals as their mode of transportation ... 

Katie Couric wrote:It is probably not a news flash to tell you the Dutch are really, really good at speed skating. All but five of the 110 medals they've won have been on the speed skating oval. Now, 'Why are they so good?' you may be asking yourselves. Because skating is an important mode of transportation in a city like Amsterdam which sits at sea level. As you all know, it has lots of canals that can freeze in the winters. So, for as long as those canals have existed, the Dutch have skated on them to get from place to place, to race each other, and also to have fun.

Katie Couric is being mocked for saying the Netherlands dominates speed skating because it's 'an important mode of transportation' in Amsterdam

1 week ago

Vaibhav Gargs wrote:Can a MessageListener exist without a Consumer or vice-versa?

Well .. you could create an instance of a class which implements the MessageListener interface, but if you don't bind it to a consumer it's no going to provide any value.
4 weeks ago
Alex - thanks for your response and the link to your site.

Alex Theedom wrote:The producer methods are not necessary as the two POJOs (Example and OtherExample) are CDI managed beans and therefore if annotated with the respective qualifiers (@TestModeSelector(TestMode.QA) and @TestModeSelector(TestMode.PROD)) would be injected into the ExampleTest class.

Yes - that is what I missed in the first attempt.  I was just thinking POJO, when in-fact is was a managed bean.

Alex Theedom wrote:Have you considered the use of alternatives by using the @Alternative annotation. It allows you to switch between alternative implementations. Have a look at this article I wrote Using @Alternative in CDI application, perhaps this way works better for you. Now you only have one injection point and no producers.

Using a QA vs. PROD example probably wasn't best.  For my actual use, I want to be able to inject many instances, but with some different initializations.  @Alternate / @Default would probably be good if I did want to either use one type or the other, but it is not a good fit for what I am trying to day.  Besides I don't want to have to configure anything beans.xml file if I can avoid it.

This where I am now with the proof-of-concept (other files unchanged):

Rob Spoor wrote:Lines 9 and 16 of your producer create simple POJOs. Whenever you use new to create instances, no injection takes place. You could try using CDI.current().select(Example.class).get(), but I'm afraid that will just cause recursion to your @Produces methods.

Thanks for you help - I am most of the way there now.

I ended-up creating two subclasses of Example: QaExample and ProdExample, and then injected the the appropriate subclass based on the TestModeSelector qualifer.

I also made the TestModeSelector non-binding and defined a default, changed the annotation for the the producer methods to not include argument (allowing me to have a single method), and then check the value of the TestModeSelector to inject the corresponding subclass.

The next step is to remove the subclasses, inject Example again, and use reflection to set the value of the TestMode.

There are a few issues with this block of code:

 -  Your compiler should have complained with something like: randomNumber cannot be resolved to a variable.  That would be because you declared the variable randomNumber inside the for loop and is out of scope where you are trying to use it.

 -  In your for loop, you are setting the initial value of i to 0, testing that it is less than 3 for each iteration, but not changing the value of i.  This loop will never terminate.

 -  The loop doesn't seem to server any purpose.  What is your intention?

1 month ago

tangara goh wrote:...  and what does 1074 means?

The last number (1074, 13656, 1108, etc.) looks like the size of the payload (and a value of - must inidcate no payload).

tangara goh wrote: - - [22/Jan/2018:13:33:10 +0800] "GET / HTTP/1.1" 404 1074
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/tutorRegister.jsp HTTP/1.1" 200 13656
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/BootStrap/Checkbox.js HTTP/1.1" 404 1108
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/BootStrap/bootstrap-multiselect.js HTTP/1.1" 404 1121
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/js/bootstrap.min.js HTTP/1.1" 404 1106
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/js/jquery.js HTTP/1.1" 404 1099
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/js/jqBootstrapValidation.js HTTP/1.1" 404 1114
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/js/contact_me.js HTTP/1.1" 404 1103
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:33:15 +0800] "GET /Hi5S/Image/aa1.png HTTP/1.1" 404 1100
0:0:0:0:0:0:0:1 - - [22/Jan/2018:13:34:33 +0800] "POST /Hi5S/addTutor HTTP/1.1" 200 - - - [22/Jan/2018:13:35:29 +0800] "GET / HTTP/1.1" 404 1074 - - [22/Jan/2018:13:35:54 +0800] "GET / HTTP/1.1" 404 1074 - - [22/Jan/2018:13:36:16 +0800] "GET / HTTP/1.1" 404 1074

1 month ago
I am working with TomEE and OpenEJB.  I am able to inject a POJO using using @Inject, and have the object's own DI injected as well (in my example @PersistenceContext(unitName = "rcma") private EntityManager em;).

However, I want to be able initialize the injected POJO based on some provided information (in my example the value of TestMode).  I have this working by using @Produces and providing a @Qualifier, and the instances being injected do have the value for TestMode set according to the @TestModeSelector annotation, but I am finding that the injected POJOs own injections are not being done (fails the last assertion in the test case).  I also don't like thatt I need to have two methods in my producer - one for QA and one for PROD.

Two Three questions:
 -   How I can get the POJO's injected make when injecting using @Produces?
 -   How can I just have a single method in my producer?
 -   Is there a better way to do this?

Example classOtherExample classTestMode enum@TestMode qualifier annotationExampleProducer producer classExampleTest Junit test
The listener provides an asynchronous method for the consumer to receive messages instead of using the blocking MessageConsumer#receive method to receive a message.

After registering a MessageListener, the MessageListener#onMessage method will be called whenever a message is available from the queue.
1 month ago
It could be that the video card is set for a refresh rate that the monitor can't support.

What is the make/model of monitor and video card?  What operating system?
1 month ago
Can you give examples of the name-based and IP-based URLs that behave differently?

Tony Docherty wrote:Have you tried changing the default font (Preferences → General → Appearance → Colors and fonts → Basic/Text Font) to a standard font to see if the problem still occurs.

Thanks - that helped.  It looks like it is not an Eclipse problem, but something to do with my platform - specifically with the Sans font.  I went through the list and changed anything which used Sans (Banner, Header, etc.) to a similar looking font and all is well now.

1 month ago
I've just setup a new development box with RHEL 7.4 and Eclipse Oxygen.2, and accessing it using mobaXterm 8.6.  Things are working well except that in Eclipse certain headings are displayed with a Gothic-type font.  I've gone to Preferences and tried to change it, but I can find any setting referencing this particular font.

Any suggestions?

1 month ago
Full Stack Software Developer (Java)
Star Solutions International - Richmond, BC
Star Solutions is a leading supplier of unique IP based wireless mobile solutions. Star Solutions offers end-to-end network infrastructure solutions for Rural, Enterprise and Emergency Communications applications and markets. We are looking for a Full Stack Software Developer (Java) to join our team.

  •  Participate in requirements analysis, high level design
  •  Participate in detail design, implementation, unit testing and system integration activities
  •  Identifies, analyzes and resolves software issues to meet quality targets
  •  Collaborates with architects and other functional groups to come up with solution proposals
  •  Works with project managers to establish project schedules and deliverables
  •  Provides technical support to other functional groups such as Product Management, Sales, Engineering, Verification and Technical Writing
  •  Complies with established development guidelines and standards
  •  Follows workplace operating and environmental, health and safety procedures and guidelines

  •  Degree in Computer Science, Computer Engineering, or related discipline
  •  Proficient in Java and OO (UML) design methodology
  •  Experience with Java EE including Servlets, EJB, CDI, JSP, JMS, JAX-RS, JDBC, JNDI
  •  Experience with Java EE and application servers such as Tomcat and JBoss/Wildfly
  •  Experience in Single Page Application development using Angular 4
  •  Experience with Javascript/Typescript, CSS
  •  Experience with RESTful API development and implementation
  •  Experience with Android application development a bonus
  •  Familiar with Java EE technologies such as JPA, JSF, JTA, Reflections, Annotations
  •  Familiar with MySQL, BDB, CORBA, RMI, SNMP, XML, XSD, XSLT, Design Patterns
  •  Familiar with shell script, perl, python languages
  •  Familiar with Unix and Linux Systems
  •  Familiar with Client/Server architectures
  •  Familiar with UML
  •  Ability to work under pressure to meet project deadlines
  •  Ability to work independently
  •  Good written and verbal communication skills

If you are interested in applying for this position, please submit your resume and cover letter to (do not reply to this thread).

This is a full-time position at our office is Richmond, BC, Canada (no remote workers).  Candidates must be legally eligible to work in Canada.  The company will not cover any expenses for relocation.
2 months ago
I've seen PKIX path building failed being caused by anti-virus applications that generate fake certificates to allow inspection of TLS traffic.  If you have an anti-virus application running, try disabling it and see if that helps.
4 months ago
Out of the free editors/IDEs, I'd first recommend Microsoft's VS Code, and then maybe Adobe's Brackets.  If you are an IntelliJ fan, JetBrain's WebStorm looks quite good, but it is not free (although I think there is a free offering for bona fide students).
4 months ago