[EJB 3.0] - Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
by priyavijayan1
I got it resolved. I am pasting the code over here
package com.infosys.EJB3.application;
import com.infosys.EJB3.application.FacadeRemote;
import com.infosys.EJB3.application.FacadeBean;
import javax.naming.InitialContext;
import java.sql.Timestamp;
import java.util.Properties;
public class client
{
public static void main(String[] args)
{
try
{
Properties p = new Properties();
p.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
p.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
p.setProperty("java.naming.provider.url","localhost:1099");
InitialContext ctx = new InitialContext(p);
System.out.println("Got initial COntext "+ctx.lookup("FacadeBean/remote"));
FacadeRemote lFacadeRemote = (FacadeRemote) ctx.lookup("FacadeBean/remote");
System.out.println("Got Facade Remote Bean");
// Added
lFacadeRemote.checkUserCredential("rama", "ramaxyz");
System.out.println("user checked");
// end
//lFacadeRemote.createDepartment("Marketing");
/*lFacadeRemote.createDepartment("Administration");
lFacadeRemote.createDepartment("Sales");*/
/*lFacadeRemote.assignEmployeeToDepartment(new Long(1),"Brijesh",31,"M");
lFacadeRemote.assignEmployeeToDepartment(new Long(1),"xxxx",31,"M");
lFacadeRemote.assignEmployeeToDepartment(new Long(2),"yyyy",31,"M");*/
System.out.println("DONE");
}
catch(Exception ex)
{
System.out.println(ex);
ex.printStackTrace();
}
}
}
------------------------------------------------------------------
The change that I have made is adding the properties instance. I have another file in my directory called jndi.properties, but I still had to put it inside my code. I am not sure why I need to do it since I already have jndi.properties.... anyways its working fine..
Thanks for the reply..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996595#3996595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996595
18 years, 10 months
[JBoss Portal] - JBoss Portal - Clustering - Http Session Replication
by chellva
Hi,
I am trying to test HTTP Session Replication feature of JBoss Portal Server.
When i downloaded jboss-portal-2.4.1-CR1-bundled.zip i did not find 'all' directory under server folder.
So i used JBoss AS 4.0.4 for testing the feature. When i deploy "jboss-portal.sar" in "D:\jboss-4.0.4.GA\server\all\deploy" i am getting the following exception.
14:03:53,651 INFO [ServiceConfigurator] Problem configuring service cms.pm.cache:service=TreeCache
org.jboss.deployment.DeploymentException: No Attribute found with name: CacheLoaderConfiguration
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:318)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:460)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
Will it affect the JBoss portal clustering?
Thanks
Selva.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996591#3996591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996591
18 years, 10 months
[Beginners Corner] - Re: EJB3 JDNI lookup error 'unexpected block data'
by tamri
"rknechtel" wrote : I'm having the same problems using JBoss 4.0.4GA & EJB 3.0 RC8.
|
| javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)]
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at com.footlocker.client.Client.main(Unknown Source)
| Caused by: java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)
| at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:531)
| at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
| at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
| at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
| at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
| at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
|
|
| I added the jars suggested but still no go.
|
And how do you resolve this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996588#3996588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996588
18 years, 10 months
[JBoss Seam] - Re: paginating a datamodel
by ask4saif
First of all thank you for your support, its very nice of you,
The scenario on which I am working is, I want pagination which i have been able to do with the jenia's library. And i want grid facility in it, which is provided by the seam by using the @DataModel and @DataModelSelection.
Now the only problem which I see in what i did is, the memory. Now my DataModel fetches the full resultset from the db which might get up to 1 million records. In this case how can i efficiently use my DataModel to fetch only chunks of records not full list.
the pagination of google search is great I wonder how can we do that in seam using the datamodel.
any advice which you can give, I will be gratefull
thank you in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996584#3996584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996584
18 years, 10 months