abhishek paul

Greenhorn
+ Follow
since Sep 26, 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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by abhishek paul

Benoît de Chateauvieux wrote:
From an larger "integration" point of view, this article from IBM was useful for me: it gives you the keys for choosing among WS, JMS and JCA.



Hi Benoît,

For the Integration & Messaging sections..and specifically the objectives 1 and 3 (sun site) ..will you recommend that the above ibm link?
Also the Chapter 6 of the paul Allen study guide covers the Legacy Connectivity ..do you think we need to cover this indepth ?
8 years ago
Hi Guys,

Hope you are aware Acegi security is part of Spring now and is known as Spring Security framework.
Find below some links which should be helpful.

http://static.springframework.org/spring-security/site/start-here.html
http://server.denksoft.com/wordpress/?page_id=5

A suggestion:
- Dont just follow a sample application/step-by-step guide.
First try and understand the underlying concepts/approach of the framework and then evaluate whether it is suitable for your requirement.
8 years ago

Ravi wrote:Hi All,
Is there a way to invoke a bean to different module from working module. Example: I've a module where i've to use a bean in reports module ( different project in cvs ) i tried to call but it shows bean not defined exception. Is there a way i can make calls to this reporting modules bean? your views are greatly appreciated.



..In case this is still unresolved -

so apparently what you are trying to do is to be able to access a bean defined in one application context from another appication context...in which case you can share the contexts..a mechanism used to deploy multiple-war spring application.To explore more click here - http://blog.springsource.com/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-spring-application/
8 years ago

Julio Cesar Marques wrote:And there is nobody talking about NetBeans IDE. Will be it replaced by JDeveloper?



..wont be surprised if this happens!!Anyways as far as IDEs are concerned Eclipse will still be open source and hence will top the list.

Jan Cumps wrote:So will SCJP now become OCJP



..i think Oracle has lot to think about for the next 6-8 months than wondering how to take of the Sun certification holders.So we will have to wait.

jeff mutonho wrote:I'd booked to do part 1 of SCEA at the end of May . Should I wait now to hear what Oracle plans to do with certification?
What would you do



..you can drop a mail to SDN.I am sure they will help you better.

Overall its too early to even predict anything.Anyone who uses anything which was invented or initiated by SUN should be concerned now. Oracle is a aggressive company and would definitely take steps to position itself as the market leader in the Technology space. So next 6-12 months would be interesting for all the SUN followers.

This is just for the Java Followers :

Oracle might use Java and rest of the JEE components to strengthen its Middleware offerings.So even if it locks down JDK, the language would still thrive, although it might lose some of its charm.Open Source business model might change/cease to exist.In which case Oracle will have to address a large community or may be some one else comes up with something!!Also lets not forget there are still big players contributing to Open Source.Anyone from SAP please speak up!! I know for sure that not only does SAP endorse Java as a language but it supports the Open Source Business Model as well.




8 years ago
Himanshu,

I am sure you might have gone thru wikis and other online stuff to get yourself acquainted with AOP. Heres my 2 cents..

While Object Oriented Programming concepts revolves around Classes,Objects and Methods, Aspect Oriented Programming talks primarily about Aspects which according to the Spring Reference Docs can be defined as -

Aspect : A modularization of a concern that cuts across multiple objects.

Lets have a example, that of Logging in the Application. So in a plain vanilla Java Application one would achieve Logging in the following way:

1. Prepare a log4j file (.properties/.xml).
2. Make sure the Application is able to access this file. By loading it using PropertyConfigurator/DOMConfigurator or using a Servlet.
3. Then in the Classes where logging in intended put the following lines of code :

Logger logger = Logger.getLogger(this.getClass());

And then use the appropriate methods DEBUG, INFO, ERROR etc as needed.
In order to implement logging throughout the application step (3) needs to be repeated wherever logging is required. And we end up having redundant lines of code achieving a common goal – Logging. Here we find that Logging is definitely a general feature of the Application. In AOP jargon this general feature is termed as a concern, one that cuts through the entire application – a crosscutting concern

Now let’s again take a look at the definition (see above).So AOP suggests that Aspects be defined which in turn would work on a particular concern (i.e. logging in the example above).These Aspects can then be plugged into an application in a flexible and modular way.

Following points can be summed up at this point:

1. Aspects separate the concern from the rest of the code into its own structure. The crosscutting concern is encapsulated.
2. Invocation of an Aspect is Implicit.

Some AOP terminology -

Aspect : A modularization of a concern that cuts across multiple objects .Apart from that seen above Transaction Management is also a good example of a crosscutting concern in J2EE applications.So since Aspects are plain Java Objects(POJOs), these can replace EJB.

JoinPoint : Point during execution of program such as a execution of a method or handling of an exception.

Advice : Code that is invoked during program execution, and is the logic for implementing an Aspect.

Pointcut : A set of joinpoints specifying when an Advice should be fired. The pointcut concept is the key to AOP. This enables Advice to be targeted independently of OO hierarchy.

A comparison between OOP and AOP -
Similarities - both use Objects. The behavior and data of a concern is combined into a single physical entity using objects.
Differences - OOPs tries to push the scattered code for the concerns up in the inheritance tree. This is often not possible and results in tangled code.AOP collects scattered concerns into a single class structure and inserts them horizontally into the code.

Advantages of AOP -
Separation of Concerns - AOP makes it possible to encapsulate even cross cutting concerns.
Simpler System Evolution - Join points allow changes to programs to be incorporated simply with aspects.
Reuse - Aspects can often be reused in other programs with only slight modifications.
Adaptability - Easy to quickly adapt a change in a concern.
More Comprehensive Systems - Separation of concerns makes it easier to quickly see and understand concerns.

Pat Farrell wrote:My suggestion is: Do not use RMI

Pass messages, using REST

IMHO, YMMV, etc



Can you explain what makes you conclude this.To me this seems an exaggeration...i mean firstly i don't have to worry if the platform is non-java coz it is not, secondly the whole process of marshaling from java objects to xml is an issue..i think we should prefer communicating using RMI at least in this scenario.Please pitch in your suggestions.
8 years ago

Ulf Dittmer wrote:I'm not sure what exactly you're asking. It sounds as if the process is all set up and working fine; which concerns do you have that you'd like to address?



What we are looking for is a better way to upload files.The above process is all well and set but is this the best approach for file upload.Some might say it is...well atleast I would, since thats what is running in Production now without frequent hiccups!!..although would like to know whether fellow ranchers have any alternate approach in mind.
8 years ago
Hi,

The application we intend to build has been divided into seven modules.Earlier we had decided to start the development simultaneously(.. we have ample resources!!) and eventually deploy it in Jboss as one EAR file with different WARs. Now due to deployment concerns we have decided to drop this approach.

We are contemplating on having more than one JVMs each being utilised by say 2/3 modules.Interaction between them would be implemented by Java RMI.To be precise we would have to make sure the modules 1 , 2 and 3 are running in JVM 'A' while modules 4 , 5 and 6 are running on JVM 'B'.And use RMI for any inter module interactions.So what it would imply is that each box would have more than one JVM.Would be going for horizontal clustering for scalability, although thats a different issue anyway.

Please suggest what could be the loopholes.
8 years ago
Answer to first question: Yes you can have two , in fact more than two JVM in the same machine (Vertical Clustering involves this..)
Answer to second question : Yes, but dont know why should be there a need !!
hey sherif,

One might have N number of factors due to which he/she chooses a job.As arulk advices above, first you need to decide what you would enjoy doing most - programming or coordinating among teams...

Actually I have known people who prefer programming even after 12 years in the IT industry, also there are people who, very easily put on the project management shoes and are at ease while coordinating with teams and doing all the management stuff, at a very early age.Either ways its only possible if you love what you are doing and enjoy it thoroughly.

I guess this isn't helping..or is it? :roll:

Coming back to the N number of factors I mentioned in my initial lines , I guess the bank might have offered you good enough package to lure you to accept the offer..or was it a wrong decision entirely!!..OK please pardon me for being derogatory but before saying YES to a job one needs to weigh the factors available to him/her.Presently these are trying times for any industry and recession is common every where.In such a situation one might not get the kind of job he/she is looking for, in fact just having a job should be considered a privilege.

Looking at your situation you should continue with the ensuing work profile with the bank while making sure you are updated with the progress in the J2EE world..though this is easier said than done..but then if you really think you want to write some code i am sure you will find a way out..
9 years ago
Hi,

I have some concerns as explained below :

Presently there is File Upload requirement in our application.This is a web application deployed in Jboss and has Oracle as Database.We also have a File Server for file storage.We are using Struts as the controller and there are no J2EE layers as such(no transaction..plain vanilla web application...!!).
So presently when the user clicks the Mass Upload button an Applet open which allows the user to browse and select the files to be uploaded.Once the submit button is clicked the files are sent as described below -

(1)first the file content is streamed to a Temp directory in the web server(TCP/IP tunnel..).
(2)the file content is then streamed to the file server (another TCP/IP tunnel).
(3)finally user is intimated the success/failure message.


We are analyzing the pros/cons regarding this approach and trying to find out ways to improve.Our conclusion so far:
(a)Since we are sending data through TCP/IP there are no size restrictions.Files of any size can be sent.Most web browsers have 2GB and size restrictions so the reluctance of sending data through http.Also it might not be practiccal enough to send large files in http.
(b)Users can browse to other pages in the application without affecting the file upload process.


Please help and suggest ways to improve.
9 years ago
Hi,

I have a requirement in my project where once the user logs in, the database is queried and some information
related to the user is retrieved and stored in JVM.So the number of hits to the database is decreased.

The requirement in detail :

This is Simple Cart-Shopping application.
There is a UI which displays various products which one can view and purchase.

1)Once the user logs in he can view the various products.
2)There are restriction which decides which products that particular user can purchase,
although a user can view all the products listed in the store.
3)Every time a user clicks on a product, database is queried to retrieve access info for the user on that product.
4)If a user has proper access only then he can purchase the product.


Presently the database is queried in all the four steps explained above.

I intend to :

Hit database once user logs in and retrive information regarding the access levels of the user for all products listed in the store.
Persist this info in JVM(serialization or by other means...).
Now for any further access info, the persisted objects will provide the data.
This reduces the database hits.


Other details :

App Server - Jboss
Database - oracle
Expected Concurrent users - 2000 - 3000

Please provide your suggestions as to what should be the ideal approach.

Thanks,
Abhishek.
9 years ago
Hi,

I have a requirement in my project where once the user logs in, the database is queried and some information related to the user is retrieved and stored in JVM.So the number of hits to the database is decreased.

The requirement in detail :

This is Simple Cart-Shopping application.
There is a UI which displays various products which one can view and purchase.

1)Once the user logs in he can view the various products.
2)There are restriction which decides which products that particular user can purchase,although a user can view all the products listed in the store.
3)Every time a user clicks on a product, database is queried to retrieve access info for the user on that product.
4)If a user has proper access only then he can purchase the product
.

Presently the database is queried in all the four steps explained above.

I intend to :

Hit database once user logs in and retrieve information regarding the access levels of the user for all products listed in the store.
Persist this info in JVM using either Hibernate,JPA or JDO api.
Now for any further access info, the persisted objects will provide the data.
This reduces the database hits.



Other details :

App Server : Jboss
Database : oracle
Expected Concurrent users : 2000 - 3000

Please note that the attempt is to utilize only the persistence feature of the above APIs although I accept the fact that the functionality described above might not call for such heavy persistence frameworks.Please provide your suggestions as to what should be the ideal approach.


Regards,
Abhishek.

[ November 05, 2008: Message edited by: abhishek paul ]
[ November 05, 2008: Message edited by: abhishek paul ]
thanks Peer..links were really informative !!
9 years ago
..as Adeel rightly says keep the properties file inside WEB-INF/classes/resources folder and the corresponding code would be :

------------------------------------------------------------------------------

ClassLoader cl = this.getClass().getClassLoader();
InputStream inputStream = cl.getResourceAsStream("/resources/SedApplication.properties");
System.out.println("Input Strem is : " + inputStream);

-----------------------------------------------------------------------------
9 years ago