Vaibhav G Garg

Ranch Hand
+ Follow
since Sep 23, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Vaibhav G Garg

Please share your inputs on this. Eagerly waiting for response.
Hi Ranchers,

We are trying to configure multiple queues on WAS and then listening it using the single MDB class.

In EJB 2.0, I found that this can be possible through XML configuration as suggested at the URL:
https://coderanch.com/t/320840/EJB-JEE/java/MDB-Listening-Multiple-Queues

But I didn't find any information on how this can be configured in EJB 3.0 using Annotations. Please share your inputs how this can be achieved in EJB 3.0 using Annotations.

Thanks in advance.

Regards.
Hi All,

I was reading about the Strategy Design Pattern. And, I observed that whatever we achieve in Strategy Design pattern the same thing we can achieve using Runtime Polymorphism in Java. So, I would like to know the actual difference between the two and how to decide which to choose when?

Thanks in advance!

Regards.
9 years ago
Yes, I agree Richard Tookey. Your approach is much more simpler. Thanks a lot for your inputs.
10 years ago
I am able to write down the regular expression for this:


Thanks all for your inputs.
10 years ago
Hi,

I am working on a code where it is required to bind the values from jsp using radio buttons in the bean array. In the code snippet below, if I use status.expression in the name attribute, then I am unable to group the radio buttons since every radio button will be having a different name and hence, I can select multiple radio buttons simultaneously since they don't belong to a group. If I use a constant name to group radio buttons, then I am unable to set the value of the property customerSelected using radio buttons.
On submitting the form, the CustomerInfo. customerSelected should be set true or false.

The code is as follows:

CustomerBean.java




CustomerInfo.java



customerInfo.jsp


sample-servlet.xml


Spring Version Being Used: 2.0

Please guide how can I achieve my target.

Thanks,
Vaibhav
10 years ago
Hi All,

We need to write a regular expression which can accept a list of alphanumeric characters separated by single commas. The list can't start with the , but can end with a ,


Length of the characters will be from 1 to 9. So, considering following examples and their outcomes:



I have written the following regular expression:



Here, it is working fine for all the cases EXCEPT ONE i.e. it always expects the , in the end of the string. But, as per my requirement the string can end with a , or may not end with a , as well. I tried putting ,? but then it starts accepting more than 9 characters since it accepts 0 or 1 , between two entries.

Please suggest how to resolve this issue. Thanks in advance.

Thanks,
Vaibhav Garg
10 years ago
Hi,

We are using J2C connection factories in our project and some custom properties have been defined for these factories in Websphere Application Server.

Our requirement is to read those custom properties through a Java Program. Can you please guide us how to achieve this.

Thanks in advance.
10 years ago
Hi,

We are using J2C connection factories in our project and some custom properties have been defined for these factories.

Our requirement is to read those custom properties through a Java Program. Can you please guide us how to achieve this.

Thanks in advance.
10 years ago
Hi,

We have a requirement where we need to make atleast one of the elements in a group as required. Please refer below:

<Required_Fields>
<AccountNumber>
<UserName>
<AppName>
</Required_Fields>

So, in the above XML structure, my requirement is that atleast one of AccountNumber, UserName, AppName must be supplied by the user. So, we need to validate it using XSD. Can you please suggest if there is any way to validate it through XSD? We need to create the XSD for this.

Thanks in advance!
Also, you can use threading to write to the excel file. It will help in saving some memory and fasten your process.
10 years ago
Hi,

We are having a code where we are updating the rows in a column based on a simple single where condition. Now, the code is in production but it is found that it locks the whole table sometimes. Please suggest how to prevent the table from being locked.

We are just updating a single row but yes there are multiple users of the application.

Thanks
Hi,

We are having a code where we are updating the rows in a column based on a simple single where condition. Now, the code is in production but it is found that it locks the whole table sometimes. Please suggest how to prevent the table from being locked.

We are just updating a single row but yes there are multiple users of the application.

Thanks
10 years ago
Hi,

We are having a code where we are updating the rows in a column based on a simple single where condition. Now, the code is in production but it is found that it locks the whole table sometimes. Please suggest how to prevent the table from being locked.

We are just updating a single row but yes there are multiple users of the application.

Thanks.
Hi,

I have a Map of Language Code (as Key) and Lanuage (as Value). I have to sort the map based on the values in the map.

But, in addition, there is a requirement that certain languages such as EN=>English, SP=>Spanish will always be on the top of the map. So, please suggest a suitable approach to achieve this.

Thanks.
10 years ago