so this is strictly an opinion. But years ago we upgraded/merged some of our labs databases/software into a single application customized for laboratories.
What happened was we had to define our "business rules". We called them "processes". When the vendor's PM (project manager) came out we then discussed what their database & apps would allow us to customize. When we had that part of the process started the vendor sent a programmer to work with us for further customizing.
What I'm trying to say is the vendor already had a generic application. Everything they did started from that. Of course each customer would have their individuality and require some customization. But if their app couldn't do it we didn't get it. Despite the fact the sales people had promised it.
I realize this doesn't help you with EJB. But your application development will probably be similar. Hopefully this helps some.
BTW: This process took several months to complete.