I've done them a few different ways. You could coat the bar top and then install the finished rail. Or, install the rail and then pour the top. In any case you would want a good clean seal between the rail and the bar top. If you want to coat the rail, you can pour/brush the rail as you pour the top.
I use E-Bond Epoxies, which is a local manufacturer in my area. As for a general overview of doing the work, here is a brief explanation. It's really pretty easy.
I can give you a short course. The work area should be absolutely clean, with no moving air. Don't clean, brush off, blow off, or sneeze in or near the work area. If the top has any cracks, knots or holes, they should be plugged/filled with epoxy prior to the pour. The top should be sitting level.
Have the top in an easy to work and move around area. Cover the floor with drop cloths. Visqueen (brand or other brands of clear plastic sheeting) the area completely.
When ready, do not stir either container per se, but rather use a stir stick and slowly pass the bottom of the can for any settling that may have occurred. Slowly mix equal parts so as not to create any bubbles.
For tops that will have an edge with overflow from the top pour:
Use a brush and coat the edges with the mix so when the top is poured it will have a clear run on the edges. Pour from the center of the top near the end and slowly work your way to the other end. For long tops, pour from the center to the outer ends. Allow the mix to run off the edges until you get coverage all the way around.
When the consistency gets to a gelled state, take a knife and cut off the excess from under the top.
For tops with a captive edge:
Depending on the height of the pour desired, you may want to do two pours. If you get ¼" to ⅜" minimum per pour that is fine.
Right after the pour:
Use a propane torch passed over the top, keeping the flame off the epoxy. This will heat up the material so any bubbles will rise and dissipate. Using a heat gun or a hair dryer may cause a gelling or areas that kick too soon, due to the hot forced air. Block or belt sand the cured epoxy off the bottom and ease the sharp edge where it ran off, and it was cut off.
is a good site that covers most questions you may have. There...see how easy it is.