K Kiran Kumar

Ranch Hand
+ Follow
since Jan 04, 2006
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 K Kiran Kumar

Hi,

I found the solution. Donot use connection.setClientID("durableIDCF"); in the subscriber code as the clientID already exists i.e., in the connection factory the client was already defined. So I was trying to define it again and its failing. So summary is
(1) Dont do anything in the publisher
(2) Define the clientID in the Connection Factory
(3) Give some unique name to the subscription name in the subscriber code.

Regards,
Kiran.
Hi,

I am developing a sample JMS application. I am using IBM WAS 7.0. I am using the default message provider of WAS as the JMS provider.
The application has TPublisher.java (puts the messages in the topic) and TSubscriber.java (reads the message from the topic).

I have configured the SIB, Topic, Topic Connection Factory (standalone application to access the topic) and activation specifications (for MDB to access the topic). I was able to create a durable MDB subscriber by defining the clientID and subscription name in the activation specifications. I am also successful in creating a non-durable standalone consumer.

I want to create a durable subscriber from the standalone application that consumes my TPublisher.java. I know I have to play around clientID and subscriber name but not sure what needs to be done.

My question is where to define clientID and subscriber name in the
(1) standalone publisher program (if any)
(2) where and what to configure in the admin console of WAS 7
(3) what to add in the consumer program so that my standalone consumer becomes a durable one.

I tried giving the clientID ("durableIDCF") in the topic connection factory (in the admin console) and used the below code in the consumer.
session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
connection.setClientID("durableIDCF");
topicsubscriber = session.createDurableSubscriber(topic,"mySub"); // not sure where else to initiate/define the subscriber name of "mySub"

However, I get the below error. I tried googling but didn't get a clue as what needs to be done. Any help would be greatly appreciated.
javax.jms.IllegalStateException: CWSIA0023E: The client ID for this connection is read-only.
at com.ibm.ws.sib.api.jms.impl.JmsConnectionImpl.setClientID(JmsConnectionImpl.java:431)

Regards,
Kiran.
Hi Brijesh,

I hope you are trying to call the Bean that implemented the Remote interface. I have done using WebSphere. I guess the logic should be the same. Can you please use the below code and try to call the EJB method.
Hi,

I found the solution. Search for the file ibm-ejb-jar-bnd.xml (should be in ejbModule/META-INF/). Keep an entry in the file.
Example:
<session name="xxxServiceClass" simple-binding-name="ejb/abcd">
<resource-ref name="datasources" binding-name="datasource JNDI name"/> <! This is not mandatory-->
</session>

Regards,
Kiran.
Hi Kevin - Thank you for the response. However, I am looking for the name change as James Suggested.

James - Thanks a lot for your response. I tried out your suggestion. However, I get NameNotFoundException.
I used
StateLessBeanLocal local = (StateLessBeanLocal) ctx.lookup("foo"); in my client code and
@Stateless(name = "foo", mappedName="foo") in my Bean class

Please let me know if I am missing anything here.

Regards,
Kiran.

Hi,

I am using Eclipse+WAS 7 to develop my application. I have an EAR, which has a web application module and an EJB module.
I am able to access my EJB methods using the below client code. This code is from my web application.

My Client to access EJB methods:


Local interface:

Remote interface:

EJB Bean:


I learned that I am accessing the default JNDI name of the EJB.
Could someone please let me know how/where I can customize the JNDI names to access the EJB bean methods so that I can access the bean methods using
ctx.lookup("xx/yyl"); instead of ctx.lookup("ejblocal:a.b.ie.StateLessBeanLocal");

Regards,
Kiran.
Tim - you are correct. WebSphere - IBM has documentation. I had been to many URL's and in none of the URL's the solution is not complete. There is no real time end to end configuration/setting in a single link.... I almost spent 2 days searching for the same and I failed to find a good link to my problem. It may be either I am not good at searching or the documentation is awful...

Regards,
Kiran.
8 years ago
Hi Jimmy - I appreciate your response. Unfortunately the URL you provided was based on Apache axis and using Tomcat server. When it come to Websphere, the concepts remain the same but the way web services are configured will differ i.e., we can configure the security in the Admin console by creating tokens and binding them to application. I am more interested in finding out the same.
Regards,
Kiran.
8 years ago
Hi,

I am using RAD 8 and WAS 8 for my application development. I exposed a method as a web service, generated WSDL, then clients and was able to access the web services using the client classes.

I want to impose security constraints on my web service because people who knows my WSDL and who are in my network can use my web services.
Could some one please explain me how to impose security constraints (Username Tokens) for my web service at the PRODUCER side in WebSphere server. I tried googling many links and unfortunately I didnot find a good URL to suffice my requirement. I guess there is some configuration required at the Admin console. NOt sure what it is....

I know how to access the WS from the client (CONSUMER) side. I just need to add the following in the header in my SOAP input request to access web services.

Regards,
Kiran.
8 years ago
Hi,

Can anyone suggest some API's for the following:
I have a sample URL (https://confluence.cornell.edu/display/culpublic/Display+search+results+from+the+CUL+web+page+GSA+collection), where in if I send a request to the server, the server will send the xml response.
My queries are:
(1) How to send the URL request by code (Not by servlets, but by core java)
(2) How to retrieve the XML data sent by the server in an object.

Regards,
Kiran.
Hi,

Can someone please help me on my issue.

Regards,
Kiran.
9 years ago
Hi,

The following scenario will depict what I was refering to -
In Struts, if we refer the taglib <%@ taglib uri="/tags/struts-html" prefix="html" %>
and use <html:javascript formName="MyJavaBeanClass"/> in my form/head tag, then instead of displaying the error messages on the JSP page, the error messsages will appear in a popup window. Just refer the below link for better clarity:
http://www.roseindia.net/struts/address_struts_validator.shtml

I am looking something similar to implement the same in Spring. I am not refering to the manual javascript validations here. I am doing the validations using the commons validations framework. I guess I am just missing a small tag to add(not sure what it is). Any help would be appreciated.

Regards,
Kiran.
9 years ago
Hi friends,

I am using the commons validator(validator.xml and validator-rules.xml) for validations in Spring. I am able to validate the pages successfully. Here is my JSP page.


However, my requriement is that instead of displaying an error message in the JSP page, I want the error messages to be displayed in a popup. How can I do that in Spring?Any suggestions...

I appreciate if someone could help me on this. Am I missing anything? I tried in google but no luck...

Have a good day!

Regards,
Kiran.
9 years ago
Hi Satish,

We cannot connect directly to the database using flex unlike Java. Is there any alternative approach given in your book? Please let me know.

Regards,
Kiran.
10 years ago
Hi,
How would you insert this record if you would use an sql query tool?
I use TO_DATE('12-08-2009','DD-MM-YYYY') function.
How would you format the timestamp then?
In java there is no TO_DATE type method and hence trying to insert the Object.

The output for "insert into TEST12345(ff) values ("+ts+")"); is
insert into TEST12345(ff) values (2009-10-08 11:41:38.984)

Thanks for the suggestion.

Regards,
Kiran.