Abhin Balur

Greenhorn
+ Follow
since Feb 18, 2008
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abhin Balur

You dont have to worry about the queuing up the requests. The container(Tomcat for example) will do it for you. The developer of the servlet just has to worry about the what the servlet does/the servlets job. In your case fetching data from the database and returning it.
5 years ago
Ok. Lets say there are 2 million users; but i want just 20,000 of them. And i choose to go with the default fetch size of 10. How does my code look?.. Do i have to keep waiting over the resultset to check if the slot of 10 is filled? I mean what happens when i am iterating over the resultset in this case and the next batch of 10 is not yet retrieved from the databse?
Wanted to understand how setFetchSize works. I understand the use of setFetchSize; which basically sets the number of records to fetch from a select query at once so as to minimize the round trips to the database. But in cases where the database has huge number of records (say millions) and with the fetchsize of 10(default); how is the user/application/developer supposed to make use of setFetchsize. Is the user expected to quickly utitilize the result set after the first round of '10' records? any example of the use of setfetchsize where large data is queried will help.
Hi All,

Have been having a hard time configuring logs. We have an ear file with lot of wars and ejb jars. This ear sits in deploy directory with few other ear's.
the path of ear is ../server/myServerMgmt/deploy/Myear.ear. Now in this ear are few wars which have DWR configured. JBOSS version 6.1.0

We use log4j for logging. Since its common log4j for all these ear's we have it in ../server/myServerMgmt/conf/log4j.xml which is in the classpath. We get all the logs as needed. No problem there. But we do not seem to get DWR logs using this log4j configuration. However if we configure jboss-logging.xml to provide these DWR logs; they seem to work fine. From jboss-loggin.xml though i do not seem to get my application logs.

If you see the configuration now; it is split across log4j.xml(my application logs) and jboss-logging.xml(DWR logs). Since one doesnt seem to configured from the othere. My requirement is to have them configured at one place. Does anyone seem to know what is wrong here.?
5 years ago
@ Mike,
Maybe i wasnt clear with the question much. What i meant rather was a stateless sesssion bean "having a singleton". A POJO singleton. And not a stateless session bean marked as a singleton using @Singleton.

Thanks!
Hi all,

New to EJB 3.0 and learning. I just had this question. I know that stateless session beans do not maintain any conversational state and are for pure state-less business logic processing and are pooled by the container. But what if we have a singleton inside a stateless bean. Doesn't that maintain state? Particulary because singleton returns its one(same/static) instance every time and stateless beans which have this singleton get pooled and hence are not unloaded from memory; which keeps the singleton instance as well in memory?.

Please correct me if i have got my understanding wrong here. I have a feeling i am 'missing something/do not know' on class unloading because of which i have this question.
HI,

How do i get the name of some object(reference variable name) in java?

for example for the below code:

Paper papi = new Paper();

I want "papi" at runtime. How to do that?

Thanks
10 years ago

Waiting for replies. If any doubt in understanding my question please ask me.

Thank You All.
10 years ago
@Maneesh

I got your point. Dealing with text/appearance will be much easier. Thankx for the quick replies. Will keep posting if i get stuck while writing the puzzle

@Rob
Just for the knowledge; is there any add method that takes the location index?
10 years ago
To Manish,

Now that you know what the puzzle is; i will be using buttons on a JPanel with GridLayout. I just checked the API docs for this layout manager. From the first look it appears methods removelayoutcomponent and addlayoutcomponent will be helpful but it does not specify at what point on the layout, for example 4th column-3rd row to add or remove the component. I will be needing the location of the buttons. Is there anyway i can add/remove/get a compoent at a specific point/cell of GridLayout?
10 years ago
Hi All,

I want to try my hands on developing some small games. I would like to start with the Square game; the one which involves sequecning the numbers, and placing them in sorted order. However i am new to Swings. So the only hurdle here is developing the GUI for me beause rest all would be pure logic. I would like to know which layout manager would be helpful, as it will involve relocating the components on a Jpanel on mouse clicks and any method which would do the same.

Thank You.
Regards.
10 years ago
Hi All,

I want to try my hands on developing some small games. I would like to start with the Square game; the one which involves sequecning the numbers, and placing them in sorted order. However i am new to Swings. So the only hurdle here is developing the GUI for me beause rest all would be pure logic. I would like to know which layout manager would be helpful, as it will involve relocating the components on a Jpanel and any method which would do the same.

Thank You.
Regards.
10 years ago
HI,

I am so sorry, i forgot to change that line and add some more to the description.


Here are the changes:-

that line is as follows:-

remtable.setDefaultRenderer(remtable.getColumnClass(remtable.columnAtPoint(q)), renderer);

As you can see above i am using Point q. This Point is also passed to this Reminder class to get the column class as shown in the line of code above.

Is it this that is creating the problem?


THanks
10 years ago
Hi,

I am using JTable for the fisrt time. I have a problem in rendering specific JTable cell. Here is what i am doing. I have a window(JFrame class) with a calendar on it. Calendar is implemented using JTable. When the user selects a date and chooses to set reminder another window(Reminder class) opens to set reminder. After he types in his reminder note and presses "OK" i want that particular date to be of some color. I am passing reference of the Jtable to the reminder window and the below code is what i am doing in the Reminder class to set the color for that cell but it is not workin out.

Here is the code:-


This is how i am installing the custom cell renderer in the Reminder class:-

MyCellRenderer renderer = new MyCellRenderer();
remtable.setDefaultRenderer(Color.class, renderer);

- remtable is the passed reference


This is my MyCellRenderer class:

class MyCellRenderer extends DefaultTableCellRenderer {


public Component getTableCellRendererComponent(JTable table, Object value,boolean isSelected, boolean hasFocus, int row, int column)

{

Component renderer = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

renderer.setBackground(Color.RED);
renderer.setForeground(Color.BLUE);
return renderer;

}}

Would appreciate some quick responses.

Thank You.

10 years ago