Jelle Klap wrote:Right, so you want to do a look-up of an EJB packaged inside the market-cadastro-ejb.jar archive from a class inside the market-web.war that's part of the same .ear deployment.
A local JNDI lookup should work in that case using the java:app namespace, but I would take a different approach altogether.
Instead of manually performing a look-up that couples your code to JNDI, in my opinion, you'd be better of using dependency injection and have JBoss figure out how to obtain a reference to the EJB (via JNDI somwhere in the background). Have a look at the @EJB and @Inject annotations
Jay Dilla wrote:
Here are a few solutions that are a little more robust: http://shrubbery.mynetgear.net/c/display/W/Reading+Java-style+Properties+Files+with+Shell
Tim Holloway wrote:The easy way to do it is to note that a Java properties file has the same format as a basic shell script.
However, there's a trick to it. If you just run the properties file like so:
The assignments will be made at the sub-level, then discarded when the properties file (script) ends execution.
So to get the properties in a calling script, you need to use the "source" command:
Note that the space after the initial dot is very important!
To reference shell variable assignments, you use the "$" to indicate variable substitution.
So, to put it all together: