💼 IT4206 Enterprise Application Development
UCSC BIT 2024 | MCQ Solutions with Theory & Examples
What is Plumbing?
Theory: Plumbing is the underlying infrastructure that allows different software components to communicate and exchange data.
Example: When you click Buy on a shopping site, the request travels from UI → Server → Payment → Database. This communication chain is called plumbing.
What is a God Class?
Theory: A God Class is a class that does too many tasks, violating the Single Responsibility Principle (SRP).
StudentManager - Login() - Register() - Delete() - PrintReport() - SendEmail() - CalculateMarks()
Fix: Split into smaller classes like AuthService, ReportService, EmailService.
What is Business Logic?
Theory: Contains all business rules and calculations of the application.
If customer is Gold Discount = 20% Else Discount = 10%
This calculation belongs to the Business Logic Layer.
What is a Server Helper?
Theory: Works inside the Server JVM and helps execute remote requests.
Flow: Client → Server Helper → Server Object → Database
What is Distributed Garbage Collection?
Theory: DGC automatically removes unused remote objects in Java RMI to save memory.
Example: Client disconnects → Remote object no longer used → Java deletes it automatically.
What is an MDB?
Theory: Processes messages asynchronously. Clients cannot call its methods directly.
Example: Customer places order → Message sent to queue → MDB processes it later.
Java EE Transaction Management
Theory: Java EE servers provide automatic transaction management (also supports manual control).
Example: Bank transfer: Deduct + Add money. If one fails → entire transaction rolls back.
What is an Entity Bean?
Theory: Represents permanent data stored in databases.
Examples: Student table, Employee table, Product table. Each record = one entity.
What does JNDI lookup() do?
Theory: Searches the naming service and returns the requested object.
DataSource ds = (DataSource) ctx.lookup("jdbc/MyDB");
What is @JoinColumn?
Theory: Defines the foreign key between two database tables.
Student (student_id) ↓ foreign key Course (student_id)
Which is NOT an HTTP method?
Theory: Standard HTTP methods: GET, POST, PUT, DELETE, OPTIONS. There is no CREATE method.
Note: POST is used to create new resources (e.g., new user).
What does POST do?
Theory: Sends data to the server to create or update resources.
Examples: User Registration, Login Form, Online Order.
What do 3xx status codes mean?
Theory: 3xx codes mean the requested page has been redirected.
- 301 → Permanent Redirect
- 302 → Temporary Redirect
What does service() do?
Theory: Checks if request is GET or POST and calls the correct method.
GET → doGet() | POST → doPost()
What is web.xml?
Theory: The deployment descriptor for Java web applications. Maps Servlets to URL patterns.
What does <servlet-mapping> do?
Theory: Connects a Servlet with a URL.
/login → LoginServlet
What is ServletRequest?
Theory: Contains all data sent by the client.
request.getParameter("username");
What is a Web Container?
Theory: Manages Servlets, JSPs, sessions, and HTTP requests.
Example: Apache Tomcat's servlet container processes incoming web requests.
What is @OnOpen?
Theory: Executed when a WebSocket connection starts.
Example: User joins a live chat → @OnOpen is called.
What are Control Frames?
Theory: Manage the WebSocket connection.
- Ping – Check connection
- Pong – Reply to Ping
- Close – End connection
What is a Stateless Session Bean?
Theory: Does not remember client information between requests.
Example: Currency Converter – each request is independent.
When does NoSuchObjectException occur?
Theory: When a client tries to access a remote object that no longer exists.
Example: Server deletes object → Client calls it again → Exception thrown.
What is init-method?
Theory: Runs immediately after a Spring Bean is created.
Example: Open database connection, load configuration files.
MDB Use Case
Theory: Processes messages asynchronously from a queue.
Example: Email notification service processes emails after an order is placed.
What is @PostActivate?
Theory: Called after a Stateful Session Bean is reactivated from passive storage.
Example: User session temporarily stored → later restored → @PostActivate executes.
| Q | Ans | Memory Tip |
|---|---|---|
| 1 | C | Plumbing = Communication infrastructure |
| 2 | E | God Class = One class does everything |
| 3 | A | Server Helper = Runs inside server JVM |
| 4 | C | DGC = Deletes unused remote objects |
| 5 | C | Business Logic = Rules & calculations |
| 6 | A | MDB = Asynchronous messaging |
| 7 | B | Java EE = Automatic transactions |
| 8 | E | CREATE is NOT an HTTP method |
| 9 | A | Entity = Database object |
| 10 | B | lookup() = Find object by name |
| 11 | D | Stateless = No client memory |
| 12 | C | Object removed → NoSuchObjectException |
| 13 | B | init-method = Bean initialization |
| 14 | A | @JoinColumn = Foreign key |
| 15 | D | service() calls doGet()/doPost() |
| 16 | B | POST = Send data |
| 17 | C | 3xx = Redirect |
| 18 | E | web.xml = Deployment descriptor |
| 19 | D | servlet-mapping = URL mapping |
| 20 | D | ServletRequest = Client request data |
| 21 | A | @OnOpen = Connection starts |
| 22 | E | Control Frames = Ping/Pong/Close |
| 23 | B | Web Container = Runs Servlets |
| 24 | B | MDB = Queue message processor |
| 25 | A | @PostActivate = Bean reactivated |
❓ Frequently Asked Questions (FAQ)
🎓 Expert ICT, Coding, School Classes, Digital Marketing & University Project Guidance
Struggling with your university final year project? Want to master coding, upscale your business with expert digital marketing, or learn absolute computer basics from scratch? We offer high-quality individual and group online classes conducted in English, Sinhala, or Tamil mediums. Get guaranteed academic success and professional growth with tailored guidance.
🎓 University Final Year Project Guidance & AI
Get specialized, end-to-end mentoring and technical support to pass your degree or master's program with flying colors:
- 🏫 Targeted Institutes: Expert guidance tailored for BIT UCSC, UoM, SLIIT, NIBM, and other leading universities.
- 🔬 Postgraduate Support: Comprehensive assistance for MSc Software Final Year Projects.
- 🤖 AI & Smart Applications: Step-by-step implementation of AI, Machine Learning (ML), and automation modules.
- ✅ Guaranteed Success: Help with documentation, system architecture, coding, and viva preparation.
🏫 School ICT & Corporate Beginner Classes
- 💻 Non-IT Staff Computer Basics: Absolute beginner-friendly online classes covering essential computer skills, office tools, and internet operations.
- 🎒 Primary & Secondary (Grades 1-10): Interactive online ICT classes tailored to build strong foundations from early ages.
- 📝 Exam Prep: Dedicated training packages for GCE O/L, GCE A/L ICT, and GIT exams.
- 🌍 Global Syllabuses: Complete curriculum coverage for Local, Edexcel, and Cambridge in English & Tamil Mediums.
📢 Software Development & Digital Marketing Services
- ⚙️ Software & Web Development: Professional custom software application and website development built using PHP & MySQL.
- 🎯 Social Media Management: Content creation, publishing, and channel management for Facebook, Instagram, TikTok, and YouTube.
- 📈 Ad Boosting: Highly targeted paid advertising campaigns to drive leads, traffic, and sales to your business.
📞 Connect With Us Instantly
Book your slot for online classes or get a premium tech service quote today!
💬 WhatsApp: +94 729622034
📧 Email: ITClassSL@gmail.com
🌐 Explore Our Resources & Communities
Stay updated with our latest tutorials, project ideas, and student guides across all our official platforms:
- 📺 YouTube Tutorials: Subscribe to our Channel
- 💼 Professional Network: Connect on LinkedIn
- ✍️ Tech Blog: Visit our WordPress Site
- ❓ Project Q&A: Follow our Quora Guide Profile
- 📰 Monthly Updates: Read Our Newsletter
- 🌐 Official Portfolios: Wix Site | Google Business | Strikingly Portfolio
- 🗣️ Student Forum: Join our ElaKiri Discussion Thread
No comments:
Post a Comment