Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

What Is Clustering? What Are The Different Algorithms Used For Clustering?

Answer»

CLUSTERING is GROUPING MACHINES together to transparently provide enterprise services. The client does not know the difference between approaching one server or approaching a CLUSTER of servers. Clusters provide two benefits: scalability and HIGH availability.

Clustering is grouping machines together to transparently provide enterprise services. The client does not know the difference between approaching one server or approaching a cluster of servers. Clusters provide two benefits: scalability and high availability.

2.

How Does Ejb Invocation Happens?

Answer»

Retrieve HOME Object reference from Naming Service via JNDI. RETURN Home Object reference to the client. Create me a new EJB Object through Home Object INTERFACE. Create EJB Object from the Ejb Object. Return EJB Object reference to the client. Invoke business method USING EJB Object reference. Delegate request to Bean (Enterprise Bean).

Retrieve Home Object reference from Naming Service via JNDI. Return Home Object reference to the client. Create me a new EJB Object through Home Object interface. Create EJB Object from the Ejb Object. Return EJB Object reference to the client. Invoke business method using EJB Object reference. Delegate request to Bean (Enterprise Bean).

3.

What Are The Applet's Information Methods?

Answer»

The following are the APPLET's information methods:

  • getAppletInfo() METHOD: Returns a string describing the applet, its AUTHOR, copyright information, ETC.
  • getParameterInfo() method: Returns an array of string describing the applet's PARAMETERS.

The following are the Applet's information methods:

4.

Which Classes And Interfaces Does Applet Class Consist?

Answer»

APPLET CLASS consists of a single class, the Applet class and THREE INTERFACES: AppletContext, AppletStub and AudioClip.

Applet class consists of a single class, the Applet class and three interfaces: AppletContext, AppletStub and AudioClip.

5.

What Are The Applet's Life Cycle Methods? Explain Them.

Answer»

FOLLOWING are the METHODS in the life cycle of an Applet:
(a) init() method—called, when an applet is FIRST loaded. This method is called only once in the entire cycle of an applet. This method usually initializes the variables to be used in the applet.
(b) start() method—called each time an applet is started.
(c) PAINT() method—called when the applet is minimized or refreshed. This method is used for drawing different strings, figures and images on the applet window.
(d) stop() method—called when the browser moves off the applet's page.
(e) DESTROY() method—called when the browser is finished with the applet.

Following are the methods in the life cycle of an Applet:
(a) init() method—called, when an applet is first loaded. This method is called only once in the entire cycle of an applet. This method usually initializes the variables to be used in the applet.
(b) start() method—called each time an applet is started.
(c) paint() method—called when the applet is minimized or refreshed. This method is used for drawing different strings, figures and images on the applet window.
(d) stop() method—called when the browser moves off the applet's page.
(e) destroy() method—called when the browser is finished with the applet.

6.

What Is Chat Area? Explain.

Answer»

Ever since the first computers were connected, people have been using them to talk. A chat AREA is an interface that lets a group of people talk by typing messages. Like all INTERNET-based program, chat programs must follow a specific protocol: Specifically, chat programs rely on the Internet Relay Chat (IRC) protocol. However, chatting on a Web page has been ad-hoc at best, until Java.
With Java, a Web page can have a fully featured chat area. Features such as instant messages and MEMBERSHIP rooms are not difficult to implement. DUE to the applet restrictions, chat applets on the same page will have to communicate through a SERVER on the computer where they reside.

Ever since the first computers were connected, people have been using them to talk. A chat area is an interface that lets a group of people talk by typing messages. Like all Internet-based program, chat programs must follow a specific protocol: Specifically, chat programs rely on the Internet Relay Chat (IRC) protocol. However, chatting on a Web page has been ad-hoc at best, until Java.
With Java, a Web page can have a fully featured chat area. Features such as instant messages and membership rooms are not difficult to implement. Due to the applet restrictions, chat applets on the same page will have to communicate through a server on the computer where they reside.

7.

Why A Client Should Be Multithreading? Explain.

Answer»

In many types of client applications, support for multiple threads is ALSO useful. A Web browser, for example, is a multithreaded application. Within a browser, you can have multiple windows open and perform multiple downloads at the same time. To perform each download operation, the browser simply starts a NEW thread which preforms the CORRESPONDING processing.
When your program writes information to or receives information from a stream, a program that uses a single thread of control must wait for the I/O operation to complete—a process CALLED I/O blocking. If you use multiple threads to perform the stream read and write operations, your application can continue to perform other operations. When you write client applications, take advantage of Java's multithreading to make your programs interface more user-friendly and more RESPONSIVE.

In many types of client applications, support for multiple threads is also useful. A Web browser, for example, is a multithreaded application. Within a browser, you can have multiple windows open and perform multiple downloads at the same time. To perform each download operation, the browser simply starts a new thread which preforms the corresponding processing.
When your program writes information to or receives information from a stream, a program that uses a single thread of control must wait for the I/O operation to complete—a process called I/O blocking. If you use multiple threads to perform the stream read and write operations, your application can continue to perform other operations. When you write client applications, take advantage of Java's multithreading to make your programs interface more user-friendly and more responsive.

8.

Why Servers Should Be Multithreading? Explain.

Answer»

As you know, multithreading lets your Java PROGRAM PERFORM tasks in PARALLEL. A server is a great example of a program that should be multithreaded. If a server has a single thread of control, only one client can INTERACT with the server at any one time. If you write your server to support multithreading, the server can PROCESS many client-server connections simultaneously.

As you know, multithreading lets your Java program perform tasks in parallel. A server is a great example of a program that should be multithreaded. If a server has a single thread of control, only one client can interact with the server at any one time. If you write your server to support multithreading, the server can process many client-server connections simultaneously.

9.

What Is The Applet Client Restriction?

Answer»

Java places restrictions on an APPLET. One restriction is that an applet cannot make a SOCKET connection to any server other than the one it came from (the server from which the browser downloaded the applet). Therefore, you cannot, for example, make a generic MAIL TOOL applet unless you plan to support it with SMTP and POP3 mail servers on the same machine that stores the applet. Also, because of this restriction, you cannot have two applets connect directly together, so that two users can play a game. Consequently, you should always take applet restrictions into consideration when you design a Java-server application with applets.

Java places restrictions on an applet. One restriction is that an applet cannot make a Socket connection to any server other than the one it came from (the server from which the browser downloaded the applet). Therefore, you cannot, for example, make a generic mail tool applet unless you plan to support it with SMTP and POP3 mail servers on the same machine that stores the applet. Also, because of this restriction, you cannot have two applets connect directly together, so that two users can play a game. Consequently, you should always take applet restrictions into consideration when you design a Java-server application with applets.

10.

What Is The Relationship Between Servers And Ports?

Answer»

As you have learned, an IP address identifies a computer on the Internet. You also learned that a port number identifies a process (a PROGRAM) that is running on a computer. As it TURNS out, programs use port numbers for client and server APPLICATIONS. Because IP addresses are unique and on a given computer, port numbers are unique, a port number combined with an IP address completely distinguishes an application running on the Internet. The combination of port number and IP address yields a socket and provides an END point of a communication path. As you will learn the same application IP address and port number may use multiple sockets, each having a different value. Thus, a socket's value combines an application-specific value with the IP address and port number.

As you have learned, an IP address identifies a computer on the Internet. You also learned that a port number identifies a process (a program) that is running on a computer. As it turns out, programs use port numbers for client and server applications. Because IP addresses are unique and on a given computer, port numbers are unique, a port number combined with an IP address completely distinguishes an application running on the Internet. The combination of port number and IP address yields a socket and provides an end point of a communication path. As you will learn the same application IP address and port number may use multiple sockets, each having a different value. Thus, a socket's value combines an application-specific value with the IP address and port number.

11.

What Are Protocols? What Are They Used For?

Answer»

To write a client-server application, you must create two programs: the client and the server. Within these programs, you must define how the two applications will communicate—the rules each program must follow. As you have learned, the rules the client and server program must follow to communicate are protocols. In short, protocols define how client-server programs interact.
Most programmers implement protocols using a series of LAYERS, where each layer deals with a particular task. For example, the lowest layer might deal with the actual communication across the NETWORK hardware. The next layer might CHECK the bits sent across the network for communication errors. Likewise, the next layer might package the bits into a MESSAGE format your program understands. Client-server applications use upper-layer protocols that are NORMALLY based on a specific application (such as printing a file or transferring a file). The upper-layer protocol defines a strict set of rules on how two applications exchange data.

To write a client-server application, you must create two programs: the client and the server. Within these programs, you must define how the two applications will communicate—the rules each program must follow. As you have learned, the rules the client and server program must follow to communicate are protocols. In short, protocols define how client-server programs interact.
Most programmers implement protocols using a series of layers, where each layer deals with a particular task. For example, the lowest layer might deal with the actual communication across the network hardware. The next layer might check the bits sent across the network for communication errors. Likewise, the next layer might package the bits into a message format your program understands. Client-server applications use upper-layer protocols that are normally based on a specific application (such as printing a file or transferring a file). The upper-layer protocol defines a strict set of rules on how two applications exchange data.

12.

What Do You Understand By The Term Client-server Application?

Answer»

NETWORKS make many new types of applications possible because a SINGLE machine no longer has to do everything. Within a network, some computers, called servers, perform specialized tasks on behalf of other programs. A program that uses a server is a client.
A server is simply a computer that runs a specific program continuously whose role purpose is to provide a SERVICE to other programs. A client, on the other hand, is a program that receives service from the server. For example, a print server is a software program that waits until other programs (the clients) send their files to print. The server then prints the files on behalf of the client. There are many types of servers across the Internet with which you MAY be familiar, such as mail servers, file servers and of COURSE, World Wide (or HTTP) servers.

Networks make many new types of applications possible because a single machine no longer has to do everything. Within a network, some computers, called servers, perform specialized tasks on behalf of other programs. A program that uses a server is a client.
A server is simply a computer that runs a specific program continuously whose role purpose is to provide a service to other programs. A client, on the other hand, is a program that receives service from the server. For example, a print server is a software program that waits until other programs (the clients) send their files to print. The server then prints the files on behalf of the client. There are many types of servers across the Internet with which you may be familiar, such as mail servers, file servers and of course, World Wide (or HTTP) servers.

13.

What Does Tcp/ip Stand For And What Is Its Use?

Answer»

To communicate across the Internet, a program must follow a specific set of RULES, called protocols. These protocols may specify the SIZE and format of the program's ELECTRONIC messages or how programs synchronize messages. In short, who sends the first message and what type of REPLY the sender expects.

The primary protocol on the Internet is TCP/IP (the Transmission Control Protocol/Internet Protocol), The TCP/IP protocols define the rules that computers and peripherals on the Internet use to communicate. For example, TCP/IP protocols defines how a program finds a particular device on a network, the format the program must use to send the device data, how the program should check for errors and so on. 

To communicate across the Internet, a program must follow a specific set of rules, called protocols. These protocols may specify the size and format of the program's electronic messages or how programs synchronize messages. In short, who sends the first message and what type of reply the sender expects.

The primary protocol on the Internet is TCP/IP (the Transmission Control Protocol/Internet Protocol), The TCP/IP protocols define the rules that computers and peripherals on the Internet use to communicate. For example, TCP/IP protocols defines how a program finds a particular device on a network, the format the program must use to send the device data, how the program should check for errors and so on. 

14.

Explain The Generic Term Internet.

Answer»

The generic TERM internet refers to a network of networks. The Internet is just one particular internet. However, it is the ultimate network of networks. Because you are interested in Java, you have certainly used a Web browser to SURF the Internet. As you probably know, a Web browser is only one of many Internet applications.
Other Internet applications include e-mail, network news, file transfers and telnet. Other than e-mail, some users on the Web aren't aware of these other applications. Each has played an important role in getting the Internet where it is today. For example, network news, also called Usenet, is still a popular way for users to exchange information using a bulletin-board like MEDIA. Usenet lets users discuss a wide range of topics.
In the early days, the Internet was DEVELOPED by the academic community. Usenet and e-mail were IDEAL for researchers to communicate with each other across the country. Today, Usenet topics cover all aspects of human internet and e-mail is an indispensable business tool.

The generic term internet refers to a network of networks. The Internet is just one particular internet. However, it is the ultimate network of networks. Because you are interested in Java, you have certainly used a Web browser to surf the Internet. As you probably know, a Web browser is only one of many Internet applications.
Other Internet applications include e-mail, network news, file transfers and telnet. Other than e-mail, some users on the Web aren't aware of these other applications. Each has played an important role in getting the Internet where it is today. For example, network news, also called Usenet, is still a popular way for users to exchange information using a bulletin-board like media. Usenet lets users discuss a wide range of topics.
In the early days, the Internet was developed by the academic community. Usenet and e-mail were ideal for researchers to communicate with each other across the country. Today, Usenet topics cover all aspects of human internet and e-mail is an indispensable business tool.

15.

What Do You Understand By The Term Network?

Answer»

A network is a set of computers and peripherals, such as modems and printers, that are physically connected together. A particular network has a unique set of HARDWARE and software that enables various computers and peripherals to communicate. The POWER of networks enables computers to share resources. For example, a small computer on a network can access and use other computers that are much more POWERFUL.

One Java design goal was to support the development of COMPLEX programs that are small, bug free and easy to understand. One of the areas in which Java's creators have succeeded with this goal is in the Network class. In other programming languages, performing the simplest network task can require pages of codes. With Java, in contrast, many of these tasks have been reduced to a single statement. For example, opening a file across a network in Java is not much more complicated than opening a LOCAL file. Because of this ease in programming, Java should make network programming common place.

A network is a set of computers and peripherals, such as modems and printers, that are physically connected together. A particular network has a unique set of hardware and software that enables various computers and peripherals to communicate. The power of networks enables computers to share resources. For example, a small computer on a network can access and use other computers that are much more powerful.

One Java design goal was to support the development of complex programs that are small, bug free and easy to understand. One of the areas in which Java's creators have succeeded with this goal is in the Network class. In other programming languages, performing the simplest network task can require pages of codes. With Java, in contrast, many of these tasks have been reduced to a single statement. For example, opening a file across a network in Java is not much more complicated than opening a local file. Because of this ease in programming, Java should make network programming common place.

16.

Is It Possible To Stop The Execution Of A Method Before Completion In A Sessionbean?

Answer»

Stopping the EXECUTION of a method inside a Session BEAN is not possible without WRITING CODE inside the Session Bean. This is because you are not allowed to access Threads inside an EJB.

Stopping the execution of a method inside a Session Bean is not possible without writing code inside the Session Bean. This is because you are not allowed to access Threads inside an EJB.

17.

What Is The Default Transaction Attribute For An Ejb?

Answer»

There is no default TRANSACTION attribute for an EJB. In WEBLOGIC, the default transaction attribute for EJB is SUPPORTS.

There is no default transaction attribute for an EJB. In weblogic, the default transaction attribute for EJB is SUPPORTS.

18.

Is Method Overloading Allowed In Ejb?

Answer»

YES you can OVERLOAD METHODS

Yes you can overload methods

19.

Should Synchronization Primitives Be Used On Bean Methods?

Answer»

No. The EJB specification SPECIFICALLY states that the enterprise bean is not allowed to use thread PRIMITIVES. The CONTAINER is responsible for managing concurrent access to BEANS at runtime

No. The EJB specification specifically states that the enterprise bean is not allowed to use thread primitives. The container is responsible for managing concurrent access to beans at runtime

20.

Are We Allowed To Change The Transaction Isolation Property In Middle Of A Transaction?

Answer»

No. You cannot CHANGE the TRANSACTION ISOLATION LEVEL in the MIDDLE of transaction.

No. You cannot change the transaction isolation level in the middle of transaction.

21.

How May Messaging Models Do Jms Provide For And What Are They?

Answer»

JMS PROVIDE for TWO MESSAGING models, publish-and subscribe and point-to-point queuing.

JMS provide for two messaging models, publish-and subscribe and point-to-point queuing.

22.

Why Ruby On Rails?

Answer»

There are LOT of advantages of using ruby on rails
1. DRY Principal
2. Convention over Configuration
3. GEMS and PLUGINS
4. Scaffolding
5. Pure OOP Concept
6. Rest Support
7. Rack support
8. Action Mailer
9. Rpc support
10. Rexml Support etc..

There are lot of advantages of using ruby on rails
1. DRY Principal
2. Convention over Configuration
3. Gems and Plugins
4. Scaffolding
5. Pure OOP Concept
6. Rest Support
7. Rack support
8. Action Mailer
9. Rpc support
10. Rexml Support etc..

23.

What Is Rails?

Answer»

► Ruby on RAILS is an open source web application framework for the Ruby programming LANGUAGE.
► It is used with an Agile DEVELOPMENT METHODOLOGY that is used by web DEVELOPERS for rapid development.

► Ruby on Rails is an open source web application framework for the Ruby programming language.
► It is used with an Agile development methodology that is used by web developers for rapid development.

24.

Describe Class Libraries In Ruby?

Answer»

► The RUBY standard library extends the foundation of the Ruby built-in library with classes and abstractions for a variety of programming needs, including network programming, operating system services, threads, and more.
► These classes provide FLEXIBLE capabilities at a high level of ABSTRACTION, giving you the ability to CREATE powerful Ruby scripts useful in a variety of problem domains.

► The Ruby standard library extends the foundation of the Ruby built-in library with classes and abstractions for a variety of programming needs, including network programming, operating system services, threads, and more.
► These classes provide flexible capabilities at a high level of abstraction, giving you the ability to create powerful Ruby scripts useful in a variety of problem domains.

25.

Explain The Concepts And Capabilities Of Garbage Collection Feature Of Ruby?

Answer»

► Ruby is an object oriented language and every object oriented language TENDS to ALLOCATE many OBJECTS during EXECUTION of the program.
► Ruby deletes unallocated and unused objects automatically.
► This feature can be controlled by applying proper SYNTAX and program through ruby.

► Ruby is an object oriented language and every object oriented language tends to allocate many objects during execution of the program.
► Ruby deletes unallocated and unused objects automatically.
► This feature can be controlled by applying proper syntax and program through ruby.

26.

Describe The Environment Variables Present In Ruby.

Answer»

RUBYOPT
Additional command-line options to Ruby; examined after REAL command-line options are parsed ($SAFE must be 0).

RUBYLIB
Additional search path for Ruby PROGRAMS ($SAFE must be 0).

RUBYPATH
With -S option, search path for Ruby programs (defaults to PATH).

RUBYSHELL
Shell to use when spawning a process; if not SET, will also check SHELL or COMSPEC. DLN_LIBRARY_PATH Search path for dynamically loaded modules.

RUBYLIB_PREFIX
(Windows only) MANGLE the RUBYLIB search path by adding this prefix to each component.

RUBYOPT
Additional command-line options to Ruby; examined after real command-line options are parsed ($SAFE must be 0).

RUBYLIB
Additional search path for Ruby programs ($SAFE must be 0).

RUBYPATH
With -S option, search path for Ruby programs (defaults to PATH).

RUBYSHELL
Shell to use when spawning a process; if not set, will also check SHELL or COMSPEC. DLN_LIBRARY_PATH Search path for dynamically loaded modules.

RUBYLIB_PREFIX
(Windows only) Mangle the RUBYLIB search path by adding this prefix to each component.

27.

Interpolation Is A Very Important Process In Ruby, Comment?

Answer»

► Interpolation is the PROCESS of INSERTING a STRING into a literal.
► You can interpolate a string into a literal by placing a HASH (#) within {} open and close brackets.
► This refers to a new name to by referring to the copy of the original method.

► Interpolation is the process of inserting a string into a literal.
► You can interpolate a string into a literal by placing a Hash (#) within {} open and close brackets.
► This refers to a new name to by referring to the copy of the original method.

28.

What Is The Use Of Super In Ruby Rails?

Answer»

► Ruby uses the super keyword to call the SUPERCLASS implementation of the current method.
► Within the body of a method, calls to super acts just like a call to that original method.
► The search for a method body starts in the superclass of the object that was found to CONTAIN the original method.
def URL=(ADDR)
super (addr.blank? || addr.starts_with?('http')) ? addr : http://#{addr}
end

► Ruby uses the super keyword to call the superclass implementation of the current method.
► Within the body of a method, calls to super acts just like a call to that original method.
► The search for a method body starts in the superclass of the object that was found to contain the original method.
def url=(addr)
super (addr.blank? || addr.starts_with?('http')) ? addr : http://#{addr}
end

29.

Explain The Use Of Global Variable $ In Ruby?

Answer»

If you DECLARE one VARIABLE as global we can ACCESS any where, where as class variable visibility only in the class.

If you declare one variable as global we can access any where, where as class variable visibility only in the class.

30.

Explain The Difference Between Nil And False In Ruby?

Answer»

FALSE is a BOOLEAN datatype
NIL is not a data type

False is a boolean datatype
Nil is not a data type

31.

What Optimization Could I Use If The Ejb Container Is The Only Point Of Write Access To The Database ?

Answer»

You COULD ACTIVATE the "Commit Option A" that is the container caches entity BEAN state between transactions. This option assumesthat the container has exclusive ACCESS to the persistentstore and therefore it doesn’t need to synchronizethe in-memory bean state from the persistent store at the BEGINNING of each transaction.

You could activate the "Commit Option A" that is the container caches entity bean state between transactions. This option assumesthat the container has exclusive access to the persistentstore and therefore it doesn’t need to synchronizethe in-memory bean state from the persistent store at the beginning of each transaction.

32.

What Do You Need To Set-up A Cluster With Jboss ?

Answer»

BASICALLY STARTING JBOSS with the “all” CONFIGURATION contains everything needed for clustering: It has all the libraries for clustering:
• JGroups.jar, jboss-cache.jar
• Clustered beans (cluster-service.xml)
• HA-JNDI
• HTTP session replications (tc5-cluster-service.xml)
• Farming
• HA-JMS.

Basically starting JBoss with the “all” configuration contains everything needed for clustering: It has all the libraries for clustering:
• JGroups.jar, jboss-cache.jar
• Clustered beans (cluster-service.xml)
• HA-JNDI
• HTTP session replications (tc5-cluster-service.xml)
• Farming
• HA-JMS.

33.

What Is The Diffrence Between A Local-tx-datasource And A Xa-datasource? Can You Use Transactions In Both ?

Answer»

A LOCAL-tx-datasource identifies a data SOURCE that uses transactions, even distributed trans ACTIONS within the local application server, but doesn’t use distributed transactions among multiple application SERVERS. An xa-datasource on the other HAND identifies a data source that uses distributed transaction among multi-ple application servers.

A local-tx-datasource identifies a data source that uses transactions, even distributed trans actions within the local application server, but doesn’t use distributed transactions among multiple application servers. An xa-datasource on the other hand identifies a data source that uses distributed transaction among multi-ple application servers.

34.

What Are The Differences Between Ejb 3.0 And Ejb 2.0 ?

Answer»

EJBS are now plain old Java objects (POJO) that expose REGULAR business interfaces (POJI), and there is no requirement for home interfaces.

  • Use of metadata annotations, an extensible, metadata-driven, attribute-oriented framework that is used to generate Java code or XML deployment descriptors.
  • Removal of the requirement for specific interfaces and deployment descriptors (deployment descriptor information can be replaced by annotations).
  • Interceptor facility to invoke user methods at the INVOCATION of business methods or at life cycle events.
  • Default values are used WHENEVER possible (“configuration by exception” approach).
  • Reduction in the requirements for usage of checked exception.
  • A complete NEW persistence model (based on the JPA standard), that supersedes EJB 2.x entity beans.

EJBs are now plain old Java objects (POJO) that expose regular business interfaces (POJI), and there is no requirement for home interfaces.

35.

What If You Need To Span Your Transaction Across Multiple Servlet Invocations ?

Answer»

You can't with a Servlet. A JTA transaction must start and FINISH within a single invocation (of the service() METHOD). You should consider using a STATEFUL SB. In a SFSB with a JTA transaction, the ASSOCIATION between the bean instance and the transaction is retained across multiple client calls.

You can't with a Servlet. A JTA transaction must start and finish within a single invocation (of the service() method). You should consider using a Stateful SB. In a SFSB with a JTA transaction, the association between the bean instance and the transaction is retained across multiple client calls.

36.

Ok, Is The Session Factory Thread Safe?

Answer»

YES: that is many threads can access it cuncurrentely and request for sessions. It holds cached data that has been read in one UNIT of work and may be REUSED in a future unit of work. Good PRACTICE is to create it when the application is initialized.

Yes: that is many threads can access it cuncurrentely and request for sessions. It holds cached data that has been read in one unit of work and may be reused in a future unit of work. Good practice is to create it when the application is initialized.

37.

Which Hibernate Object Wraps The Jdbc Connection ?

Answer»

The Session interface wraps a JDBC CONNECTION. This interface is a single threaded object which REPRESENTS a single UNIT of work with application and PERSISTENT database. It's retrieved by the SessionFactory's open Session() method.

The Session interface wraps a JDBC Connection. This interface is a single threaded object which represents a single unit of work with application and persistent database. It's retrieved by the SessionFactory's open Session() method.

38.

What's The Difference Between Hibernate And Ejb 3 ? Don't You Think Ejb 3 Is Just A Clone Of Hibernate ?

Answer»

The perception of EJB3 as being a simple clone of Hibernate is primarily based on DEVELOPER familiarity with Hibernate and a similarity of naming, as well as common purpose, and that Hibernate is morphing itself into an EJB3 implementation based on the work going into the specification, not the other way around.

EJBs are supposed to be components, in the SENSE that they're not just one class, but a set of classes, descriptors and usage and management contracts. All of this in order to allow a container (JBOSS, Weblogic, etc.) to provide services to those components, and to be able to reuse and distribute this components. This services are, among others, transactions, concurrent access CONTROL, security, instance pooling, etcetera.

Hibernat is "just" an ORM (Object/Relational Mapping) tool. Quick and dirty, this means you can store an object tree belonging to an class hierarchy in a relational DB WITHOUT writing a single SQL query. Quite cool, IMO. But no transaction control, no instance pooling, no concurrency control, and certainly no security.

The perception of EJB3 as being a simple clone of Hibernate is primarily based on developer familiarity with Hibernate and a similarity of naming, as well as common purpose, and that Hibernate is morphing itself into an EJB3 implementation based on the work going into the specification, not the other way around.

EJBs are supposed to be components, in the sense that they're not just one class, but a set of classes, descriptors and usage and management contracts. All of this in order to allow a container (JBoss, Weblogic, etc.) to provide services to those components, and to be able to reuse and distribute this components. This services are, among others, transactions, concurrent access control, security, instance pooling, etcetera.

Hibernat is "just" an ORM (Object/Relational Mapping) tool. Quick and dirty, this means you can store an object tree belonging to an class hierarchy in a relational DB without writing a single SQL query. Quite cool, IMO. But no transaction control, no instance pooling, no concurrency control, and certainly no security.

39.

Can I Unit Test Seam Applications Without Starting The Application Server?

Answer»

Yes, Seam PROVIDES its own integration TEST framework based on TestNG You can easily mock all Seam SERVICES using those facilities without ever loading an APPLICATION SERVER or a database.

Yes, Seam provides its own integration test framework based on TestNG You can easily mock all Seam services using those facilities without ever loading an application server or a database.

40.

Can I Use Ajax With Seam?

Answer»

Yes, SEAM provides excellent support for AJAX. First, Seam supports the ICEfaces and Ajax4JSF Ajax component libraries for JSF. If you prefer a more "old fashioned" approach, Seam provides a complete JavaScript remoting framework which lets you call Seam components and SUBSCRIBE to JMS topics directly from the client. Please refer to the Seam remoting example application on how to use AJAX remoting to implement a chat room.
Finally, Seam's concurrency MODEL is designed ESPECIALLY for use with Ajax.

Yes, Seam provides excellent support for AJAX. First, Seam supports the ICEfaces and Ajax4JSF Ajax component libraries for JSF. If you prefer a more "old fashioned" approach, Seam provides a complete JavaScript remoting framework which lets you call Seam components and subscribe to JMS topics directly from the client. Please refer to the Seam remoting example application on how to use AJAX remoting to implement a chat room.
Finally, Seam's concurrency model is designed especially for use with Ajax.

41.

Are There Books About Seam?

Answer»

Yes, PRENTICE Hall's "JBoss Seam: SIMPLICITY and Power Beyond Java EE 5.0" is a comprehensive guide for Seam WRITTEN by JBoss insiders.

Yes, Prentice Hall's "JBoss Seam: Simplicity and Power Beyond Java EE 5.0" is a comprehensive guide for Seam written by JBoss insiders.

42.

Where Can I Ask Questions And Make Suggestions About Seam?

Answer»

Please USE the SEAM User's discussion forum for user questions.

Please use the Seam User's discussion forum for user questions.

43.

Where Can I Find Seam Examples And Documentation?

Answer»

The source code and build script of all Seam example APPLICATIONS are included in the examples directory of theSeam distribution. Seam DOCUMENTATION is AVAILABLE here.

The source code and build script of all Seam example applications are included in the examples directory of theSeam distribution. Seam documentation is available here.

44.

Can I Run Seam With Jdk 1.4 And Earlier?

Answer»

No, SEAM only WORKS on JDK 5.0 and above. It uses ANNOTATIONS and other JDK 5.0 FEATURES.

No, Seam only works on JDK 5.0 and above. It uses annotations and other JDK 5.0 features.

45.

Can I Run Seam In A J2ee Environment?

Answer»

Yes, as of Seam 1.1, you can use Seam in any J2EE application server, with one caveat: you will not be able to use EJB 3.0 session beans. HOWEVER, you can use EITHER Hibernate or JPA for persistence, and you can use Seam JAVABEAN components instead of session beans.

Yes, as of Seam 1.1, you can use Seam in any J2EE application server, with one caveat: you will not be able to use EJB 3.0 session beans. However, you can use either Hibernate or JPA for persistence, and you can use Seam JavaBean components instead of session beans.

46.

Can I Run Seam Outside Of Jboss As?

Answer»

YES, you can run Seam applications in plain Tomcat 5.5+ or in the SUN GlassFish APPLICATION server. To run Seam application in Tomcat, you need a number of additional library files and a few configuration files to bootstrap the JBoss EJB3 inside Tomcat. Please refer to the deploy.tomcat ANT build TARGET for the Seam booking example (in theexamples/booking DIRECTORY of the Seam distribution) for more on how to build a Tomcat WAR for Seam applications. Refer to this blog post on how to run Seam in Sun's Glassfish application server.

Yes, you can run Seam applications in plain Tomcat 5.5+ or in the Sun GlassFish application server. To run Seam application in Tomcat, you need a number of additional library files and a few configuration files to bootstrap the JBoss EJB3 inside Tomcat. Please refer to the deploy.tomcat ANT build target for the Seam booking example (in theexamples/booking directory of the Seam distribution) for more on how to build a Tomcat WAR for Seam applications. Refer to this blog post on how to run Seam in Sun's Glassfish application server.

47.

What's Jboss Jbpm ?

Answer»

JBoss jBPM is a platform for process languages. At the base there is a java library to define and execute graphs. The actual process CONSTRUCTS like e.g. send email, USER task and update database are defined on top of this. Every process language is made up of a set of such process constructs. And that is what is pluggable in this base library. On top of the JBoss jBPM base library, there are IMPLEMENTED several process languages as a set of process constructs: jPDL, BPEL and SEAM pageflow:

• jPDL is a process language with a clean interface to Java and very sophisticated task management CAPABILITIES. There is no standard for Java process languages, so it is proprietary.
• BPEL is a service orchestration language. As SAID before, in BPEL, you can write new services as a function of other services. This is typically a component of an Enterprise Service Bus (ESB).
• SEAM pageflow is a language that allows for the graphically define the navigation between pages in a SEAM web application.

JBoss jBPM is a platform for process languages. At the base there is a java library to define and execute graphs. The actual process constructs like e.g. send email, user task and update database are defined on top of this. Every process language is made up of a set of such process constructs. And that is what is pluggable in this base library. On top of the JBoss jBPM base library, there are implemented several process languages as a set of process constructs: jPDL, BPEL and SEAM pageflow:

• jPDL is a process language with a clean interface to Java and very sophisticated task management capabilities. There is no standard for Java process languages, so it is proprietary.
• BPEL is a service orchestration language. As said before, in BPEL, you can write new services as a function of other services. This is typically a component of an Enterprise Service Bus (ESB).
• SEAM pageflow is a language that allows for the graphically define the navigation between pages in a SEAM web application.

48.

Does Seam Run On Other Application Servers Besides Jboss ?

Answer»

Seam RUNS BEAUTIFULLY on other application servers - just like everything ELSE the HIBERNATE TEAM does, this is not a JBoss-only thing.

Seam runs beautifully on other application servers - just like everything else the Hibernate team does, this is not a JBoss-only thing.

49.

What Do You Know About Seam ?

Answer»

Built on the STANDARDS JavaServer Faces and EJB 3.0, JBoss Seam unifies component and programming models and DELIVERS a consistent and powerful framework for rapid creation of web applications with Java EE 5.0. Seam simplifies web application development and enables new functionality that was difficult to implement by hand before, such as stateful conversations, multi-window operation, and handling concurrent fine-grained AJAX requests. Seam also unifies and integrates popular OPEN source technologies like Facelets, Hibernate, iText, and Lucene.

Built on the standards JavaServer Faces and EJB 3.0, JBoss Seam unifies component and programming models and delivers a consistent and powerful framework for rapid creation of web applications with Java EE 5.0. Seam simplifies web application development and enables new functionality that was difficult to implement by hand before, such as stateful conversations, multi-window operation, and handling concurrent fine-grained AJAX requests. Seam also unifies and integrates popular open source technologies like Facelets, Hibernate, iText, and Lucene.

50.

What's Jboss Cache In Short ?

Answer»

JBossCache ENABLES easy distribution of datasets across your computing environments. It is BASED on JGroups and enables CLUSTERING and HIGH availability of that data. You may CHOOSE to distribute the data with JBoss Messaging to move it where it is needed for computation or event-based programming.

JBossCache enables easy distribution of datasets across your computing environments. It is based on JGroups and enables clustering and high availability of that data. You may choose to distribute the data with JBoss Messaging to move it where it is needed for computation or event-based programming.

Previous Next