-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: jboss modular embeddable server?
PostPosted: Tue Mar 27, 2007 11:12 pm 
Newbie

Joined: Mon Mar 26, 2007 3:07 am
Posts: 4
Hi guys! What is jboss modular embeddable server? Is it the AS that can usually be downloaded here?

http://labs.jboss.com/portal/jbossas/download

The book talks about it in Chapter 2, Installing the EJB container but I can't seem to find the configuration files mentioned there.

Quote:
default.persistence.properties - NOT FOUND
ejb3-interceptors-aop.xml - NOT FOUND
embedded-jboss-beans.xml - NOT FOUND
jndi.properties - FOUND



And there are just a lot of libs(jars) that came with the jboss AS so the instruction to copy all the jars that came with the AS to my project workdir is just so vague...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 3:39 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Just download the examples for the book: http://caveatemptor.hibernate.org

http://sourceforge.net/project/showfile ... _id=132063

http://docs.jboss.org/ejb3/embedded/embedded.html

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Chapter 2, Installing the EJB container
PostPosted: Mon Jun 11, 2007 10:07 am 
Newbie

Joined: Mon Jun 11, 2007 9:43 am
Posts: 4
Location: Philippines
Greetings!

I am currently working in this part of the book and unfortunately after unzipping the downloaded archive from jBoss it seems that the writings on the book says "copy all required libraries that comes with the server", can somebody enumerate or point me to the right required libraries that the book are saying, and as well as the configuration files it is referring at...

And also it seems that I could not find this files;
default.persistence.properties,
ejb3-interceptors-aop.xml
embedded-jboss-beans.xml

Thanks in advance!

_________________
A programmer simplifies everything by making them selves miserable.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 11, 2007 10:40 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Since the book has been released, the "JBoss embeddable EJB3 server" as described and used in the book has been deprecated. What is now available, "Embeddable JBoss application server", is not the same (although it looks similar at first).

You have two choices:

1. Follow the book to the letter and download the old server, it is included in the CaveatEmptor/HelloWorld download (with all libs etc.) on http://caveatemptor.hibernate.org

2. Drop that section of the book after reading it once and get started with the examples that come with the newer embeddable JBoss AS.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Chapter 2, Installing the EJB container
PostPosted: Mon Jun 11, 2007 10:51 am 
Newbie

Joined: Mon Jun 11, 2007 9:43 am
Posts: 4
Location: Philippines
Thanks for the reply!

Where could I found the examples that came with the newer embeddable JBoss AS? Or If I follow the book what version of JBoss should I use?

I've download the current GA release from JBoss "jboss-4.0.5.GA".

Thanks again...

_________________
A programmer simplifies everything by making them selves miserable.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 11, 2007 11:31 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Here are the steps:

1. Type http://caveatemptor.hibernate.org/ into your browser.

2. Click on the "Getting Started - Hello World" download link.

3. Unzip that archive.

4. Open a command line (DOS prompt on windows or Cygwin shell) and change into the unzipped directory, and then into the helloworld-ejb3 directory.

5. Read the README.txt file.

6. Follow the instructions in the README.txt file step by step.

This is the same code and "embeddable" server as described in the book.

Do not download JBoss Application Server 4.0.5 or (or 4.2 for that matter) unless you want a full (not embedded) Java EE/J2EE application server. This is neither described nor necessary for the examples in the book.

If you want to try the newer "embeddable" server, which is not described in the book either, it comes with examples etc. and is downloadable here:

http://sourceforge.net/project/showfile ... _id=228977

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Chapter 2, Running the Application
PostPosted: Fri Jun 15, 2007 2:31 am 
Newbie

Joined: Mon Jun 11, 2007 9:43 am
Posts: 4
Location: Philippines
Greetings!

I’ am trying to run the sample from Getting Started - Hello World" under helloworld-ejb3 but unfortunately an error shows up.

run:
[java] 14:11:58,218 INFO LocalTxDataSource:117 - Bound datasource to JNDI name 'java:/HelloWorldDS'
[java] Exception in thread "main" javax.naming.NameNotFoundException: MessageHandlerBean not bound
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
[java] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
[java] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
[java] at javax.naming.InitialContext.lookup(Unknown Source)
[java] at hello.HelloWorld.main(Unknown Source)
[java] Java Result: 1
BUILD SUCCESSFUL

Hoping for your help. Thank you very much in advance!

_________________
A programmer simplifies everything by making them selves miserable.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 2:49 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Go into helloworld-ejb3/src/java/hello/HelloWorld.java and switch from the fast deploy to the slow deploy mechanism. Simply comment out this code:

Code:
        // Deploy all EJBs found on classpath (fast, scans only build directory)
        // This is a relative location, matching the substring end of one of java.class.path locations!
        // Print out System.getProperty("java.class.path") to understand this...
        EJB3StandaloneBootstrap.scanClasspath("helloworld-ejb3/build".replace("/", File.separator));


And uncomment this code:

Code:
        // Deploy all EJBs found on classpath (slow, scans all)
        //EJB3StandaloneBootstrap.scanClasspath();


Also make sure you have the latest version, there was a bug in an older release. If you do not have the replace(File.separator) in the above block, you have an older version.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Chapter 2, Running the Application
PostPosted: Fri Jun 15, 2007 3:59 am 
Newbie

Joined: Mon Jun 11, 2007 9:43 am
Posts: 4
Location: Philippines
I have successfully run.
It but every time I run the program the same row where affected by the changes.

These threads also help me in resolving the problem http://forum.hibernate.org/viewtopic.ph ... e58752bf6f

Thought I am quite confuse that is it really has some Microsoft Windows issue.

Cheers!

_________________
A programmer simplifies everything by making them selves miserable.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 6:24 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Windows has a different path separator, "\", than other operating systems, which mostly use "/". The old release of Hello World had a hardcoded "/" in the location of the build output. The new release finds out the system path separator automatically.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.