Is it possible to have same interface in javaee app and use it in CLI and GUI both? : <p>We have a javaee application whithout any gui. To adding some records to database config. tables( entities) we use manual  sql script which is not safe and easy.
We have decided to develop gui and also CLI for our application to handle this issue.
Is it possible to have interfaces in javaee app and use then in both Gui and CLI?
From end-user point of veiw, services and parameters arr same in both gui and cli.
Something like jboss admin web console and jboss cli to deploy an artifact.</p>
