[EJB/JBoss] - Re: EJB initialization
by sbivol
Did the tutorial work for you?
I created a service as described in the tutorial, but it is throwing an exception when I shutdown jboss.
Then I deployed the tutorial applicatoin from the src url specified in the previous post, and it fails again at jboss shutdown. Here are the exceptions on the jboss console:
2007-08-31 14:17:55,870 WARN [ServiceDelegateWrapper] Stopping failed jboss.j2ee:jar=tutorial.jar,name=ServiceThree,ser
vice=EJB3
java.lang.RuntimeException: javax.management.InstanceNotFoundException: jboss.j2ee:jar=tutorial.jar,name=ServiceThree,se
rvice=EJB3,type=ManagementInterface is not registered.
....
stack trace
....
2007-08-31 14:17:56,308 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:jar=tutorial.
jar,name=ServiceThree,service=EJB3,type=ManagementInterface
ServiceTwo - Stopping
2007-08-31 14:17:56,308 WARN [ServiceDelegateWrapper] Stopping failed jboss.j2ee:jar=tutorial.jar,name=ServiceTwo,servi
ce=EJB3
java.lang.RuntimeException: javax.management.InstanceNotFoundException: tutorial:service=serviceTwo is not registered.
...
stack trace
...
followed by same message for ServiceOne.
Is this a known issue?
Thanks
Sergiu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080125#4080125
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080125
17Â years, 2Â months
[JBoss Seam] data modeling 101
by José Moreira
Hello,
this is not directly related to Seam but...
im starting to develop an application with Seam and i have the following
business case:
the webapp will allow car shop dealers to manage their business.
- the application will have 2 roles, 'customer' and 'system admin'
- the customer can have multiple accounts for it's employees, each with
the same permissions
- they will have an auto stock management composed of multiple vehicle
types (cars, boats, motocycles)
- they will have file attachments, notes, tasks and events related to
vehicles
- the admin role can supervise all information from the customers,
manage their accounts and create adittional admin accounts
- the will be a CMS module (pages with blocks and sub-pages mostly) to
on-line administer static site content like help, faq's, contacts, etc.
Only admin's have permissions
- the website will be composed of 3 'logical' parts:
* the public site which will allow customers to register, perhaps demo
accounts will be available or should be considered. also it will have
static information / pages like a normal website
* the private part where the customers manage their business after login
* the administration back office for system admins.
Of course i'm not expecting for you to architect my application :) but i
have doubts about how to implement this in Seam.
This will sound stupid but ... some doubts are:
- If the customers are groupped by it's "company", the information
(vehicles, etc) should be attached to the company not the customer right?
- Are Stateless Java Beans appropriate for this case? I would very much
like to delegate bussiness logic to classes outside the action listeners
(if i'm saying correctly)
- How can i / should split the interface in the 3 parts: public,
customer and administration?
for example the customer will have forms and lists with their vehicles,
manage their employees accounts, etc.
the system admin will have to have access to the same information (plus
administration) but in a different interface (for example to correct /
verify some information) but using the same interface / login seems
wrong unless another interface is presented if the user is an admin.
So the thing is about code (view/model) reuse between the customer
interface and the admin interface.
Somehow it doesnt make sense for the admins and users to login from the
same frontpage. Can i share the same Authentication but redirect to
another part of the application afterwards
Also for example, if a customer adds a vehicle, the vehicle will be
attached to the logged in user company, but if its an admin that
inserts/edits a vehicle, it will have to be attached to a customer
(perhaps previously selected). So the forms/components must be prepared
for that right?
- The vehicles share common properties but will have to be sub classed
because for example a car doesn't have a 'sail type'.
So i'll create a base Vehicle class and use inheritance to create a
Car/Boat/Motocycle.
How to and what problems will i have adapting the forms to the subclasses?
kind regards,
--
Melhores cumprimentos,
José Moreira
17Â years, 2Â months
[JBoss Seam] - NPE when using SeamTest (v2.0)
by IGx89
I have the following test class:
package com.fl.bpm_ui.scheduler;
|
| import org.jboss.seam.core.Manager;
| import org.jboss.seam.mock.SeamTest;
| import org.junit.*;
|
| public class InitialCallTest extends SeamTest
| {
| @Test
| public void testNumberGuessWin() throws Exception
| {
| String id = new NonFacesRequest("/scheduler/usher.seam?flow=initialCall")
| {
|
| @Override
| protected void renderResponse() throws Exception {
| CallManager cm = (CallManager) getInstance(CallManager.class);
| assert Manager.instance().isLongRunningConversation();
| }
|
| }.run();
| }
| }
And get the following error:
-------------------------------------------------------------------------------
| Test set: com.fl.bpm_ui.scheduler.InitialCallTest
| -------------------------------------------------------------------------------
| Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.047 sec <<< FAILURE!
| testNumberGuessWin(com.fl.bpm_ui.scheduler.InitialCallTest) Time elapsed: 0.016 sec <<< ERROR!
| java.lang.NullPointerException
| at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:504)
| at com.fl.bpm_ui.scheduler.InitialCallTest.testNumberGuessWin(InitialCallTest.java:24)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
| at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
| at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
| at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
| at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
| at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
| at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
| at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
| at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
| at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
| at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:314)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:907)
Running through the debugger, it seems the NPE is happening on the "FacesLifecycle.endRequest(externalContext);" line in the finally block in the run() method.
Any ideas how I can fix this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080118#4080118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080118
17Â years, 2Â months