Link to home
Start Free TrialLog in
Avatar of Bob Butcher
Bob ButcherFlag for United States of America

asked on

Shutting down JVM on AS400 to apply PTFs

I have several PTFS that can be applied immediately. The problem is when I try and apply them, it doesn't allow me to apply them because the Java Virtual Machine is running and it says to load them, it must be shut down first.

My question is how do I shut down the JVM, how can I tell which users are using it, if any, and how would I restart the necessary jobs to start the JVM back up? I'm not familiar with JVM at all and don't want to miss anything.

Thanks so much in advance.
Avatar of Theo Kouwenhoven
Theo Kouwenhoven
Flag of Netherlands image

Hi Samic400,

the JVM can't be closed, it will be started by calling or using a java program and will be closed automatically  the moment the job ended for V5R2) (or ending the Activationgroupfor V5R1) is ended.
ypu also can use the destroyJVM API to end the JVM.

Regards,
Murph
Avatar of Bob Butcher

ASKER

So how do I know which jobs are currently using the JVM then? Something is using it now because it says so when I try to apply the PTFs.

Also, so I wouldn't need to restart anything once I load the PTFS because it will start automatically, right?

I was thinking the HTTP servers would have to be shut down to prevent future java applications from being started.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
tliotta,

If I end those jobs, will they automatically restart when needed? I really need to load these PTFs immediately, and then restart whatever is required, if I have to, afterwards.

Thanks!

Bob
Avatar of Member_2_276102
Member_2_276102

Added note... come to think of it, I don't think the V5R3 method was available pre-V5R3 since it was added with a PTF. I looked up the PTF for you in case you also need it: SI26616.

Tom
I ran this - call  QSYS/QJVADSPJVM - and it showed me 3 jobs that are using JVM - so that worked fine.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> If I end those jobs, will they automatically restart when needed?

It depends on the job. As Gary noted, names can be overridden, and considerations exist; so, simply knowing a name isn't always enough. I've seen some pretty wild variations.

It's probably true that if you end a job that's using a JVM, a new instance will start later. Server type functions may be most common, and those are what tend to start new instances. But any given job can use Java.

Without knowing your live environment, it may take some Q&A back and forth to be sure about each job.

Tom
> If I end those jobs, will they automatically restart when needed?

Like any other job on the system, it depends entirely on how the application is initiated.  

If it is an ad-hoc report program that is launched from a web page by a user request, then you probably don't need to do anything (except lock users out while you apply PTFs - a good practice anyway.)

If it is a never-ending job that is started by the system start-up program, or a subsystem autostart or prestart job you probably need to restart it manually, or bounce the associated subsystem.

If it is a job that is started by a remote request, then you probably need to shut down the requestor, or disable the request processor while applying PTFs

If it is controlled by a job scheduler, then you may need to manually restart it, or optionally wait for the next scheduler cycle.

It just depends on the job, and your particular system setup.

These are operational procedure that should generally be documented by whoever is responsible for system operations.

It is a good idea to apply PTFs when the system is in a restricted state.  IPL, if needed, or restart your controlling subsystem and the system startup procedure will run, subsystems will start, auto-start jobs and prestart jobs will start, and your scheduler, if any, will start running.  Follow any normal manual system startup procedures that are required in your shop, and life should be good.
 
- Gary Patterson