JUG Forum. Create your account, or enter it to log into the site. User: Password: How to lookup EJB 3.1 directly (without declaring properties JNDI)? Index of Fruns Java QuickStart Basic Author Message
Dambros JavaChild food warmers for rent Joined: 26/08/2007 16:26:00 Messages: 117 Offline Good afternoon, I'm trying to use EJB confome supplied in the tutorial of the K19 EJB3.1 (handout k22), but I have a difficulty to run remote clients directly, as done in their code: package br. with. K19. tests; food warmers for rent import javax. naming. InitialContext; import br. with. K19. sessionbeans. LancadorDeDado; public class TesteDeAcesso {public static void main (String [] args) throws Exception {InitialContext ic = new InitialContext (); LancadorDeDado lancadorDeDado = (LancadorDeDado) ic. lookup ("java: global / dadoWeb / LancadorDeDadoBean") System. October println (lancadorDeDado. fluke ());}} I have the EJB deployed in JBoss 7.1.1 and even checking the JNDI Tree server application it reports food warmers for rent the existence of "java: global / TesteEJB / CalculadoraBean" but when I try the execution of a main with any ocdigo below, I get "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or to an applet parameter, or in an application resource file: java.naming.factory.initial ". public static void main (final String [] args) throws Exception {end InitialContext ic = new InitialContext (); late Calculator calculator = (Calculator) ic.lookup ("java: global / TesteEJB / CalculadoraBean! br.com.imagetec.ejb . sessionbeans.Calculadora food warmers for rent "); System.out.println (calculadora.soma (10, 20));} J added the dependencies of Jboss 7 on my POM, as follows: <dependency> <groupId> food warmers for rent xxx < / groupId> <artifactId> TesteEJB </ artifactId> food warmers for rent <version> 0.0.1-SNAPSHOT </ version> </ dependency> <dependency> <groupId> org.jboss.as </ groupId> <artifactId> jboss-as-ejb -client-bom </ artifactId> <version> 7.1.1.Final </ version> <type> pom </ type> </ dependency> <dependency> <groupId> org.jboss.as </ groupId> <artifactId> jboss-as-good-jms-client </ artifactId> <version> 7.1.1.Final </ version> <type> pom </ type> </ dependency> The only way I can run declaring the JNDI properties in a properties file or hardcoding a Hashtable, but the tutorial should be possible to access directly. So, I wonder what is missing to make it possible to access as the initial example (code first). Thank you.
Index of Fruns Java QuickStart Basic Jump to: Select a General Affairs Frum Notcias necessarily connected technology MundoJ - Articles, Notcias Debates and Articles & Tutorials QuickStart Basic Java Java Avanado Tools Development Frameworks and utilities Grfica Web Interface Google Android food warmers for rent and Java Micro Edition (ME) certification Java persistence: Hibernate, JPA, JDBC and other Java Enterprise Edition (Java EE) Brazilian RIA Frameworks & Libraries - Flex , and other JavaFX Architecture food warmers for rent Systems Development Methodologies food warmers for rent and Software food warmers for rent Testing JavaScript Ruby & Ruby on Rails Other Languages Powered by JForum 2.1.8 JForum Team
java android c #. net php javascript jquery html sql photoshop illustrator inDesign typography vectorization GUJ Posts: N & atildeo resolved Unanswered food warmers for rent GUJ Forum: Forum Index Recent Topics Advertising: guj@guj.com.br - Developed by Caelum food warmers for rent - JUG: since 2002
ReplyDeleteIPL Auction 2015
IPL Live streaming
IPL points table
ipl live streaming 2015
IPL 2015 Live Streaming
IPL 8 schedule
IPL 2015 TICKETS
IPL 2015 TICKETS
IPL 8 tickets
IPL 8 tickets
IPL 2015 opening ceremony
ipl 2015opening ceremony
ipl 2015 auction
ipl 2015 auction
ipl 2015 points table
ipl 2015 teams
ipl 2015 teams
ipl 2015 tickets
ipl 2015 tickets
ipl 2015 live score
ipl 2015 live score
ipl 2015 schedule
ipl 2015 schedule
india vs pakistan 2015 live
This comment has been removed by the author.
ReplyDeleteIPL Auction 2015
ReplyDeleteIPL Live streaming
IPL points table
ipl 8 live streaming 2015
IPL 2015 Live Streaming
IPL 8 schedule
IPL 2015 TICKETS
IPL 2015 TICKETS
IPL 8 tickets
IPL 8 tickets
IPL 2015 opening ceremony
ipl 2015 opening ceremony
ipl 2015 auction
ipl 2015 auction
ipl 2015 points table
ipl 2015 teams
ipl 2015 teams
ipl 2015 tickets
ipl 2015 tickets
ipl 2015 live score
ipl 2015 live score
ipl 2015 schedule
ipl 2015 schedule
india vs pakistan 2015 live
ReplyDeleteCricket world cup 2015 live streaming
you can download the copa america theme song 2015 for free.
ReplyDeleteyou can arsenal vs aston villa 30 may live streaming online for free without ads in HD
ReplyDeleteAlso watch :
1. barcelona vs athletic bilbao live streaming free
2. barcelona vs athletic bilbao 2015 live streaming
ISL live streaming 2015
ReplyDeleteRugby world cup 2015 final live streaming
Rugby world cup final live streaming
tonga vs georgia
tonga vs georgia live streaming