When do commuting Hamiltonian flows have commuting generators? Let $(P,\Omega)$ be a symplectic manifold, and let $[\cdot,\cdot]$ be the natural Poisson bracket. Let $\varphi^h(a)$ be the Hamiltonian flow generated by the smooth function $h:P\rightarrow\mathbb{R}$, and let $\varphi^g(b)$ be the Hamiltonian flow generated by the smooth function $g:P\rightarrow\mathbb{R}$.
Suppose the two flows commute, $\varphi^g(b)\varphi^h(a) = \varphi^h(a)\varphi^g(b)$. Are there interesting circumstances under which it follows that the generators commute as well, $[g,h]=0$?
I know that the flows commuting implies that $[g,h]=k$ for some constant $k$; a reference for the proof of this can be found, for example, in Arnold's (1989) Mathematical Methods of classical mechanics, pg. 218 Cor. 9. It is also easy to show that if $[g,h]=0$, then $\varphi^g(b)\varphi^h(a) = \varphi^h(a)\varphi^g(b)$. But under what circumstances does the converse hold?
It's interesting that in quantum mechanics, the analogous relations hold in both directions. That is, if $G$ and $H$ are linear self-adjoint operators on a Hilbert space, and if $e^{ibG}$ and $e^{iaH}$ are the continuous one-parameter unitary groups they generate, then $e^{ibG}e^{iaH}=e^{iaH}e^{ibG}$ if and only if $[H,G]=0$ (where now $[\cdot,\cdot]$ is the commutator bracket).
 A: This is not so much an answer as a suggestion to change the question. When $(P,\Omega)$ is prequantizable, i.e. there exists over $P$ a hermitian line bundle with connection  $(L,\nabla)$ having curvature $\Omega$ (see e.g. Kostant 1970), then your hamiltonian vector fields $X^g, X^h$ and their flows $\varphi^g, \varphi^h$ lift canonically to $\nabla$-preserving vector fields $\xi^g, \xi^h$ and flows $\psi^g, \psi^h$ on $L$. These commute if and only if $[g,h]=0$.
That, I believe, is the correct "classical analogue" of the quantum facts you allude to.
Conversely, the true quantum analogue of looking at $\varphi^g, \varphi^h$ is looking at the action of $e^{ibG}, e^{iaH}$ not on Hilbert space $\mathcal{H}$ but on projectivized Hilbert space $\mathbb{P}\mathcal{H}$. There they commute iff (disregarding the usual domain questions) $[G,H]$ is a constant multiple of the identity.
In fact the analogy is good enough that $\mathbb{P}\mathcal{H}$ is a (usually infinite-dimensional) symplectic manifold, to which the first paragraph above applies, with $g, h$ the expectation values of $G, H$ and $L^\times \to P$ the tautological projection $\mathcal{H}\setminus\lbrace0\rbrace\to \mathbb{P}\mathcal{H}$. Moreover $\xi^h$ and $\psi^h(a)$ are just $H$ and $e^{iaH}$ (acting on $\mathcal{H}\setminus\lbrace0\rbrace$) -- so we've come full circle.
[P.S.: Regarding functions whose Poisson brackets are constant, you might be interested in this paper of Roels and Weinstein.]

Update regarding your extra question ("Isn't $e^{ibG}e^{iaH}=e^{iaH}e^{ibG}\Leftrightarrow[G,H]=0$ also true on $\mathbb{P}\mathcal{H}$?"): This is a statement about transformations of $\mathcal{H}$, not $\mathbb{P}\mathcal{H}$. Write $\underline{e^{iaH}}$ for the diffeo of $\mathbb{P}\mathcal{H}$ induced by $e^{iaH}\in\mathrm{U}(\mathcal{H})$, and likewise $\underline{iH}$ for the vector field on $\mathbb{P}\mathcal{H}$ induced by $iH\in\mathrm{End}(\mathcal{H})$. Then (exercise!) $e^{iaH}\mapsto\underline{e^{iaH}}$ is a group morphism with kernel the multiples of the identity, and likewise $iH\mapsto\underline{iH}$ is a Lie algebra morphism with kernel the multiples of the identity. Therefore we have
\begin{array}{cccl}
\underline{e^{ibG}}.\underline{e^{iaH}}=\underline{e^{iaH}}.\underline{e^{ibG}} & \Leftrightarrow & [\underline{iG},\underline{iH}]=0 &\text{(actions on }\mathbb{P}\mathcal{H})\\\
\Updownarrow &   & \Updownarrow\\\
e^{ibG}e^{iaH}e^{-ibG}e^{-iaH}\in\mathbb{C}\cdot\mathbf{1} & \Leftrightarrow & [iG,iH]\in\mathbb{C}\cdot\mathbf{1} & \text{(actions on }\mathcal{H})
\end{array}
and my claim is that these, not $[G,H]=0$, are the quantum analogs of $\varphi^g(b)\varphi^h(a)=\varphi^h(a)\varphi^g(b)$.
A: A rather silly but perhaps useful necessary condition to get $[h, g] = 0$
is that the Hamiltonian vector fields $X_h, X_g$ span an {\it isotropic} two-plane:
one on which the symplectic form vanishes.  This is obvious from the connection
between the symplectic form and the brackets.  To see what goes wrong
just take ${\mathbb R}^2$ with the symplectic form $dq \wedge dp$, and $h =q, g = p$.
If you have a bunch of Hamiltonians $h_i$ then the constants $[ h_i , h_j ] = c_{ij}$
can be viewed as giving you some kind of Lie algebra cocycle and Souriau and others
have messed about with the resulting (Lie algebra?) cohomology class as the
obstruction for doing what you want.  But somehow that seems too highbrow of an approach
to your question. 
A: Note that the map $C^\infty(P) \to Vector Fields$ given by $h \mapsto X_h$, where $X_h$ is the Hamiltonian vector field, has the constant functions in the kernel.
For this reason it is common to pick a normalization for your Hamiltonian functions that is preserved under Poisson brackets, e.g. $\int_P h \Omega^n = 0$ for closed manifolds or compact support on open manifolds.  For these two normalizations the only constant function is the zero function, so one has that if $h, g$ are normalized, then the flows $\varphi^h$ and $\varphi^g$ commute if and only if $\{h, g\} = 0$.
