Dima Riabin

Greenhorn
+ Follow
since Jan 05, 2011
Dima likes ...
MyEclipse IDE Windows XP Windows
Merit badge: grant badges
For More
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dima Riabin

Please help me with what is happening

I have a client, calling an ejb method - doSomething()


Inside that doSomething method we create and send JMS message to the jms queue
This is done by method doMessageSend (..) and that method looks like this



There is a component running on the server (same OR different from where ejb is ran) .  The component process messages from the queue and writes some records to the database.
The task is:  
- Before doSomething() method returns, I have to make it wait for the database records written by the component that reads the JMS queue.  However, that component never starts processing the queue before doSomething returns.  When doSomething returns, that queue processing component starts its work.

How can I make queue processing component start before doSomething() returns ?

Transaction attributes??
6 years ago
Hello, I am a novice with JMS and need help playing "by the rules" within existing architecture.

In the system, I am supposed to modify, we have Client making an an ejb call on the server (weblogic), that in turn doing certain operations and as one of those operations, it placed a message into JMS queue "TheQueue.queue"

There was a console application constantly running that consumes the message and does whatever work to be done.  However, it never sends client code the result.  So, from client perspective it was something like "Done processing, see the server results for when ready".

But now, some functionality we add, that places the need for client to know !! when that console application that consumes the queue, writes some results to the database.  Basically, when it finishes writing, client must read one of the written fields.

What are the options that I can attempt?  What are the patterns to approach this?  Create another queue that would be written from console (jms consumer) app ? and introduce a "consumer" on the client?  Anything simpler ?  
6 years ago
I am a beginner of EJB and java EE in general, but with good knowledge of Java as a language itself
Currently I am on the project of what we call "Switching to EJB3 and JBOSS"
We used Weblogic (older version with ejb 2.0) and I have to now convert everything to EJB 3 and clients to be setup with webservices.
So, the issue is: I have stripped the server side component of all weblogic related stuff, rewrote some of the code to conform to EJB3 environments.., deployed it to JBOSS. It worked out in a simplest terms.

But are there standardized patterns to how to use existing EJB server side components and writing new client with webservices. Or is it a a gray areas, where I have to develop my own architectural strategy ?
The issue is, that I can't even use the standartised eclipse/net beans tools, since our project structures/build system is a little outside on how tools would organize things. Not much, but .. still. And this can't be changed !! (unless I want to undertake a role of managing all the build support for the whole company )

I am trying to start WL managed server "MyServer", using WL Web console.
When I hit start I see a green message



However, Status of Last Action says "Failed". The log for AdminServer has one message


I suspect/recall it may have to do with the lok files, so the only edit.lok file I can find is in C:\bea10\user_projects\domains\ directory. And it is not 0 size. I Delete it anyway, then go to start the MyServer again, and get the same results, with the same message.

I also, see the following in AdminServer.out log file



It is from some time in between few times I was trying to restart MyServer, but it doesn't follow every attempt. So, I do not know if it is related or not.

Searching the web, gives me only questions about it from people but I can't find anything helping to remedy the problem.

I can probably restart AdminServer once, if I really have to, but there are people working on it, and it is not doable on a frequent basis.

Can anyone here help? My expertise with WL Server is a "user" - I am able to deploy apps, create servers/datasources, etc.. with the web console. Never used command line.
10 years ago
Hello. Could someone help me with struts2 and Json for the list of records be displayed on a jQgrid ?

The issue I am having is small, but painfull and I can't find how to fix it.
I inheritted an application written in Model 1 web application pattern and have converted it to using Struts 2. Now, have to change some GUI.
The is a JSP page (JSPFile1.jsp) that displays a gird using JQGrid, it displays it correctly with no problem. The URL for the grid goes to another JSP (JSP_JsonGetter2.jsp) and that JSP_JsonGetter2.jsp is nothing but a call to a server side static code that
1) makes call to database
2) builds a Json object from result set
structure of jsonObject is:

Now, this static method used the following to output the JsonObject:
This works fine.
When I created an Action class, where I did copy-pasted the code from that Static method, everything is OK, however the Json Object that comes from it looks like this (with excape \):



I happens the "result" variable in my action, is of type String (I do have getter and setter get/setResult()). Just an empty grid or page not rendered.
If I make it be of type JsonObject (use gson, google Json framework) I get an exception on a webpage .. which I can't understand.
Please, help with any advice?
10 years ago

Govind Kurup wrote:Hello,
Have you used "null" as the parameter for
showSaveDialog(Component parent)/ showOpenDialog(Component parent) function.
If so then replace null with the main JFrame class instance (assuming your main class is a JFrame).
It should work..



Thanks. That was exactly what it was. There was null passed as a parent parameter....
10 years ago
sudipto shekhar, thanks for your reply. we do use default authenticator

I did resolve the problem I had.
the issue, was that we switched to use different LDAP server, and on that server, I was included in all the groups EXCEPT the WLAdmin. That's I was still able to use other services requiring LDAP authentication and not WL console ...
So .. nothing technical ... just managerial issue. I don't have access to LDAP browser. I had someone from another team look it up for me, and restoring my user there.

So, more of a general question remains: How do I usually go about asking for access to these things? Is it application support who can provide me with these?
11 years ago
I used to be able to log in to weblogic console with the username and password setup for me, when I came to the company. Recently, those credentials of mine are not working anymore - I get " Authentication Denied ", and the person administering this has left the company last year, making it my responsibility to figure things out.

We use weblogic 10. I am pretty sure, that I was loging in before with my LDAP credentials, however there are few application we have, where that LDAP user of mine still works fine.

I can login with another person's LDAP credentials, however it is inconvenient.
Can anyone help, directing me where to look for the solutions? I never had to configure anything on weblogic befoe, besides deploying applications. Thanks
11 years ago
The question, might be somewhat 'different'. But maybe some people thought about it and can share

I am looking for books or maybe web materials on java technologies, such as Spring, Hibernate, also some advanced core java like Multi-threading.
However, while I Know and read the now trending popular titles, I am looking for specific.
I am looking for exercises Sort of like "after chapter questions and problems". Like it was with the basic programming books in college.
While learning new technology like Hibernate (for me) I can visualize the big picture, but it's hard for me to come up with my own exercise for a particular topic/chapter.
I am particularly interested in such resources for Hibernate and Spring.
Has anyone seen anything of sorts? Can share anything ?
11 years ago
Hi, I am debugging the server-side component, deployed on WebLogic (10) as ear file.
In the 'Server Start' on my server instance I have all the settings for turning the debugger on.
In the eclipse I created set up the server and port (from the settings on the server) and running it. My application finishes, and the break points are never getting hit.
The similar configuration works fine on the other server instance. And this one was OK little over a week ago.
Where can I look to figure out what the problem is? I didn't redeploy the ear file, so compiler settings should not have changed
11 years ago
Thanks for your reply. I have tried this solution, but .. who and where is it called?
My jsp has input field like this:

<s:file name="userFile" label="File "/>

and then in the action, I have

private File userFile;
private String contentType;
private String filename;
private String statusString ;

I have the getters and setters for the fields:
Now note: The userFile is the file that is ON THE SERVER, and it doesn't have name the same us the one on the client.
When I choose the file from fileChooser in the browser, I select file named "abc.txt", then struts UPLOAD THE FILE TO THE SERVER, and after that my action is taking place. So when 'execute()' method is entered 'userFile' is the file that already sits on teh server, and it's name is DIFFERENT from what the original file name was.
I was interested in how to have access to the CLIENT side file name.

I know what Struts Interceptor is doing:
Interceptor wrap HttpServletRequest into MultiPartWrapper, and then that MultiPart wrapper has a method 'getNames' that returns an array of file names. This really comes from the request object, but .. in the struts action, I have access to the request object - that doesn't have the method to give me fileNames - I will have to repeat what is already done in the interseptor. I was wandering if I can avoid this, if the client file name can be available to me some other way
12 years ago
Hi, I upload the file using Struts 2, then the content goes to the database. In teh database I store file content, content type AND FILE NAME AS IT IS ON THE CLIENT MACHINE (whatever the client sees in the 'Browse' when choosing the file to upload - for example 'myFIle.txt' ).
However, the problem is, when I store the file to teh database, it takes place on the server, and at that time I only see the file name as it is AFTER BEING UPLOADED TO THE TEMP DIRECTORY ON SERVER.
(something like 373_393jfu_39.tmp )

How can we access the name of the file that was actually on client?
I know that for security reasons, struts somehow hide the uploading process... but is there way to hack in the process to get parts?
12 years ago
SQLException weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool myDb.datasource to allocate to applications, please increase the size of the pool and retry.. .

Hi, people.
The above is the error I am getting. I am working with Struts 2, and I think, that I properly close connections opened throughout various actions, using finally blocks.
I am porting existing application to Struts 2, application originally is written with simply JSP and core Java, no framework whatsoever was used. I also took care or I think I took care of overriding the main class's finalize method, doing closing connection there.
This is the class that does all the mixing of business logic and JSP presenting.
Can anybody suggest, what else can I look at to remedy the exception above? My pool on weblogic is allowing 15 connections now, and considering that there are potentially 1-3 users to my application and even those won't be using it at the same time, I think the pool size is fine.
12 years ago
[quote=Jesus Mireles]ServletActionContext.getRequest().getSession()

Which will get you an HttpSession
[/quote]

Yes, thanks. This is what I did. I found it by browsing through Struts related class libraries for class names with the "Servlet" in them, and found this mechanism.
12 years ago