Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Narendran Nair

Ranch Hand
+ Follow
since Sep 25, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Narendran Nair

hello Yosi Hendarsjah,

Michael Valentino
I have Tomcat 5 running on my machine at work, and I use J2SDK 1.4.2 to run it. There's a compatibility pack that I had to install to allow Tomcat 5.x to run using the Java 1.4. Check the Tomcat 5.x site and installation guide for more details on this.



i think Michael made a point here .. you need to get the compatibility pack.. look like you have that thing in your system. that is why your Tomcat is working properly.. any way .. Tomcat is there, so that we can test our servlets .. jsp's .. jsf etc ... if its working . carry on with it man...

have a good day ..
Tomcat5 has shown these kind of problems when u have JDK1.4 in your system ..

I am not sure Yosi Hendarsjah why u r tomcat is working properly..
i had problems with tomcat5 and java1.4

please check whether u have the 1.5 as the JRE . run time .. (this is a strange guess of mine) ..
Did u try installing JDK1.5 and running TOMCAT5.0 in that ??
i think this will solve all u r problems ..

Tomcat5 specifically needs JAVA5 to work with ..




copy the getParameter to the desired type
use this code in the backing bean ... thats all .........
16 years ago
JSF


copy the getParameter to the desired type
use this code in the backing bean ... thats all .........

regards
Narendran J S
16 years ago
JSF
as far as JSF IDE is concerned i use the free version of Exadel Studio for the visual editing or JDeveloper 10g ..

JDeveloper gives u the feeling like u are editing a html page ..
JDeveloper run the tag in JSP Visual Editor...

But Exadel works on Eclipse .. it has all the features of Eclipse in it ..

regards
Narendran J S
16 years ago
JSF
Hello every one .. i am new to JSF and very new to JSF components ..

I want to know your suggestions in this ..

I have a set of Input field where a user enters all the details like first name, last name , social security number etc etc .. if a validation error happens . i need to highlight the component(intput field) .. how can this be done ... i want suggestion in this ..

regards
Narendran J S
16 years ago
JSF
Hello guys ...

can 2 EJB's share a common home and remote interface ....

any one like to comment on this !

regards
Naren
Hello guys !!!

I got one dought ....
I got a oracle-ds.xml file and inside that file i got the <max-pool-size>15</max-pool-size> and my question is, Is there anyway to get this number 15 from this xml file, when the server is running plus my session bean in running .. i am working on connection pooling mechanism ... and i just dont want to hard code the value 15.

any suggestions guys !!!

regards
Naren
17 years ago
Hello guys !!!

I got one dought ....
I got a oracle-ds.xml file and inside that file i got the <max-pool-size>15</max-pool-size> and my question is, Is there anyway to get this number 15 from this xml file, when the server is running plus my session bean in running .. i am working on a connection pooling mechanism ... and i just dont want to hard code the value 15.

any suggestions guys !!!

regards
Naren
17 years ago
hi man ...

from the details u have given here only one thing pops up in my mind .. your error message is NameNotFound for daily-cycle but in the jboss.xml file this jndi name is not there .... i think u are looking for the wrong jndi name ....

this is what i have to say .....

regards
Naren
17 years ago
Hi

first of all I am using JBoss4 . I started to learn J2EE and use JBoss just after release of JBoss4. so it means i started few weeks or month before u started studying.

any thing mentioned below can be wrong since i am not a very big expert in this ... i am just like u ... Learning by my self


1. Can I give any name as JNDI name as long as I am refering to the correct one in the client?

u can give any name as JNDI name provided that u give the same name while looking up on the client make sure that u cross check with the JMX Console

2. Is it necessary to have all the entity bean, the home and remote interfaces on the client side for the client to execute?

just put the beans jar file in the classpath while running the client. i am doing that and few other JBoss Client jar file like
commons-discovery.jar,commons-logging.jar,concurrent.jar,jboss-client.jar,jboss-deployment.jar,
jboss-j2ee.jar,jbossall-client.jar,jbossha-client.jar,,jbossmq-client.jar,jbosssx-client.jar,jnp-client.jar,log4j.jar


3. How will the ejb know to create rows in the database table just because I have sent some parameters in the create statement? How will it know in which table it should create?

u must write in the java file that extends the SessionBean to make the database calls to do the db operations. I asume u are refering the the point where values are inserted in to the database

4. I see that you have only ejb-jar.xml and jboss.xml file while I have another extra one jboss-cmp.xml (which contains the table name I am referring to in the database. Still, where am I aksing it to create rows?)

i dont userstand this question, i am working with session beans not with entity beans

5. Most importantly as I will be having to do a lot of this, if I have just to retrieve rows from the database, how will I achieve that as I dont see any sql statements.

i wrote the client file in such a way that, the client calls a method in the bean that accepts the few parameters and the bean does all the db operation both insert, select and update.

6. Also, if I have different *-ds.xml files in the deploy directory, how will JBoss know which one to choose? Or is it limited to one -ds.xml file at a time?

in my server configuration i have the hypersonics-ds.xml file and also the oracle file.. any file put to the deploy directory is handled by the Jboss . just for example when jboss is running delete the mail-service.xml file from the deply directory and watch the console there will be some messages read it

regards
Narendran

narendran_js@hotmail.com
wm_destroyer@yahoo.com


PS: if anyone is not agreeing with me please post the correct reply
17 years ago
HI

I am adding my program extracts with this mail

the ejb-jar.xml file for the session bean

<ejb-jar>
<description>Simple Socket Communication EJB</description>
<display-name>MySocket</display-name>
<enterprise-beans>
<session>
<ejb-name>SocketEJB</ejb-name>
<home>adapter.SessionHome</home>
<remote>adapter.SessionRemote</remote>
<ejb-class>adapter.SessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

the jboss.xml file
<jboss>
<enterprise-beans>
<session>
<ejb-name>SocketEJB</ejb-name>
<jndi-name>SocketEJB</jndi-name>
</session>
</enterprise-beans>
</jboss>

the client program

public class SocketClient {
public static Hashtable env = new Hashtable();
static SessionRemote remote ;
public SocketClient() {
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs","org.jboss.naming rg.jnp.interfaces");
env.put(Context.PROVIDER_URL,"localhost:1099");
connect();
}
public void connect(){
Context ctx = null;
Object obj = null;
try {
ctx = new InitialContext(env);
obj = ctx.lookup("SocketEJB");
SessionHome sessionHome = (SessionHome) PortableRemoteObject.narrow(obj,SessionHome.class);
remote = sessionHome.create();
System.out.println("Created ");
remote.connect();
} catch (NamingException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (CreateException e) {
e.printStackTrace();
}


}
public static void main(String args[]){
new SocketClient();
}
}

hope u know the home, bean and remote java file

if u look in the xml files mentioned above u will see the jndi name, that same name is used in the client program in the ctx.lookup
i wrote this this session bean to find a embedded device located in the network.. using socket communication

if u want i will send the whole thing as a attachment ...



regads
Narendran
17 years ago
hi

thanks for the reply
i thought JCA deails with database connection pool. wat i wanted was to connect to a embedded device throught a port. and i want my ejb to connect to that source and fetch and also write the values...

does ejb support socket communication and all ???

regards
Narendran