Dialogue with multiple sentences before the “he said”
Solution 1:
Yes, it is acceptable - and it is still clear that John is the one talking.
You can also do it like this:
'How are you?' asked John. 'I'm so glad it's raining.'
You may also find this to be a useful reference: How to punctuate dialogue