Openfire server

Can i use my online webhosting database for openfire so that the server is continuously running ? and if i can, how ?

Dont think so. Webhosting in general is just a place to keep data (html, php, sql, etc.). You can’t run applications in there. Openfire is an application. So you need a virtual dedicated server (VPS, VDS, whatever they call this), with operating system and ability to install apps (you’ll need to install java also).