Lee:
Baptismal records for Glenamaddy RC parish start in October 1838 https://registers.nli.ie/parishes/1051. I searched on the subscription site Roots Ireland and there was a December 11 1840 baptismal record for a John Connelly in Glenamaddy with father Daniel Connelly and mother Mary Riely. There were a number of siblings to John but no James or Thomas. It is possible that James and Thomas were baptized before October 1838.
I did not find any Connelly baptismal records anywhere in Galway in the 1840s/1850s where the mother had a maiden name of Divilly.
The 1855 Griffiths Valuation head of household listing for Boyounagh civil parish shows a Daniel Connelly and a Daniel Connolly both in Boyounagh More townland. Possibly there are the same person.
Any other clues?
Roger McDonnell