[JBoss Seam] - Re: serious problem on sun application server 9.0
by Echnaton
finally i could make it run...
i found this:
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB
if this is the only solution then its a bit annoying :(
i placed this in the ejb-jar.xml. enterprise-beans must be the first thing in the file.
| <enterprise-beans>
| <session>
| <ejb-name>TestAction</ejb-name>
| <ejb-class>test.TestAction</ejb-class>
| <ejb-local-ref>
| <ejb-ref-name>Test-ejb/TestBean/local</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local>test.TestLocal</local>
| <ejb-link>TestBean</ejb-link>
| </ejb-local-ref>
| </session>
| </enterprise-beans>
|
test is the package
TestAction is the actionbean behind the webpage.
TestBean is the bean that shall be created by seam.
as you can see i could leave the jndi-pattern untouched. i tried to use
| <ejb-name>Component</ejb-name>
| <ejb-class>org.jboss.seam.Component</ejb-class>
|
instead of
| <ejb-name>TestAction</ejb-name>
| <ejb-class>test.TestAction</ejb-class>
|
so it would have made redundant <ejb-local-ref> entrys for the same ejb in different actionbeans unnecessary but it didnt work. perhaps somebody has a better solution but for the moment it works.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998858#3998858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998858
19 years, 3 months
[JBoss Getting Started Documentation] - Re: Regarding MessageDiveenBean Deployment
by visolvejboss
Hello,
Add the following code in the ejb-jar.xml file in your application.
| <message-driven>
| <ejb-name>MDBNAME</ejb-name>
| <ejb-class>PACKAGENAME.MDBCLASS</ejb-class>
| <transaction-type>Container</transaction-type>
| <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
| <message-driven-destination>
| <destination-type>javax.jms.Queue</destination-type>
| <subscription-durability>NonDurable</subscription-durability>
| </message-driven-destination>
| </message-driven>
|
Add the following code in jboss.xml file,
<message-driven>
| <ejb-name>MDBNAME</ejb-name>
| <destination-jndi-name>queue/jndiname</destination-jndi-name>
| <depends>jboss.mq.destination:service=Queue,name=jndiname</depends>
| </message-driven>
|
To set the initial context,
Properties p = new Properties();
| p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
| p.put(Context.PROVIDER_URL, "localhost:1099");
|
| Context jndiContext = new InitialContext(p);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998840#3998840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998840
19 years, 3 months
[JBoss Seam] - Re: Public members as bean properties within EL?
by SmokingAPipe
The problem I was running into was that unfortunately JAXB looks at both private fields and getter methods to determine properties, so if I have:
| class Foo {
| private String name;
| public String getName() { return name; }
| }
|
JAXB was giving me an error that there were two fields with the same name. I then tried putting @XmlTransient on either the getter or the private member, and that messed everything up. So I ended up removing the private fields by calling them private String _name, and then everything worked.
What's cool here is that I have a class that has Hibernate validators, so I can process it easily within forms, and Seam SFSBs can do stuff to it once it's valid, and that stuff can include marshalling it and sending it off... and it's all based on one single class file, which happens to have a bunch of annotations on it. I go from a Web form straight to an XML stream, with Seam SFSBs acting as light-weight intermediaries, and with Facelets displaying nice validation messages as needed. It is in fact pretty cool. I guess if I wanted to be even more cool I could also make that object into an @Entity so it could also be persisted.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998836#3998836
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998836
19 years, 3 months
[Installation, Configuration & Deployment] - Start up 2 JBoss in same machine
by Samal
Is it possible to start up more than one JBoss in same machine and make them work perfectly?
The situation is like that:
I need one JBoss A that have high authority that can manipulate all files. The other JBoss B only have limited permission that only can manipulate files in a guest folder. of-course, that is application in JBoss to manipulate the things. the first JBoss would have Web app. Two JBoss would communicate with RMI calling.
i am using window2003
Things have done:
with 2 windows account that having different permission. One for A and One for B.
and 2 copy of JBoss that for these 2 account.
I know i have to use different ports for these service in 2 Jboss, but I want to know what are them, especially when i want to use the EJB in both JBoss.
Besides the ports, are there another things I have to take care to run 2 Jboss in same machine with full funcionality?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998835#3998835
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998835
19 years, 3 months