[JBoss Cache: Core Edition] - Re: Problem with expiration eviction
by jreeman
Ok thx to all. In fact I removed the expiration configuration in the config file and the code. I just added the line suggested by lovelyliatroim and it sounds to work fine I just have warnings in the log file about the different nodes of the FQN where I add my object :
anonymous wrote : 2008-09-01 11:01:25,709: WARN [EvictionTimer-0] ExpirationAlgorithm, org.jboss.cache.eviction.ExpirationAlgorithm: No expiration key 'expiration' for Node: /node1
| 2008-09-01 11:01:25,712: WARN [EvictionTimer-0] ExpirationAlgorithm, org.jboss.cache.eviction.ExpirationAlgorithm: No expiration key 'expiration' for Node: /node1/node2
| 2008-09-01 11:01:25,713: WARN [EvictionTimer-0] ExpirationAlgorithm, org.jboss.cache.eviction.ExpirationAlgorithm: No expiration key 'expiration' for Node: /node1/node2/node3
Anyway mircea is right, it should work with my previous code and with the fix (in 3.0.0.GA version), it should be surely possible to set the expiration at the root of a tree or subtree without having to do it again on every sub nodes and object.
Tomorow I will add these additionnal note in the consequently created issue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173801#4173801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173801
17 years, 8 months
[EJB 3.0] - Re: Multiples Jars with same EJBs
by wecucho
Code of the EJB (with real names)
Interface:
| package com.ogangi.mimapp3.zone.bean;
|
| import javax.ejb.Remote;
|
| /**
| * Author: cucho
| * Created on: Aug 29, 2008
| **/
| @Remote
| public interface Zone {
|
| public String sayHello();
|
| }
|
Bean:
| package com.ogangi.mimapp3.zone.bean;
|
| import javax.ejb.Stateless;
|
| import com.ogangi.mimapp3.zone.logger.MimappLogger;
|
| /**
| * Author: cucho
| * Created on: Aug 29, 2008
| **/
| @Stateless
| public class ZoneBean implements Zone {
|
| private static final String logTag = "ZoneBean";
|
| public String sayHello() {
|
| // MimappLogger.info(logTag, "Hello from ZoneBean ?");
| System.out.println("miami");
|
| return "Hello from ZoneBean";
| }
|
| }
|
ejb-jar.xml for the first jar
| <?xml version="1.0"?>
| <ejb-jar>
| <description>Mimapp3 Zone Miami</description>
| <display-name>M3Z Miami</display-name>
| <enterprise-beans>
|
| <session>
| <ejb-name>m3z-miami-zone-bean</ejb-name>
| <remote>com.ogangi.mimapp3.zone.bean.Zone</remote>
| <ejb-class>com.ogangi.mimapp3.zone.bean.ZoneBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Bean</transaction-type>
| </session>
| </enterprise-beans>
| </ejb-jar>
|
ejb-jar.xml for the second jar
| <?xml version="1.0"?>
| <ejb-jar>
| <description>Mimapp3 Zone Venezuela</description>
| <display-name>M3Z Venezuela</display-name>
| <enterprise-beans>
|
| <session>
| <ejb-name>m3z-venezuela-zone-bean</ejb-name>
| <remote>com.ogangi.mimapp3.zone.bean.Zone</remote>
| <ejb-class>com.ogangi.mimapp3.zone.bean.ZoneBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Bean</transaction-type>
| </session>
| </enterprise-beans>
| </ejb-jar>
|
output from running listAll on the JNDIView
| Web Applications
|
| java:comp namespace of the TestApp.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the jboss-web.deployer/ROOT.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the echopointngtest.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the InteractiveTest.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the jmx-console.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the jbossws.sar/jbossws-context.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the deploy-hasingleton/jbossmq-httpil.sar/jbossmq-httpil.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/jbossmq/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the juddi-service.sar/juddi.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- jdbc (class: org.jnp.interfaces.NamingContext)
| | | +- juddiDB[link -> java:/DefaultDS] (class: javax.naming.LinkRef)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the httpha-invoker.sar/invoker.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
|
|
| java:comp namespace of the console-mgr.sar/web-console.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
|
|
| java: Namespace
|
| +- mimapp3 (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- jaas (class: javax.naming.Context)
| | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
| +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| +- comp.ejb3 (class: javax.naming.Context)
| | NonContext: null
| +- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
| +- m3z-miami (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
| +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
| +- JBossCorbaPOA (class: org.omg.PortableServer.POA)
| +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
| +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
| +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
| +- Mail (class: javax.mail.Session)
| +- comp.original (class: javax.namingMain.Context)
| +- JBossCorbaORB (class: org.omg.CORBA.ORB)
| +- timedCacheFactory (class: javax.naming.Context)
| Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
| +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
| +- m3z-venezuela (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- comp (class: javax.naming.Context)
|
|
| Global JNDI Namespace
|
| +- ZoneBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy162 implements interface com.ogangi.mimapp3.zone.bean.Zone,interface org.jboss.ejb3.JBossProxy)
| +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
| +- HAPartition (class: org.jnp.interfaces.NamingContext)
| | +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
| +- SmsServerFacadeManagerBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy125 implements interface com.ogangi.mimapp3.beans.SmsServerFacadeManager,interface org.jboss.ejb3.JBossProxy)
| +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- queue (class: org.jnp.interfaces.NamingContext)
| | +- A (class: org.jboss.mq.SpyQueue)
| | +- testQueue (class: org.jboss.mq.SpyQueue)
| | +- ex (class: org.jboss.mq.SpyQueue)
| | +- DLQ (class: org.jboss.mq.SpyQueue)
| | +- D (class: org.jboss.mq.SpyQueue)
| | +- C (class: org.jboss.mq.SpyQueue)
| | +- B (class: org.jboss.mq.SpyQueue)
| +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
| +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
| +- JAXR (class: org.apache.ws.scout.registry.ConnectionFactoryImpl)
| +- RouterBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy122 implements interface com.ogangi.mimapp3.beans.Router,interface org.jboss.ejb3.JBossProxy)
| +- m3z-miami-zone-bean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy145 implements interface com.ogangi.mimapp3.zone.bean.Zone,interface org.jboss.ejb3.JBossProxy)
| +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
| +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- DestinationOperationsBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy116 implements interface com.ogangi.mimapp3.beans.DestinationOperations,interface org.jboss.ejb3.JBossProxy)
| +- UserTransactionSessionFactory (proxy: $Proxy14 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
| +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| +- MMTRouterBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy159 implements interface com.ogangi.mimapp3.zone.bean.MMTRouter,interface org.jboss.ejb3.JBossProxy)
| +- console (class: org.jnp.interfaces.NamingContext)
| | +- PluginManager (proxy: $Proxy57 implements interface org.jboss.console.manager.PluginManagerMBean)
| +- persistence.units:jar=mimapp3-app-server.jar,unitName=mimapp3 (class: org.hibernate.impl.SessionFactoryImpl)
| +- m3z-venezuela-zone-bean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy162 implements interface com.ogangi.mimapp3.zone.bean.Zone,interface org.jboss.ejb3.JBossProxy)
| +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- topic (class: org.jnp.interfaces.NamingContext)
| | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| | +- testTopic (class: org.jboss.mq.SpyTopic)
| | +- securedTopic (class: org.jboss.mq.SpyTopic)
| +- persistence.units:jar=m3z-venezuela.jar,unitName=m3z-venezuela (class: org.hibernate.impl.SessionFactoryImpl)
| +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
| +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- HASessionState (class: org.jnp.interfaces.NamingContext)
| | +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
| +- ControllerBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy113 implements interface com.ogangi.mimapp3.beans.Controller,interface org.jboss.ejb3.JBossProxy)
| +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| +- invokers (class: org.jnp.interfaces.NamingContext)
| | +- gilthanas (class: org.jnp.interfaces.NamingContext)
| | | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
| +- MMTControllerBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy156 implements interface com.ogangi.mimapp3.zone.bean.MMTController,interface org.jboss.ejb3.JBossProxy)
| +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- jmx (class: org.jnp.interfaces.NamingContext)
| | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor (proxy: $Proxy56 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
| +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- persistence.units:jar=m3z-miami.jar,unitName=m3z-miami (class: org.hibernate.impl.SessionFactoryImpl)
| +- MMCOperationsBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy119 implements interface com.ogangi.mimapp3.beans.MMCOperations,interface org.jboss.ejb3.JBossProxy)
| +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
|
|
| HA-JNDI Namespace
|
|
|
|
client who invoke the ejb:
| package com.ogangi.mimapp3.zone.test;
|
| import java.util.Set;
|
| import javax.management.MBeanServerConnection;
| import javax.management.ObjectInstance;
| import javax.management.ObjectName;
| import javax.naming.InitialContext;
|
| import com.ogangi.mimapp3.zone.bean.MMTRouter;
| import com.ogangi.mimapp3.zone.bean.Zone;
|
|
| /**
| * Author: cucho
| * Created on: Aug 29, 2008
| **/
| public class ZoneTest {
|
|
| public ZoneTest() {
| System.out.println("Start");
|
| callZoneMethod("m3z-miami-zone-bean/remote");
| callZoneMethod("m3z-venezuela-zone-bean/remote");
|
| System.out.println("End");
| }
|
| public void callZoneMethod(String resourceName) {
|
| try {
|
| InitialContext ctx = new InitialContext();
|
| Zone zone = (Zone) ctx.lookup(resourceName);
| zone.sayHello();
|
|
| } catch (Exception e) {
| e.printStackTrace();
| }
|
| }
|
| public void list() {
|
| try {
| InitialContext ctx = new InitialContext();
| MBeanServerConnection mbs = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
|
| ObjectName filterName = new ObjectName("");
| Set<ObjectInstance> objectNames = mbs.queryMBeans(filterName, null);
|
| for (ObjectInstance objectInstance : objectNames) {
| String name = objectInstance.getObjectName().getCanonicalName();
| if (name.contains("m3z")) {
| System.out.println(name);
| }
| }
|
| } catch (Exception e) {
| e.printStackTrace();
| }
|
| }
|
| public static void main(String[] args) {
|
| new ZoneTest();
|
| }
|
| }
|
I hope this helps, thx for you fast reply.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173793#4173793
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173793
17 years, 8 months
[Tomcat, HTTPD, Servlets & JSP] - Configuration Jsp & DataSource & JNDI
by braca
Hello,
I cant't deploy my Wepapp. It's a simple jsp with sql-Tags Application, deployed as a war. However, I can't connect to database OracleDS. I got the following error:
21:04:30,602 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactory
Binding,name=JmsXA' to JNDI name 'java:JmsXA'
21:04:30,904 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding
,name=OracleDS' to JNDI name 'java:OracleDS'
21:04:32,532 INFO [A] Bound to JNDI name: queue/A
21:04:32,537 INFO [B] Bound to JNDI name: queue/B
21:04:32,543 INFO [C] Bound to JNDI name: queue/C
21:04:32,548 INFO [D] Bound to JNDI name: queue/D
21:04:32,552 INFO [ex] Bound to JNDI name: queue/ex
21:04:32,631 INFO [testTopic] Bound to JNDI name: topic/testTopic
21:04:32,650 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
21:04:32,654 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
21:04:32,664 INFO [testQueue] Bound to JNDI name: queue/testQueue
21:04:32,740 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
21:04:32,801 INFO [DLQ] Bound to JNDI name: queue/DLQ
21:04:32,831 INFO [TomcatDeployer] deploy, ctxPath=/FinanzManagerKUR, warUrl=.../tmp/deploy/tmp26089FinanzManage
rKUR-exp.war/
21:04:33,004 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
21:04:33,606 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
21:04:33,686 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
21:04:33,755 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] St
arted in 33s:889ms
21:05:26,102 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.lang.NullPointerException"
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:285)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:168)
at org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:94)
My web.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>FinanzManagerKUR</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.jspx</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
JNDI DataSource for OracleDS database im JBoss
<res-ref-name>OracleDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
My jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<resource-ref>
<res-ref-name>OracleDS</res-ref-name>
<jndi-name>java:OracleDS</jndi-name>
</resource-ref>
</jboss-web>
Any idea what's wrong?
Thanks for help
braca
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173792#4173792
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173792
17 years, 8 months
[EJB 3.0] - Multiples Jars with same EJBs
by wecucho
Hi, i have a simple project with a single EJB, im writing the ejb-jar.xml file and i have all the little app working well, but i need to create several jars with same architecture but different behaviors, so on my little experiment i have a Bean with a single method, the method only print "Hello From Jar", im creating 2 jars of this kind, and the only thing im changing is:
The string that is printed, and the <ejb-name> on the ejb-jar.xml files, for example:
On Jar test-ejb-1.jar i have the string "Hello From Jar 1" and the <ejb-name>: test-ejb-1
On Jar test-ejb-2.jar the string "Hello From Jar 2" and the <ejb-name>: test-ejb-2
Also i have a simple client that try to get the responses from the ejbs, whit a code like follows:
callZoneMethod("test-ejb-1/remote"); //This perfom the InitialContext operations.
callZoneMethod("test-ejb-2/remote"); //This perfom the InitialContext operations.
But in the jboss logs always get call one of the EJB, no matter the resource im using for the lookup.
Anyone has any idea ? i need to implement this for my applications, i need to have multiples mini-apps with the same clases, only with diferents variants inside the methods that the ejbs are defining.
Im using Jboss 4.2.2
I hope anyone could help me.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173785#4173785
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173785
17 years, 8 months