[JBoss Portal] - header.jsp - How To?
by explorer
Hi,
Environment:
Portal2.6
JBoss4.2
I am trying to write a new header.jsp, specific to the project.
How to go about this? i am really confused.
Documentation says that jboss-portal.sar 's joboss-service.xml needs to updated with the context path pointing to the custom header.jsp., But does that mean that the applicationi am building needs to be in the JBoss-Portal.sar?
the structure is
| |->deploy
| |->myportal.war
| |->jboss-prtal.sar
| |->META-INF
| |->jboss-service.xml
|
Where does my application "MyPortal" need to go? if its to be outside of .sar how to implement a custom header.jsp
i have the custom header.jsp and tabs.jsp in myportal.war.
i am trying to define my own theme and layout.
Please advice me of any tutorials/sites which could explain these. the 2.6 documentation is good but do not explain things in detail.
Thanks in advance..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065629#4065629
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065629
18Â years, 11Â months
[Installation, Configuration & DEPLOYMENT] - What to do if JBoss keeps going out to lunch?
by jwiegley
Hello, I'm running a webapp on JBoss 4.0.5GA. It runs fine most of the time.
However -- and this happens almost every day -- there comes a moment when JBoss seems to go "out to lunch". Once this happens, the following is all I ever see when trying to use my webapp:
java.rmi.NoSuchObjectException: Could not activate; failed to restore state
| at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:134)
| at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:236)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterce...
This of course gives the impression of extreme instability, since the only way I've found to fix this is to undeploy everything and restart JBoss.
How do I counteract this? Why is it happening? I need 100% uptime, and I'm not even really doing anything serious once this starts happening.
Any ideas appreciated,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065628#4065628
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065628
18Â years, 11Â months
[Clustering/JBoss] - ServiceLocator and caching home interfaces in a cluster. Ple
by Alenaal
I am relatively new to clustering so please do not send me to read documentation. I have read all I could find.
I also read JBoss documentation on clustering but yet I do not entirely understand. At the end of the message there is a quote from JBoss documentation but I still need explanation in plain language. Can anyone please answer????
I think about implementing ServiceLocator that caches home interfaces in a cluster. Yes, I know that it will be a one singleton per JVM. So I have 3 nodes, I will have 3 singletons. Is there a problem with that?
In a clustered environment (JBoss 4.0.5, a few nodes, sticky is off) are home interfaces bound to a specific node in the cluster or not? In other words can I or can I not...?
1. can I safely cache reference to a home interface (EJBHome) to a session bean in a ServiceLocator ?
2. can I safely cache reference to a home interface to a entity bean in a ServiceLocator ?
3. can I safely cache LOCAL home interface (EJBLocalHome) in a ServiceLocator ?
I use HA-JNDI (I think that I do since I put "localhost:1100" into Context.PROVIDER_URL). This means I DO use HA-JNDI. Correct?
I create InitialContext as:
{
...........
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
environment.put(Context.PROVIDER_URL, "localhost:1100");
return new InitialContext(environment);
..........
and I use True in META-INF\jboss.xml for all my beans
Below is a quote from section 1.2.1 How it works from "The JBoss 4 Application Server Clustering Guide " On the server side, new InitialContext(), will be bound to a local-only, non-cluster-wide JNDI Context (this is actually basic JNDI). So, all EJB homes and such will not be bound to the cluster-wide JNDI Context, but rather, each home will be bound into the local JNDI. When a remote client does a lookup through HA-JNDI, HA-JNDI will delegate to the local JNDI Context when it cannot find the object within the global cluster-wide Context. The detailed lookup rule is as follows.
- If the binding is available in the cluster-wide JNDI tree and it returns it.
- If the binding is not in the cluster-wide tree, it delegates the lookup query to the local JNDI service and returns the received answer if available.
- If not available, the HA-JNDI services asks all other nodes in the cluster if their local JNDI service owns such a binding and returns the an answer from the set it receives.
- If no local JNDI service owns such a binding, a NameNotFoundException is finally raised."
Thanks to anyone who answers or just reads....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065626#4065626
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065626
18Â years, 11Â months
[Messaging, JMS & JBossMQ] - Deploy Message listener as MBean service get No ClassLoaders
by loseyourself
Greetings all,
I am using JBoss 3.2.5 to implement a mail listener and deploy it as an MBean service. I follow the sample of HelloWorld mbean service tutorial on the wiki site,
1. create an interface:
public interface TopicMailListenerMBean extends ServiceMBean{
public String getName();
public void setName(String name);
public String getUrl();
public void setUrl(String url);
public void disconnect() throws JMSException;
}
2. create mbean class:
public class TopicMailListener extends ServiceMBeanSupport
implements MessageListener, TopicMailListenerMBean {
public void onMessage(Message msg) {...}
...
}
3. create a jboss-service.xml
<?xml version="1.0" encoding="UTF-8"?>
< server>
< mbean code="au.gov.nsw.community.mail.TopicMailListener" name="au.gov.nsw.community.mail:service=TopicMailListener">
< attribute name="Url">10.65.240.244:1099< /attribute>
< attribute name="Name">topic/testTopic< /attribute>
< /mbean>
< /server>
4. deploy the war to jboss, and rename it to .sar, the hirarche of the sar is:
Docs.sar
Docs.sar/META-INF/jboss-service.xml
Docs.sar/au/gov/nsw/community/mail/TopicMailListener.class
Docs.sar/au/gov/nsw/community/mail/TopicMailListenerMBean.class
Now, once I deploy the .sar in the JBOSSHOME/server/all/deploy, I always get following exceiption:
2007-07-18 12:33:05,640 DEBUG [org.jboss.system.ServiceCreator] About to create bean: au.gov.nsw.community.mail:service=TopicMailListener with code: au.gov.nsw.community.mail.TopicMailListener
2007-07-18 12:33:05,671 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/D:/Adobe/LiveCycle/jboss/server/all/deploy/Docs.sar
org.jboss.deployment.DeploymentException: No ClassLoaders found for: au.gov.nsw.community.mail.TopicMailListener; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: au.gov.nsw.community.mail.TopicMailListener)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
at org.jboss.system.ServiceController.install(ServiceController.java:198)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy7.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: au.gov.nsw.community.mail.TopicMailListener
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:275)
at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:843)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:290)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:317)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
... 32 more
Could anybody tell me where is wrong? I do appreciate for any help in advance!
Cheers,
hj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065616#4065616
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065616
18Â years, 11Â months
[JBoss Seam] - Can the EJBs be on a remote server ?
by femski1
Hi Folks !
I am reading up on Seam and all the discussion and examples are built around EJB server colocated with the Servlet/JSF container with heavy use of dependency injection to get refernces to local EJB server. It appears there is no standarized way to do dependency injection of remote references. Is this why we don't see remote EJB servers in Seam ?
I would like to move EJB tier to a remote server located behind a firewall away from Tomcat container on the web server. I thought this was pretty standard configuration for 3-tier applications. Don't want to embed EJBs inside Tomcat and more importantly do not we want allow database access (through JPA) from the servlet/JSF (web) tier.
Is there a simple way to deploy EJB tier on a remote server and if so how would Seam resolve references to them ? Can you define remote references in the web.xml ? Any examples, samples would be much appreciated.
thanks,
-Sanjay
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065611#4065611
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065611
18Â years, 11Â months