Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

2018 has been an eventful year. Between some major accomplishments at work, getting engaged, starting a new website and decommissioning a blogumentary I've been working on, I was able to grow Igor's Blog with a good collection of popular and informative content. So now it's coming towards the end of the year and I thought that I need to do a roundup article and then take a break until 2019. Next year will also see changes in posting frequency and style as I reshuffle some of my priorities, more on that later.

First lets see what Google Analytics tells us about traffic. In 2018 I had around 500k page views, which is up by around 40% from the previous year's figure of 350k. There were a few outstanding articles that contributed towards that increase. The month-by-month difference wasn't as extreme, but still showed a good amount of growth. This is a really good result considering that the posting frequency was almost halved between those two years. Overall I am happy with the increase in readership.
2018stats.png


So more people are reading, that's great, but what have been the developments to drive it? Well this year I was approached by Fascinations/Metal Earth to start reviewing their kits. These posts saw a good amount of popularity throughout the year and I intend to continue publishing more reviews in the future. I've also stepped up the amount of articles I wrote about WebLogic and Programming in general. Even though I write more articles about Java, my dabbling with JavaScript hasn't gone unnoticed. The articles on GameBoy and Neo Geo Pocket, as well as other sorts of modding were quite popular too.

It's been a mixed bag of new content, as usual, but I think the critical factor to the growth in readers can also be attributed to me starting to share what I write on Hacker News. Some articles were so widely shared that my server went down a few times over the year! I know this is an issue in the Blog software I'm using and is something I plan to address over the holiday season - there'll be an article on that in 2019!

Lets talk have a look at which articles have been the most popular this year. I didn't know my readers were so into Penny-Farthing model kits, but for some reason Riding Tall - Metal Earth Penny-Farthing Kit got thousands of views. The extremely popular post, My Amazon Interview Horror Story was widely read and shared. I was a little apprehensive about sharing this experience, but having seen how many people commented that they had the same bad experience with Amazon, I'm glad I did. Then my description of the method of data storage I used over at Atari Gamer received quite a lot of attention - Hijacking HTML canvas and PNG images to store arbitrary text data. Every single modding article I wrote was up there too - Hacking the HBQ-i7 TWS wireless headphones to make a Stereo Bluetooth Receiver, Adding a Back Light to a Neo Geo Pocket (not Color) and Modding a Neo Geo Pocket Color with a Game Boy SP Front Light.

Continue reading...  

,

Connect and read timeout settings for webservice clients are not standardised across different versions of the JDK, nor the application containers like WebLogic, JBoss, Glassfish, etc. So when it comes to setting these values correctly for your specific environment, you can get stuck in a cycle of trying all known properties until one works. This is what I had to do recently.

There actually is an Oracle Support Note that talks about this - How to set Timeout for Weblogic Webservice Client(jaxws and jaxrpc) (Doc ID 1056121.1). This note is a little old and references some JAR files that no longer exist, so I didn't quite get the answer I was looking for here but it set me on the right path.

Lets see what the documented portable way of setting timeouts is... You need to cast your port object to a BindingProvider and then retrieve the request context, which is a Java Map of key/value pairs. Then, you set the connect and read timeout properties to whatever values you wish to use - this is specified in milliseconds. For example...
 Java
Map requestContext = ((BindingProvider) port).getRequestContext();
requestContext.put(JAXWSProperties.CONNECT_TIMEOUT, 30000);
requestContext.put(JAXWSProperties.REQUEST_TIMEOUT, 30000);


Seems simple, right? Well it is, however it all depends on which JAXWSProperties class you import, which JDK you have and which application server you are running. This is where it gets difficult. I found that using the portable approach by setting properties from constant field values was not the best case. Due to the myriad of different property names out there that the same constant fields defined, I opted to use literal strings instead that I knew would work with WebLogic 12c...
 Java
Map requestContext = ((BindingProvider) port).getRequestContext();
requestContext.put("com.sun.xml.ws.connect.timeout", 30000);
requestContext.put("com.sun.xml.ws.request.timeout", 30000);


That worked like a charm. I know it's not the cleanest way to do it, but it works very well in this case.

Continue reading...  

, , ,

There's no better way to commemorate the InSight Mars Lander touching down on the planet Mars this week than with a flashback to NASA's earlier missions and building the Mars Rover kit from Metal Earth 3D. This kit comes from the aviation line of models, which also includes a number of other spacecraft, jets, rockets, satellites, and many forms of aircraft.

The end result is truely out of this world...
IMG_1432.jpg


This is a two sheet model and boy does it have detail! This has been one of the more complicated kits to build just due to the sheer number of surface details included on the rover. Almost every etched feature has a 3D version, then there are the various instruments, the suspension system and wheels.

IMG_1415.jpg IMG_1416.jpg


The build started off with the rover body. This is essentially a box, but it has a fair amount of additional features added to almost all of its sides.

IMG_1417.jpg IMG_1418.jpg


Continue reading...  

, ,

During the last couple of weeks I wrote about building a WS-AtomicTransaction participant webservice and then consequently how to invoke it with a JAX-WS proxy. This article takes a look at the errors that can be encountered when developing WS-AtomicTransaction enabled services with WebLogic. This of course isn't a complete list and I'll add more here as I encounter them.

Remember, that both the participating (wsgen_jaxws_wsat_example) and coordinating (wsgen_jaxws_wsat_call_example) service example projects can be found over at GitHub here - https://github.com/ikromin/misc/tree/master/j2ee.

WS-AtomicTransaction Support not Enabled

Lets get started with the very obvious. What happens if you forget to enable WS-AT on your WebLogic Domain? Well, you get errors like this in the WebLogic logs...
 Errors
Nov 15, 2018 8:25:10 PM weblogic.wsee.WseeCoreMessages errorLogException
SEVERE: Error while invoking endpoint http://127.0.0.1:7001/wls-wsat/RegistrationPortTypeRPC11 from client; ServiceName: {http://docs.oasis-open.org/ws-tx/wscoor/2006/06}RegistrationService_V11 ; PortName: {http://docs.oasis-open.org/ws-tx/wscoor/2006/06}RegistrationCoordinatorPort ; Client side features: [com.sun.xml.ws.api.addressing.OneWayFeature][javax.xml.ws.soap.AddressingFeature][weblogic.jws.jaxws.client.ClientIdentityFeature]; Client side policies:
<15/11/2018 8:25:10,034 PM AEDT> <Error> <Default> <BEA-000000> <Error while invoking endpoint http://127.0.0.1:7001/wls-wsat/RegistrationPortTypeRPC11 from client; ServiceName: {http://docs.oasis-open.org/ws-tx/wscoor/2006/06}RegistrationService_V11 ; PortName: {http://docs.oasis-open.org/ws-tx/wscoor/2006/06}RegistrationCoordinatorPort ; Client side features: [com.sun.xml.ws.api.addressing.OneWayFeature][javax.xml.ws.soap.AddressingFeature][weblogic.jws.jaxws.client.ClientIdentityFeature]; Client side policies: >
Nov 15, 2018 8:25:10 PM weblogic.wsee.WseeCoreMessages errorLogException
SEVERE: Error while invoking endpoint http://127.0.0.1:7001/WsAtExample-1.0/WsAtExample from client; ServiceName: {http://igorkromin.net/wsat/participant}WsAtExampleService ; PortName: {http://igorkromin.net/wsat/participant}WsAtExamplePort ; Client side features: [weblogic.wsee.wstx.wsat.TransactionalFeature][weblogic.jws.jaxws.client.ClientIdentityFeature]; Client side policies:
<15/11/2018 8:25:10,038 PM AEDT> <Error> <Default> <BEA-000000> <Error while invoking endpoint http://127.0.0.1:7001/WsAtExample-1.0/WsAtExample from client; ServiceName: {http://igorkromin.net/wsat/participant}WsAtExampleService ; PortName: {http://igorkromin.net/wsat/participant}WsAtExamplePort ; Client side features: [weblogic.wsee.wstx.wsat.TransactionalFeature][weblogic.jws.jaxws.client.ClientIdentityFeature]; Client side policies: >


The most interesting part of these messages is that the "http://127.0.0.1:7001/wls-wsat/RegistrationPortTypeRPC11" URL is not reachable, that's because the backend services that handle WS-AT registration and coordination haven't been deployed. To deploy them all you need to do is run some WLST. Offline mode mode is the easiest way to do it i.e. shut down your WebLogic first, run these commands and then start WebLogic. Using the same example I used in the previous two articles, with WebLogic dev server 12.2.1.3 installed in /Applications/devtools/wls_12.2.1.3, I first started WLST and then ran the following commands...
 WLST
readDomain('/Applications/devtools/wls_12.2.1.3/user_projects/domains/base_domain')
create('ofs','OptionalFeatureDeployment')
cd('OptionalFeatureDeployment/ofs')
create('WSAT', 'OptionalFeature')
cd('OptionalFeature/WSAT')
set('Enabled',true)
updateDomain()
closeDomain()
exit()


You could also choose to create your domain with the 'WebLogic Advanced Web Services for JAX-WS Extension' which will enable WS-AT support for you. Whichever way you go about enabling this support, after this step both the coordinating and participating services should work.

Continue reading...  

, , , , , ,