immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2015-08-31T12:27:32.000014Z

@rauh: that shouldn't throw - what version of Immutant is this?

rauh 2015-08-31T12:27:47.000015Z

@tcrawley: 2.0.2

2015-08-31T12:28:13.000016Z

can you gist lein deps :tree for me?

2015-08-31T12:28:43.000017Z

and the full stacktrace?

2015-08-31T12:34:26.000019Z

do you explicitly have org.immutant/wildfly in your dependencies? that should only be loaded when you are in-container, and is added to the war automatically by lein immutant war. It expects classes from the container to be available, so will throw if loaded outside the container

2015-08-31T12:35:49.000020Z

in-cluster? tries to load immutant.wildfly if it is available so it can call immutant.wildfly/in-cluster?, but will return false if that ns isn't available

rauh 2015-08-31T12:36:11.000021Z

Yes I do. I'll remove it then.

2015-08-31T12:37:12.000022Z

Maybe we should wrap the ns in a guard that prevents it from even trying to load outside of the container

2015-08-31T12:37:16.000023Z

I'll see what that would take

rauh 2015-08-31T12:37:47.000024Z

How do I use the namespace immutant.wildfly then?

rauh 2015-08-31T12:37:54.000025Z

I can't require it if I remove the dep

rauh 2015-08-31T12:39:49.000026Z

Would I manually have to (when (util/in-cluster?) (require 'immutant.wildfly))?

2015-08-31T12:40:57.000028Z

are you using functions from immutant.wildfly?

rauh 2015-08-31T12:41:30.000029Z

Not right now, I'm just evaluating and playing around

rauh 2015-08-31T12:42:06.000030Z

I have no expierence with Wildfly/jBoss

rauh 2015-08-31T12:42:30.000031Z

I just wonder how I'd start multiple deployments and how I can have them configured differently (same app).

2015-08-31T12:42:42.000032Z

you shouldn't ever need to call fns from immutant.wildfly directly - the useful ones have versions in immutant.util that wrap them with checks to make sure the ns is available, so you can pretty much safely ignore immutant.wildfly

rauh 2015-08-31T12:43:12.000033Z

I see.

2015-08-31T12:44:08.000034Z

it might be tricky to have the exact same war file deployed multiple times with different configs, since there would be no good way for each deployment to know who it is

2015-08-31T12:44:57.000035Z

actually, you may be able to have the deployment figure out the context path it is on (those have to be unique), and it could use that information to load a config file off a known location on disk

2015-08-31T12:45:22.000036Z

let me see if we expose that

rauh 2015-08-31T12:45:25.000037Z

Yeah that's what I'm starting to realize. I started up Wildfly management console and there is no way to set any parameters of any kind for a deployment. I though i could set a few config files on the web interface and say "this one is development" and "this one is production" and they listen on different ports

rauh 2015-08-31T12:46:53.000038Z

The problem I'm wondering; If i have a new version of my app, and I want zero downtime (thus not shutting down the currently running app), I'd like to start up a new version (on a differnt port or different Vhost) and switch over my front end load balancer. If the error rate goes up or something doesn't work. I switch it back to the old (still running) version of the app

2015-08-31T12:47:00.000039Z

another option is to build a different war for each deployment, using profiles to set the config for each

rauh 2015-08-31T12:47:21.000040Z

How is somethign like this done in the Wildfly world?

2015-08-31T12:47:48.000041Z

that's generally done with multiple wildfly instances, I believe

rauh 2015-08-31T12:48:21.000042Z

Hmm I see, but they'll start all subsystems like a different messaging queue etc, no?

2015-08-31T12:48:58.000043Z

not if they are clustered, they will then share messaging

rauh 2015-08-31T12:49:35.000044Z

Ok I see, I'll def have to do some more reading on this.

rauh 2015-08-31T12:49:39.000045Z

Thanks for your help

2015-08-31T12:52:02.000046Z

my pleasure! let me know if you have any other questions/issues