[JBoss Seam] - Re: EntityHome and Primay Key value assignment for new recor
by terryb
I tried @PrePersist but got struck with popular hibernate bug... Id must be be assigned manually..., it's to do with hibernate doing validations before invoking PrePersist I think...
The bug is fixed in latest hibernate GA release, but I am not sure what else will break if i use it with Redhat Developer Beta 1.
So as a workaround, Im keeping my code in MyEntityHome for now, as above.
Q2. I was trying to use my generated Id as a default value for the jsf h:inputHidden tag. The tage is bound to the ID property of the entity bean. So I thought that way it will work automatically, as JSF will assign value in hidden bound control to the backing entity bean.
I just couldn't figure out how to have h:inputHidden bound to the entity property and at the same time make it use my generate Id as a default value.
h:inputHidden id="code" required="true" size="50" maxlength="50" value="#{securityRoleHome.instance.id}"
/h:inputHidden
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093849#4093849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093849
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - Re: problem while start up in JBOSS server 4.0.5 GA--please
by prakash.dumbre
hi genman
Following is the stack trace from jb.10102007.log file
Stack Trace
16:31:49,968 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
loy/management/console-mgr.sar/web-console.war/
16:31:53,484 INFO [MailService] Mail Service bound to java:/Mail
16:31:54,390 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-ha-local-jdbc.rar
16:31:54,656 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-ha-xa-jdbc.rar
16:31:54,812 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-local-jdbc.rar
16:31:55,015 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-xa-jdbc.rar
16:31:55,093 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jms/jms-ra.rar
16:31:55,390 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/mail-ra.rar
16:32:18,062 INFO [WrapperDataSourceService] Bound
ConnectionManager 'jboss.jca
:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
16:37:20,359 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatI
d=257, GlobalId=TPSLVL00102/3, BranchQual=, localId=3] timed out. status=STATUS_
ACTIVE
As you can see from above stack trace server gets hung at the line in the bold and it is not moving ahead after this line and that's why my ear file is not getting deployed on the server.
I don't understand why the server is getting timeout at the above line. Can u please tell me how to solve this error?
regards
prakash
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093847#4093847
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093847
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - Re: Bean call bean on muti machines with multi JBoss server
by changemylife
But my design is:
On the Server1, I have the bean called BeanA. It's simply:
@Remote
| public interface Check {
| public boolean isValid(double a, double b);
| }
and bean class:
public @Stateless class CheckBean implements Check {
|
| public boolean isValid(double a, double b) {
| if (b == 0)
| return false;
| else
| return true;
|
| }
| }
Ok, I deploy BeanA on Server1.
Now, On the Server2, I have the bean called BeanB
@Remote
| public interface Divide {
| public double divideNumber(double a, double b);
| }
And bean class:
public @Stateless class DivideBean implements Divide {
|
| private Context context;
|
| public double divideNumber(double a, double b) {
| Context ctx = lookupServer();
| double result = 0;
| try {
| Check check = (Check)ctx.lookup("CheckBean\remote");
| boolean flag = check.isValid(a, b);
| if (flag)
| result = a / b;
| else
| result = 0;
| } catch (NamingException e) {
| e.printStackTrace();
| }
| return result;
| }
|
| private Context lookupServer(){
|
| Properties properties = new Properties();
| properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
| properties.put("java.naming.provider.url","server1:1099"); <-- lookup on Server1
|
| try {
| context = new InitialContext(properties);
| } catch (NamingException e) {
| e.printStackTrace();
| throw new RuntimeException(e);
| }
| return context;
| }
| }
Ok, I deploy BeanB on Server2. But here, I must copy BeanA and paste deploy folder on Server2. How I don't do this (maybe configure to Server2 recognize BeanA)
The Client application on the difference machine:
Properties properties = new Properties();
| properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
| properties.put("java.naming.provider.url","server2:1099"); <--- lookup on Server2
|
| Context ctx = new InitialContext();
|
| Divide div = (Divide)ctx.lookup("DivideBean/remote");
| div.divideNumber(10,2)
Have some ideas ?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093841#4093841
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093841
18Â years, 9Â months