J2EE Architecture: J2EE Design Patterns: Related Concepts #Java Short Notes

  • Design Patterns
    • What are design patterns? Design patterns are specific/(context-based) solutions/approaches to address specific problems/situations. Some problems are general/open problems and very common problems in a particular type of applications. Design patterns can be created to solve such problems in a specific context and that can be re-used every time that type of situations arise. Design patterns help designers to easily communicate their ideas (in a common concept).
    • Benefits: Proven solution to a specific problem, saves time as you don’t have to come up with an original solution each time you encounter a particular problem
    • Design patterns can be applied at different levels of abstractions such as, Analysis, Architectural, Behavioral, Creational, Design, and Structural
    • J2EE patterns are mostly for design and architecture purpose and for three architectural tiers: Presentation, Business, and Integration
  • J2EE Applications: Client Tier (Clients for J2EE Applications): Design Issues
    • J2EE supports many types of clients. Hence, you need to decide which types of clients you want to make use of. Also, based on the clients you need to decide how to solve a specific problem. Design patterns can be client-specific and problem-specific
    • J2EE clients: laptops, desktops, palmtops, and cell phones.
    • Connection Mechanisms (to J2EE Applications): an intranet, the Internet, a wireless network, a wired network, and a combination of wired and wireless networks
    • Clients can be thin, server dependent, browser based, rich, and stand-alone
    • Client design issues: Concerns: which types of clients to use, should more than one type of clients be supported?, network types to support, security considerations, platform considerations, and unreliability of networks
    • Clients should: Connect to the network on an ad-hoc basis, transmit minimum amount of data, should consider situations when firewalls may block particular protocols, mobile clients should consider that they have small display screens and limited resources
    • More design issues for J2EE clients: Logic for user interface presentation, validate user inputs, communicate with the server using a common protocol, maintain the conversational state
    • Browser clients – design issues: can not function independently of the server, easy to design and implement, widely available, well-familiar to the users, provide limited functionality, can perform user input validation, servers can also do the validation, uses HTTP protocol, needs to maintain conversational states using Cookies, URL rewriting, or server side session
    • Java clients – design issues:
    • Client types: applications, applets, MIDlets are the Java client options
    • Applications like usual desktop applications – can run offline, use JFC/Swing for user interface, provide richer user experience, more responsive than thin clients, use less bandwidth than browser clients, and can create fewer connections than browser clients
    • Applets run mostly under browsers, use JFC/Swing for user interface
    • MIDlets are mostly for small applications for cell phones, two-way pagers, and palmtops – use MIDP user interface APIs
    • Java clients (Applications, applets, MIDlets) can handle most user input validation and hence, reduce network overhead, can connect to J2EE applications, directly to the web tier (using HTTP though face some complexity of translation), EJBs, EISs,
    • Applets and applications can connect to EJBs directly,
    • Java clients can access EIS tier directly (not recommended as it would bypass J2EE server and transaction management)
    • Java clients have the facility to cache and manipulate large amounts of state in memory and manage session effectively
  • Web Tier
    • Servlets, and JSPs are web-tier component
    • Manage the interaction between web-clients and the application’s business logic.
    • Output from this tier: mostly HTML and XML content
    • Business logic can be implemented entirely here, though, enterprise beans are recommended
    • Servlets should be used to: implement web-application logic, generate binary content, act as a web-tier controller
    • JSPs are better suited to generate static HTML text
    • JSP Purpose: produce structured textual content, generate XML messages, act as templates
    • In JSP, custom tags are more desirable than scriptlets. Why? scriplets – not reusable, mix logic with content, make JSP pages difficult to read and update, errors can be difficult to interpret, difficult to test (including unit testing)
    • Web-Tier Application Framework
      • Many web-tier application requirements are not met by the actual J2EE platform. A framework working on top of J2EE can meet these requirements such as, dispatching requests, invoking model methods, and compiling views.
      • Making use of existing ready-built and proven application framework is recommended than creating your own [it takes time and may be all your designs will not be the best]
      • Some frameworks: J2EE blueprints Web Application Framework, Apache Struts, JavaServer Faces
    • Model View Controller (MVC)
      • Well-suited for interactive applications such as web-applications.
      • Divides applications into three modules – model, view, controller
      • model: data representation and business logic, view: data presentation and user input, controller: controls information flow
      • Benefits: separation of design and implement, decreased code duplication, centralized control
      • Servlets are ideal as controllers
      • Controllers receive all incoming client requests and direct them to the appropriate business logic component, after processing the requests, the controller selects the right view to return to the client.
    • Model 1 and Model 2
      • Model 1: No controller, direct access to the JSP pages, decentralized application, simpler and hence suited for small and static applications
      • Model 2: Uses a controller, are favored as they are easy to maintain and extend, provide a single point for security and logging
  • EJB Tier
    • Hosts business logic of a J2EE application
    • Provides system level services to the business components
    • Developers can focus on business-logic problems
    • J2EE platform handles the system related problems (complex many times) such as, state maintenance, transaction management, and availability to local and remote clients
    • EJBs provide a good interface between presentation components in the web-tier and business data and systems in the EIS tier
    • EJBs – entity, session, message driven
    • EJBs can provide remote or local access by providing remote or local interfaces. EJBs are mostly designed for distributed environments and hence typically provide remote interfaces
    • When to use entity beans: for business objects when it represents persistent data and requires persistent storage, multiple client access, data access in portable manners, server managed transaction handling is preferable
    • Entity beans: Persistence can be managed by yourself or by the EJB container
    • When to use Stateful Session-beans: for client centric business logic, business objects are short-lived, and non-persistent. Works for the client to maintain conversational state
    • When to use Stateless session beans: Provide server side behavior, do not maintain states for a specific client, good for reusable service objects, to minimize resources and support a large number of clients, when the business object does not operate on instance variables.
  • EIS Tier
    • J2EE EIS technologies: J2EE Connectors to integrate J2EE applications with existing EISs using resource adapters – synchronous
    • Java Message Service: To be used with enterprise messaging systems – asynchronous
    • JDBC – integrates J2EE applications with relational database systems
    • asynchronous: high quality and reliable message-delivery service, provide higher volume of messaging, more work for the developers
    • synchronous – suitable to handle two or more EISs synchronously.

From: http://sitestree.com/?p=4981
Categories:Java Short Notes
Tags:
Post Data:2009-07-13 18:40:32

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

J2EE:Java EE Code Samples & Apps #Java Short Notes

From: http://sitestree.com/?p=4978
Categories:Java Short Notes
Tags:
Post Data:2010-07-02 21:17:05

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java 2 Security Architecture #Java Short Notes

  • Security Services Provide
    • Data Integrity
    • Data Confidentiality
    • Access Control – Authentication and Authorization
  • Encryption helps to provide such security services
  • Core Java Security Architecture
    • — Core Java 2 Security Architecture
    • — Java Cryptography Architecture (JCA)
    • — Java Cryptography Extension (JCE)
    • — Java Secure Socket Extension (JSSE)
    • — Java Authentication and Authorization Service
    • — JCE and JSSE extends JCA
  • JCA – Platform Packages
    • java.security – core security classes and interfaces
    • java.security.cert – certificate management
    • java.security.interfaces – Interfaces used to manage DSA and RSA keys
    • java.security.spec – key specification, algorithm parameter specification
  • JCA – not useful for data encryption
  • JCE provides the data encryption
  • JCE packages: javax.crypto, javax.crypto.interfaces, javax.crypto.spec
  • JSSE includes a Java implementation of SSL and Transport Layer Security (TLS) – server authentication, message integrity, optional client authentication.
  • JSSE Packages:javax.net.ssl,javax.net,javax.security.cert
  • JAAS : limit access to resources based on user identity. JAAS implements PAM (Pluggable Authentication Module Framework) – user-based, group-based, role-based access control
  • JAAS packages:javax.security.auth,javax.security.auth.callback, javax.security.auth.login,javax.security.auth.spi
  • Core Security
    • java.security.Permission, PermissionCollection, Permissions – specify level of access to resources in J2EE applications
    • Permissions – sets of diverse permissions
    • Permission Example:
    • Permission has many subclasses like FilePermission, SerializablePermission, SocketPermission, NetPermission
    • FilePermission prm = new FilePermission(“c:test.img”,”read,write”);
    • Security Policy – list permissions in filesSystem Policy – jre/lib/security/java.policy fileUser Policy – java.policy file under user’s directory
    • Java 2 has a policy tool under [JAVA_HOMEbinpolicytool]- GUI based – to create/edit policy files – type policytool in the command prompt
    • Java Security Manager – determines whether requests to the access valued resources should be allowed? – core java security classes also ask security manager
    • For access permission check
    • Access Controller controls access to critical system resources. Security Manager calls Access Controller methods to delegate tasks
  • J2EE Application Security
    • J2EE Role Based Security
    • J2EE applications can contain both protected and unprotected resources. Access to the protected resources can be controlled using authorization mechanisms.
    • Authorization
      • Identification : recognize an entity – device or person
      • Authentication : process to identify
    • Role based security: create logical privileges known as roles – may be based on customer/user/job profile
    • Users are grouped together into the roles – same role users into the same role group
    • Creating roles for J2EE Applications:Create roles, associate them with an application, WAR file, JAR files
    • At the time of deployment, the deployer maps roles to the security identities
    • Principle: identity assigned to a user or group after authentication
    • A tool named deploytool can be used to add users and groups to a J2EE server.
    • You can get J2EE and deploytool at: http://java.sun.com/javaee/downloads/index.jsp
    • In deploytoolmenu->tools->server configuration->select users from left -> select reals from right ->
    • Provide ID/Password for the user. Assign a group to the user. – Rest will be common sense, play with the tool
    • You can also use realmtool to add users and groupsexample: realmtool -add 5006 5006admin admin,staffSyntax: -add user password groupsadd, import, userGroups
    • Under deployment tool, afterwards, you can apply permissions to the different applications. You can also view and modify the descriptor file from : menu->tools>view configuration.

From: http://sitestree.com/?p=4977
Categories:Java Short Notes
Tags:
Post Data:2006-12-17 23:47:44

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java: Struts: Lesson 5: Processing Requests with Action Objects #Java Short Notes

Corresponding Video Tutorial
Code Example for this article

  • What happens? When a form is submitted?
  • Flow:
    1. Refer to a x.do from form action
    2. Check struts-config.xml for action named ‘x’
    3. Check the corresponding type (class) of the action, execute the execute method of that action type (really a class where execute is the class method)
    4. The method will usually return a string using mapping.findForward(“string”),
    5. Then the string will be matched in struts-config.xml file in the global forwards section or as part of the actions.
    6. In forwards a string is mapped to a destination web-page/action
  • Steps to write a simple application [one programmer]:
    1. Create the first web-page with the form [html/jsp]
    2. Create an action for the action string of this form in struts-config.xml file [mention the type/class, and corresponding forwards and specify the destination]
    3. The destination of a forward can be another action, forwards can be part of the action or can be placed in the global forwards section,
    4. Write the class and the corresponding execute method
    5. In the execute method you may require to collect the user supplied values/inputs, process the data and return a string using mapping.findForward based() on your logic/requirements.
    6. Create the destination pages.

From: http://sitestree.com/?p=4972
Categories:Java Short Notes
Tags:
Post Data:2013-03-27 11:44:23

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Servlet Random Information #Java Short Notes

  • Web component information sharing: web context (ServletContext), request, session, and page
  • ServletContext – Scope: entire web-application (Servlets & JSPs)
  • page/PageContext : A single point of access for many of the attributes of a JSP page
  • For each access of the servlet a thread is created. In applications a thread can be accessed concurrently by many threads.
  • If the servlet accesses and edits some external resources, then data inconsistency, and data loss may occur
  • Synchronized access should help:
  • public class TestServlet extends HttpServlet implements SingleThreadModel will provide synchronization and concurrency
  • In JSP, you can include – to provide thread safety
  • For SingleThreadModel: you still have to synchronize access to class variables and to any shared resources that are stored outside the servlet. example:
     synchronized(sharedResource) { }
  • For high-traffic servlets, you should use explicit synchronization blocks rather than implementing SingleThreadModel
  • Synchronization is only an issue if the servlet accesses external data resources — returns data from another source: not for a servlet that just performs a task with no data access

From: http://sitestree.com/?p=4966
Categories:Java Short Notes
Tags:
Post Data:2007-03-19 19:26:45

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Accessing EJBS from Servlet #Java Short Notes

  • EJBs can be used to create enterprise applications like banking systems. Clients will interact with such systems for operations like: withdraw cash, transfer cash, pay bills
  • When clients directly access EJBs it poses concerns such as: security risks, firewall blocking, EJB architecture becomes transparent to the clients
  • Servlets can act as the middleman between the EJBs and clients.
    • Change to EJB becomes easier – hidden from the user
    • Data in EJB better protected
    • Central control of EJBs
  • When servlets work as the proxy, smaller devices become capable to access EJBs through http protocol (light weight protocol – good for smaller devices )
  • Servlets can work as a front controller
  • Supports different types of clients
  • Better separation of responsibilities that is desirable – web: flow control logic, EJBs: business logic, EIS: Enterprise Information Systems
  • Remember: servlets can be bottlenecks here, better servlet design strategy is required – synchronization may help
  • For small applications – may be overkill

How to use EJBs from servlets

  • Think about a banking system implemented in EJBs.
  • Entity beans = Customers, Accounts
  • Session beans = operations like withdraw cash
  • In this scenario, servlets can call the session beans and return the results to the clients
  • A sample servlet to access the EJBs: Here remote ejbs are assumed : EJB2 is assumed : just example is shown – the coding style may not be great … just an example
  • // for remote references to objects such as EJBsimport javax.rmi.PortableRemoteObject;//banking system ejb packageimport bankingSystemEjbClasses.*;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;import javax.naming.*;public class ServletEjb extends HttpServlet{   public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{  float credit = 10;  float debit = 20;  String custName = "";  float initBalance = 0, endBalance = 0;  try{      //locate and instantiate the account manager bean      Context context = new InitialContext();      Object ref = context.lookup("AccountManager");      AccountManagerHome accountManagerHome = (AccountManagerHome) PortableRemoteObject.narrow (ref, AccountManagerHome.class);      AccountManager accountManager  = accountManagerHome.create(); //create a savings account and manipulate itaccountManager.createSavingsAccount(1,"John Smith")  initBalance = accountManager.getInitialBalance("1");//create customeraccountManager.createCustomer(1,"John Smith")  custName = accountManager.getCustomerName();//generate outputresponse.setContentType("text/html");PrintWriter out = response.getWriter();out.println("");out.println("");out.println("Customer Name:" + custName);out.println("Initial Balance:" + initBalance);out.println("");out.println("");  }catch(Exception ex){}}}

From: http://sitestree.com/?p=4965
Categories:Java Short Notes
Tags:
Post Data:2010-04-10 03:31:53

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Skeleton of the Ant File #Java Short Notes

Ant can be used to compile and deploy Java applications. Struts and Spring applications also make use of Ant. Here, we have provided the structure of the build.xml file with examples that is used to carry out the functionalities. The redistribution of this file is in compatible with the copyright law of The Apache Foundation.

                         <!--  These properties define custom tasks for the Ant build tool that interact  with the "/manager" web application installed with Tomcat 5.  Before they  can be successfully utilized, you must perform the following steps:  - Copy the file "server/lib/catalina-ant.jar" from your Tomcat 5    installation into the "lib" directory of your Ant installation.  - Create a "build.properties" file in your application's top-level    source directory (or your user login home directory) that defines    appropriate values for the "manager.password", "manager.url", and    "manager.username" properties described above.  For more information about the Manager web application, and the functionality  of these tasks, see .-->        <!--  These properties control option settings on the Javac compiler when it  is invoked using the  task.  compile.debug        Should compilation include the debug option?  compile.deprecation  Should compilation include the deprecation option?  compile.optimize     Should compilation include the optimize option?-->      <!--  -->          <!--    -->                                                                                                                                                                                                                                                <!--    -->                          

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

From: http://sitestree.com/?p=4961
Categories:Java Short Notes
Tags:
Post Data:2007-06-06 02:04:10

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

EJB Overview: EJB in a nutshell #Java Short Notes

  • Objects provide encapsulation/re-usability at the class level.
  • A component can be comprised of multiple objects
  • Component = logical groups of classes = distributed objects = business objects
  • A component can be developed to address a specific enterprise applications.
  • Hence, components can provide significant encapsulation/re-usability in the partitioned enterprise problems.
  • Component model = components + their environments + contracts for interaction
  • EJB is a server side component model. Used to create application server side components
  • Most sophisticated application server = CTM = Transaction Processing Monitors + Object Request Brokers = J2EE Servers
  • EJB components: entity, session, message-driven
  • Entity beans = real world objects = business objects = data objects = customers = products = may be contained as records in the database = persistent
  • Multiple clients can access entity beans concurrently
  • Session beans = processes + tasks. Example: the act of reserving a ticket = to control work flow = to handle a series of tasks carried out by the entity beans = can also access/(help to access) data = do not represent data = transient = after the task is done – no need to maintain states = do not need to support concurrent access
  • Message-driven beans = stateless beans = no component interface = respond to client requests = clients place requests through JMS = support concurrent client access = can be used to perform tasks and manage interactions among beans = asynchronous = request and response two separate processes, RMI = synchronous

From: http://sitestree.com/?p=4958
Categories:Java Short Notes
Tags:
Post Data:2012-11-26 13:23:36

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java Connector Overview and an Example #Java Short Notes

  • Java Connector Architecture (JCA) enables integration of the J2EE components to any Enterprise Information Systems (EIS). EIS can be heterogeneous where scalability is a must.
  • JDBC assumes DBMS/RDBMS in the back-end, JCA targets any kind of EIS.
  • One of the key parts of JCA is the Resource Adapter – usually a part of the application servers. Multiple resource adapters can be used to connect to different EISs of heterogeneous types.
  • When resource adapters are plugged into the Application Servers they provide necessary transaction, security, and connection pooling mechanisms
  • In the JCA, an application contract defines the API that provides the client view to access EISs. The API can be EIS/resource adapter specific or standard.
  • Common Client Interface (CCI) – a set of interfaces and classes that allows J2EE applications to interact with heterogeneous EISs.
  • Example of JCA
    • EJBs, Servlets can connect to EISs through CCI and then access the EISs as required
    • J2EE SDK provides a black box resource adapter that we will use in our example to connect to EISs. We will assume RDBMS as the EIS in the example
    • Example: The flow of the application: client->servlet->resource adapter->EIS Tier (RDBMS – stored procedure)
    • In a servlet example: first step: import javax.resource.cci.*;
    • javax.resource.cci.*; – for ResourceException class
    • import cci blackbox classes: import com.sun.connector.cciblackbox.*;
    • Also, import servlet and application specific classes
    • public class ExampleServletConnector extends HttpServlet{   private Connection con;   private ConnectionFactory cf;   private String user;  public void init() throws ServletException{      try{            //establish JNDI interface            InitialContext ic = new InitialContext();           //look up user and password           user = (String) ic.lookup("java:comp/env/user");           String password = (String) ic.lookup("java:comp/env/password");          //reference to the connection factory for the CCI black box resource adapter - coded name CCIEIS          cf = (ConnectionFactory) ic.lookup("java:comp/env/CCIEIS");         //collect connection specification, connect to the database         ConnectionSpec conSpec = new ConnectionSpec (user,password);       con = cf.getConnection(conSpec);      }catch(ResourceException rex){         rex.printStackTrace();      }catch(NamingException nex){        nex.printStackTrace();      }  }
    • Now define the doGet method for processing. An example doGet method is as follows
    • public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException {  PrintWriter output = null;  res.setContentType("text/html");  try{     PrintWriter out = res.getWriter();     //find the number of rows in the account table - check getAccountAccountCount method in the next item     int accCount = getAccountAccountCount();     out.println("Account Count" + accCount);  }catch(Exception ex){   ex.printStackTrace();  }}
    • getAccountAccountCount() method: to query the database and determine the number of rows in the account table
    • public int getAccountCount(){   int count = -1;   try{       Interaction ix = con.createInteraction();       CciInteractionSpec iSpec = new CciInteractionSpec();        iSpec.setSchema(user);        iSpec.setCatalog(null);        //stored procedure name to calculate the number of rows       iSpec.setFunctionName("ACCOUNTCOUNT");       RecordFactory rf = cf.getRecordFactory();       IndexedRecord iRec = rf.createIndexedRecord("InputRecord");       Record oRec = ix.execute(iSpec, iRec);       Iterator it = ((IndexedRecord)oRec).iterator();       //process        while(it.hasNext()){          Object obj = it.next();          if (obj instanceof Integer){             count = ((Integer) obj).intValue();          }else if (obj instanceOf BigDecimal){           count = ((BigDecimal) obj).intValue();          }        }   }catch(Exception ex){   }   return count;}

From: http://sitestree.com/?p=4956
Categories:Java Short Notes
Tags:
Post Data:2010-01-15 20:19:20

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Hello World: Web Service Application: IntelliJ, Tomcat, Apache Axis/Glassfish #Java Short Notes

This is an excellent document to start with. A sample server and a sample client are built in both Apache Axis and Glassfish

From: http://sitestree.com/?p=4946
Categories:Java Short Notes
Tags:
Post Data:2008-06-28 19:28:56

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada