Yashar Kalantari

Greenhorn
+ Follow
since Sep 19, 2004
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 Yashar Kalantari

Hi
I am new in jboss and I am trying to define 3 hosts in jboss it seems that I have managed fine but I have a problem with conflicts in bundles properties that I have used in each host (they have same names). Is JBoss Shares A Single
Context Between Diffrent Hosts?!! why I can access resources an bundels in one host from others. please help me out
thanks
15 years ago
Hi everyone

I am completely new in wireless an I need to develop an application on a GPS enabled device in order to send the given location by SMS. first is j2me the right choice to do this is and if it is where should I start.

thanks alot
15 years ago
Hi

I need to generate XML documents an transform them to HTML using cocoon API.
I know how to do this by declaring generators ,transformers and serializers using site map but I need to do this by codding in my own API. can anyone point me to the right direction??

thanks
Hi Damanjit

choosing between cmp and bmp is not an easy task. they both has benefits and disadvantages of their own. I suggest you take a look at the ebook, Mastering EJB available on http://theserverside.com/books/wiley/masteringEJB/index.tss
there is whole chapter named as "choosing between BMP and CMP" in there.

good luck
Hi everyone

I have two ejbs deployed on jboss and it seems that they working fine .the first one is a mdb listening for text messages as follow

code:

package log;

import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
import javax.ejb.EJBException;
import javax.jms.MessageListener;
import javax.jms.Message;
import javax.jms.TextMessage;
import javax.jms.JMSException;

/**
* Created by IntelliJ IDEA.
* User: Yashar Kalantari
* Date: Oct 20, 2004
* Time: 4:19:47 PM
*/
public class LogBean implements MessageDrivenBean, MessageListener {

MessageDrivenContext ctx;

public void ejbRemove() throws EJBException {
System.out.println("ejbRemove() Called.");
}

public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext) throws EJBException {
System.out.println("setMessageDrivenContext() Called.");
this.ctx = messageDrivenContext;
}

public void ejbCreate() {
System.out.println("ejbCreate() Called.");
}

public void onMessage(Message message) {
System.out.println("a new Message!!!");
if(message instanceof TextMessage) {
TextMessage tm = (TextMessage)message;
try {
String text = tm.getText();
System.out.println("Recieved new message : " + text);
} catch (JMSException e) {
e.printStackTrace();
}
}
}
}

ejb-jar.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>Log</ejb-name>
<ejb-class>log.LogBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
</ejb-jar>

jboss.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">;
<jboss>
<secure>false</secure>
<enterprise-beans>
<message-deriven>
<ejb-name>Log</ejb-name>
<destination-jndi-name>ejb/Log</destination-jndi-name>
</message-deriven>
</enterprise-beans>
</jboss>

and the second one is a session bean that sends the message it seems the message is sending with no problem but the mdb is unable to recive it. maybe something is wrong with my jboss configuration? any suggestion?

thanks and regards
yashar
Hi again

thanks guys for your valuable advices. the problem is solved. it was my mistake calling a remote interface jndi resource and casting it to a local interface.

cheers
Hi everyone

I am new in ejb and I need to call an ejb by its local interfaces and I know that my app and ejb should be in the same VM and they are. when I use remote Interfaces its works just fine but the problem shows up when I try the code below in order to work locally

code:
Context ctx = new InitialContext(this.props);
Object obj = ctx.lookup("ejb/MemberHome");
MemberLocalHome home = (MemberLocalHome) obj;

I am not sure if the code is right. when I run it I get a ClassCastException error. what is wrong?

thanks and regards
yashar
Hi everyone

the problem can be solved by downloading the src from SVN repository in
http://forge.objectweb.org/projects/exoplatform/ and building the cocoon sample in exo-demo/portlets/cocoon directory using command maven exo:module eploy. it works fine and the sample in SVN is the only sample that I could get it working.

regards

yashar

[ December 25, 2004: Message edited by: Yashar Kalantari ]
[ December 25, 2004: Message edited by: Yashar Kalantari ]
15 years ago
Hi

I am trying to use a coooon application as a portlet in my portal. I saw a topic in eXo forum which was saying that I must build exo myself in order to get cocoon sample working. I did that but I get the same error that I was getting by binary release.
any suggestions?

yashar
[ December 10, 2004: Message edited by: Yashar Kalantari ]
15 years ago
Hi Sachin

I am declaring my solution acording to sample in URL

http://cvs.apache.org/viewcvs.cgi/jakarta-commons/dbcp/doc/ManualPoolingDriverExample.java?rev=1.6&view=markup

you can change your Driver by changing the Driver package like this

System.out.println("Loading underlying JDBC driver.");
try {
Class.forName("org.gjt.mm.mysql.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}

it's abvioues that befor doing this you need to download this driver from mysql website and deploy it.

for passing username and password to DBCP try this:

Properties props = new Properties();
props.put("user", "username");
props.put("password", "password");

ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(this.getDbURL(), props);

regards yashar.

[ November 25, 2004: Message edited by: Yashar Kalantari ]

[ November 25, 2004: Message edited by: Yashar Kalantari ]
[ November 25, 2004: Message edited by: Yashar Kalantari ]
Hi
I am using Apache BDCP as my connection pool. can anyone tell me how can I configure the pool size in DBCP.

regards yashar
Hi
I need to install OracleAS 10g on RedHat AS 3.0 and it seems that I need a patch (Patch 3006854) and the installation is impossible without it.I just started using oracleAS 10g and I dont have any metalink id.
I think something is wrong here.
a free trial version with a commercial patch
can any one please help me out.

regards yashar
15 years ago