-
[Release] Close batches without rollback
Hey guys, I made a shutdown hook to save all your accounts before shutdown:
NO MORE !shutdown!!
Code:
public class MapleShutdownHook extends Thread {
public void run() {
for (ChannelServer cs : ChannelServer.allInstances()) {
for (MapleCharacter chr : cs.getPlayerStorage().getAllCharacters()) {
chr.saveToDB(true);
}
}
}
If you can't use it, then tough luck :sneaky2:
All credits go to me ;)
-
Re: [Release] Close bats without rollback
-
Re: [Release] Close batches without rollback
fyi
Runtime.getRuntime().addShutdownHook(new MapleShutdownHook());
-
Re: [Release] Close batches without rollback
-
Re: [Release] Close batches without rollback
Quote:
Originally Posted by
Traitor
fyi
Runtime.getRuntime().addShutdownHook(new MapleShutdownHook(););
Wrong syntax. =P
-
Re: [Release] Close batches without rollback
Quote:
Originally Posted by
PurpleMadness
Wrong syntax. =P
oh whoops, went right past me that time.
-
Re: [Release] Close batches without rollback
Like 0,5% of RZ knows what to do with this now.
-
Re: [Release] Close batches without rollback
What? You put an extra ';' in your code :P
-
Re: [Release] Close batches without rollback
Quote:
Originally Posted by
Jvlaple
What? You put an extra ';' in your code :P
I noticed that when purplemadness pointed it out.
-
Re: [Release] Close batches without rollback
-
Re: [Release] Close batches without rollback
Thanks for the hook ^^. Now I can finally stop worrying about this -.-.
-
Re: [Release] Close batches without rollback
-
Re: [Release] Close batches without rollback
Quote:
Originally Posted by
PurpleMadness
Like 0,5% of RZ knows what to do with this now.
LOL, why don't you help the leechers?
-
Re: [Release] Close batches without rollback
-
Re: [Release] Close batches without rollback
this is awsome
i hate having to !shutdown
-
Re: [Release] Close batches without rollback
thankyou all! all eyes on me!
-
Re: [Release] Close batches without rollback
-
Re: [Release] Close batches without rollback
-
Re: [Release] Close batches without rollback
i think i figured it out =x
Edit: nvm....
All i know it involves making a new file cause its a 'class'
me newbie java ;D
-
Re: [Release] Close batches without rollback
Where the hell do you put this? See what i mean? You flame other people's releases when your's are even WORSE! You didint even tell us where to put it...
-
Re: [Release] Close batches without rollback
Ya.Where Do we put??wondering.
-
Re: [Release] Close batches without rollback
Lol Jvlaple,most of the ragezoners are too stupid to use this.
-
Re: [Release] Close batches without rollback
Quote:
Originally Posted by
Jvlaple
LOL, why don't you help the leechers?
No one likes them xD, there's a easier way to do this without adding a new thread if Im not being a dumbass?
-
Re: [Release] Close batches without rollback
...screw u
and nice release
-
Re: [Release] Close batches without rollback
No steve, hooks must be a subclass of java.lang.Thread...