After installing OS/2 Warp 4 I never did get round to installing the latest Fixpack15 or the updated gradd display driver. I’ve just been playing around with it this evening though and made some progress.
First, the version I installed had a default UK keyboard layout which got in the way of trying to type any path locations as I couldn’t find where the backslash was 🙂 I fixed this by editing config.sys and changing this line:
I then worked out a way of creating iso disk images of the files I wanted to transfer across, mount them as as CD image in VirtualBox, and then access the files from the OS/2 guest.
On my Mac, I used Disk Utility to create a new disk image with the following settings:
After creating the image it is automatically mounted in Finder. Once done, unmount it, and then from Terminal, convert it to a .iso with:
hdiutil makehybrid -iso -joliet -o [filename].iso [filename].cdr
I got this from this post. I also found this works if you create the first disk image as a Mac DMG image too. I suspect you still need to create it with the correct CD size and FAT format though.
From this point I started working through the steps here, and got FP5 installed ok using the SimplyFix41 utility, and next I’m going to jump up to FP15 and also install the gradd display drivers. Also will be trying out the last version of Netscape for OS/2 and see if that works ok. Fun times!
For storing data when you’re less concerned about relationships between your data but more interested in entities (documents) and their attributes, a document-based datastore like MongoDB makes a lot of sense. MongoDB’s Java Driver API though is rather clunky in it’s usage pattern.
So I started looking for alternatives. The MongoDB Java ecosystem page has a good collection of some libraries to consider. Initially I took a quick look at MongoJack, which looked like an interesting approach to map between Java POJOs to json data representations (using the Jackson api). I remember reading a while back at Morphia, and was interested what a JPA based approach to interacting with MongoDB would look like. Somewhere I stumbled across the Hibernate OGA project – being a fan of ORM approaches popularized by Hibernate, I wanted to take a look.
The current Hibernate OGM docs (4.1) are here.
For deploying on JBoss/WildFly, OGM is supplied as modules in a zip that you can unzip directly into the modules dir on the server. See here more more details.
Deploying to OpenShift, as for most cartridges, your configuration values are defined in environment variables. Instead of hardcoding the properties and values in your persistence.xml, you can have them passed to your server at startup by adding them to a JAVA_OPTS_EXT file like this (do this one time to create the file):
echo "-Dhibernate.ogm.datastore.host=$OPENSHIFT_MONGODB_DB_HOST \
Mapping your Entities and Id properties
At some point support for the ObjectId MongoDB id type was added. In the current docs don’t use the uuid id generator, use the ‘objectid’ type described here instead:
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Type(type = "objectid")
Here’s what my persistence.xml looks like:
if entities not in same jar, list here
Saw this error starting up my JMS queue on WildFly 8.2 running on OpenShift:
2015-01-02 21:03:46,417 WARN [org.hornetq.ra] (default-threads - 1) HQ152005: Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@b1dce2 destination=jms/queue/spot destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method) [rt.jar:1.8.0_05]
Based on this thread, a suggestions was to reduce the JMS thread pool – my current config (possibly carried over from my prior deployment on WildFly 8.1)
<subsystem xmlns="urn:jboss:domain:messaging:2.0"> <hornetq-server>
So based on the recommendation in the linked post above, I set thread-pool-max-size and scheduled-thread-pool-max-size to 20 and this fixed my OutOfMemory issue.
When attempting to deploy an app with a JAX-WS endpoint to WildFly on OpenShift, attempting to hit the ?wsdl url to check the generated wsdl gives this error:
22:49:49,502 ERROR [io.undertow.request] (default task-3) UT005023: Exception handling request to /ExampleEndpoint: javax.xml.ws.WebServiceException: JBWS024032: Cannot obtain endpoint jboss.ws:context=,endpoint=example.endpoint.ExampleEndpoint at org.jboss.wsf.stack.cxf.transport.ServletHelper.initServiceEndpoint(ServletHelper.java:82)
From some Googling, it appears this issue is related to the fact that on OpenShift your app is deployed as the root context and so you need to add a jboss-web.xml to define that your app is deployed at the root context (and not at /ROOT/, since the deployed app is ROOT.war) so your wsdl can be found at the expected url.