[Beginners Corner] - jboss and apache
by renemarxis
Hello
i am very new to jboss and have some very basic questions on developing/deploying.
I like to use the mod_jk.so for apache to be able to have apache serve as the webserver for my apps and static pages.
First of i'd like to know if its possible to install tomcat separate from jboss? The actual download comes with tomcat allready integrated, right?
Also if i understood well, jboss is somehow an "addon" for tomcat right? It serves as an applilcationserver equivilent to tomcat with some additional features like ejb etc.?
I seem to be able to get tomcat alone running with apache mod but i'm not able to configure tomcat to use the jboss installation. Some hints for howtos would be very very welcome.
Many thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016738#4016738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016738
19Â years, 2Â months
[JBoss and NetBeans] - NamingException: Could not dereference object - EJB 3.0 work
by htran_888
Hi Everyone,
I have stucked on workbook ex05_2 that makes comparison between using the same entity bean in TransactionPersistenceContext & ExtendedPersistenceContext. Anyhow, the following error occurred when trying to access either of these contexts:
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at client.Main.main(Main.java:33)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy1.createProxy(Unknown Source)
at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
... 4 more
This message make sense considering the jndi listing as follows:
+- ExtendedPersistenceContextBean (class: org.jnp.interfaces.NamingContext)
| +- remote (class: java.lang.Object)
| +- remoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
+- TravelAgentBean (class: org.jnp.interfaces.NamingContext)
| +- remote (proxy: $Proxy81 implements interface travelagent.TravelAgentRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
+- TransactionPersistenceContextBean (class: org.jnp.interfaces.NamingContext)
| +- remote (class: java.lang.Object)
| +- remoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
To call TravelAgentRemote interface, use jndiContext.lookup("TravelAgentBean/remote"). However, it appears that
I would not get anything by calling either jndiContext.lookup("TransactionPersistenceContextBean/remote") or jndiContext.lookup("ExtendedPersistenceContextBean/remote") according to the above jndi table.
The client code are as follows:
try
| {
| Context jndiContext = getInitialContext();
| Object ref = jndiContext.lookup("TravelAgentBean/remote");
| TravelAgentRemote dao = (TravelAgentRemote)ref;
|
| ref = jndiContext.lookup("TransactionPersistenceContextBean/remote");
| TransactionPersistenceContextRemote txBean = (TransactionPersistenceContextRemote)ref;
|
| Cabin fetchedCabin = dao.findCabin(1);
| int oldBedCount = fetchedCabin.getBedCount();
|
| System.out.println("Set up transaction persistence context stateful bean");
| txBean.setCabin(1);
| txBean.updateBedCount(5);
|
| ref = jndiContext.lookup("ExtendedPersistenceContextBean/remote");
| ExtendedPersistenceContextRemote extendedBean = (ExtendedPersistenceContextRemote)ref;
|
| extendedBean.setCabin(1);
| extendedBean.updateBedCount(5);
| ....
This exercise does not work as delivered on the command prompt.
I am running Netbeans 5.5, JBoss 4.0.5GA & JDK1.6.0 on Windows XP platform.
The workbook is from EJB 3.0 by Bill Burke.
Any assistance would be greatly appreciated.
Thanks,
Henry
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016737#4016737
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016737
19Â years, 2Â months