[JBoss Seam] - Re: Simplest <s:fileUpload> usage
by nathandennis
I?m very glad to see the topic of s:upload being discussed, because I too am having problems. I have managed to get s:upload to do exactly what I want with just one file upload box on a page. But my goal is multiple file upload boxes on the same page. What im doing is linking the data and fileName attributes directly to an entity bean that contains my getters and setters. In the getter method for a the column in my db where I want to store the name of each filename I added some code to write the file to a directory on my server then return the file name. pretty simple I thought. But running to problems I don?t understand
1. the only name I can give the fileName attribute is fileName? I know,,, sounds bazaar. But it seems to be the case
2. if I add the second upload box with different targets, the first box fileName will persist fine,, but and a blank file is written to disk,,, but content is null.
Any help or criticism will be greatly appreciated.
Using seam 1.2.1 and jboss 4.0.5
|
| <a:outputPanel id="loadresults1">
| <s:decorate id="photo1" template="layout/edit.xhtml">
| <ui:define name="label">Photo 1:</ui:define>
| <s:fileUpload data="#{inventoryHome.instance.picture}"
| fileName="#{inventoryHome.instance.fileName}"
| accept="" />
| <h:commandButton id="buttonpic1" value="Upload"
| action="#{inventoryHome.update}"
| rendered="#{inventoryHome.managed}" reRender="loadresults1">
| <a:support event="onkeyup"
| actionListener="#{inventoryHome.update}"
| reRender="loadresults1" />
|
| </h:commandButton>
| <h:commandButton id="delete" value="Delete"
| action="#{inventoryHome.instance.setPhoto1(null)}"
| rendered="#{inventoryHome.managed}"/>
| </s:decorate>
|
| <h:graphicImage id="picture"
| value="/upLoads/#{inventoryHome.instance.photo1}" />
| </a:outputPanel>
|
| <a:outputPanel>
|
| <s:decorate id="photo2" template="layout/edit.xhtml">
| <ui:define name="label">Photo 2:</ui:define>
| <s:fileUpload data="#{inventoryHome.instance.picture2}"
| fileName="#{inventoryHome.instance.fileName2}" accept="" />
| <h:commandButton id="buttonpic2" value="Upload"
| action="#{inventoryHome.update}"
| rendered="#{inventoryHome.managed}" reRender="loadresults1">
| <a:support event="onkeyup"
| actionListener="#{inventoryHome.update}"
| reRender="loadresults2" />
| </h:commandButton>
| <h:commandButton id="delete2" value="Delete"
| action="#{inventoryHome.instance.setPhoto2(null)}"
| rendered="#{inventoryHome.managed}"/>
|
| </s:decorate>
| <h:graphicImage id="picture2"
| value="/upLoads/#{inventoryHome.instance.photo2}" />
| </a:outputPanel>
|
|
|
| --------------------------
| entity bean
|
|
| @Column(name = "photo1", length = 30)
| @Length(max = 30)
| public String getPhoto1() {
| try{
| // first create dir for file - not needed ofcourse
| File os = new
| file("/usr/local/jboss/server/default/deploy/foo.ear/" +
| "foo.war/upLoads");
| os.mkdirs();
| // create empty file with specified name and path
| os = new file("/usr/local/jboss/server/default/deploy/" +
| "foo.ear/" +
| "foo.war/upLoads/"+getFileName());
| FileOutputStream oStream =new FileOutputStream(os);
| oStream.write(getPicture());
| this.photo1=getFileName();
| // this.picture=null;
| }catch(Exception e){
| // e.printStackTrace();
| }
|
| return this.photo1;
| }
|
| public void setPhoto1(String photo1) {
| this.photo1 = photo1;
| }
|
| @Column(name = "photo2", length = 30)
| @Length(max = 30)
| public String getPhoto2() {
| try{
| // create empty file with specified name and path
|
| File os2 = new File("/usr/local/jboss/server/default/deploy/" +
| "foo.ear/" +
| "crookmotors.war/upLoads/"+getFileName2());
| FileOutputStream oStream =new FileOutputStream(os2);
| oStream.write(getPicture2());
| this.photo2=getFileName2();
| // this.picture=null;
| }catch(Exception e){
| // e.printStackTrace();
| }
|
| return this.photo2;
| }
|
| public void setPhoto2(String photo2) {
| this.photo2 = photo2;
| }
|
| public byte [] getPicture() {
| return this.picture;
| }
|
| public void setPicture(byte [] picture) {
| this.picture = picture;
| }
|
| public byte [] getPicture2() {
| return this.picture2;
| }
|
| public void setPicture2(byte [] picture2) {
| this.picture2 = picture2;
|
| public String getFileName() {
| return this.fileName;
| }
|
| public void setFileName(String fileName) {
| this.fileName = fileName;
| }
|
| public String getFileName2() {
| return this.fileName;
| }
|
| public void setFileName2(String filename2) {
| this.filename2 = filename2;
| ...
|
InventoryHome is an unaltered session bean from seam gen
what am i missing???
like i said,, this worked fine will only one field.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051164#4051164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051164
18Â years, 10Â months
[JBoss Portal] - Re: from hibernate to sybase
by Sonal K.
hi
thanks for your reply...
I tried what you said. This time some different exceptions are coming.
No classloaders found for sybase
Exception-----
Caused by: org.jboss.resource.JBossResourceException: Could not create connectio
n; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to reg
ister driver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (j
ava.lang.ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdb
c.SybaseDataSource))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
reateManagedConnection(LocalManagedConnectionFactory.java:179)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
eateConnectionEventListener(InternalManagedConnectionPool.java:565)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
tConnection(InternalManagedConnectionPool.java:250)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
ool.getConnection(JBossManagedConnectionPool.java:491)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
dConnection(BaseConnectionManager2.java:341)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedCo
nnection(TxConnectionManager.java:301)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
onnection(BaseConnectionManager2.java:396)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
nManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
erDataSource.java:88)
... 119 more
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver
for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.Clas
sNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseDataS
ource)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.g
etDriver(LocalManagedConnectionFactory.java:287)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
reateManagedConnection(LocalManagedConnectionFactory.java:170)
... 127 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.syba
se.jdbc2.jdbc.SybaseDataSource
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryCl
assLoader.java:511)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassL
oader.java:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.g
etDriver(LocalManagedConnectionFactory.java:272)
... 128 more
10:12:05,244 INFO [TomcatDeployer] deploy, ctxPath=/helloworldjsfportlet, warUr
l=.../tmp/deploy/tmp917helloworldjsfportlet-exp.war/
10:12:05,541 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
loy/jmx-console.war/
10:12:05,838 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: portal:service=Hibernate
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=Module,type=IdentityServiceController
ObjectName: portal:service=Hibernate,type=Instance
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=Instance
ObjectName: portal:service=Hibernate,type=PortalObject
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=PortalObject
ObjectName: portal:service=Hibernate,type=Portlet
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=PersistenceManager,type=Producer
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: portal:service=Hibernate,type=Instance
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=Instance
ObjectName: portal:service=Hibernate,type=Portlet
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=PersistenceManager,type=Producer
ObjectName: portal:service=Hibernate,type=PortalObject
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=PortalObject
ObjectName: portal:service=Hibernate
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (org.jboss.resource.JBossResourceException: Failed to register dri
ver for: com.sybase.jdbc2.jdbc.SybaseDataSource; - nested throwable: (java.lang.
ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybaseD
ataSource)); - nested throwable: (org.jboss.resource.JBossResourceException: Cou
ld not create connection; - nested throwable: (org.jboss.resource.JBossResourceE
xception: Failed to register driver for: com.sybase.jdbc2.jdbc.SybaseDataSource;
- nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found fo
r: com.sybase.jdbc2.jdbc.SybaseDataSource)))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=Module,type=IdentityServiceController
what does this mean?? I have copied the jar file in lib folder. Anything else I need to copy there??
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051163#4051163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051163
18Â years, 10Â months
[JBoss Seam] - Localizable CRUD from seam-gen
by awhitford
For a long time, I never paid much attention to localization because my users all spoke English. Alas, I now need the convenience of localization.
I remember that the earlier generation of seam-gen (the one built into the Hibernate reverse engineering tool part of the JBoss IDE) embedded message bundle lookups for all of its generated labels. But it would seem that this feature no longer exists, and I am seeing a lot of hard-coded English.
For example, in seam-gen\view\edit.xhtml.ftl:
| <h:commandButton id="save"
| value="Save"
| action="${'#'}{${homeName}.persist}"
| disabled="${'#'}{!${homeName}.wired}"
| rendered="${'#'}{!${homeName}.managed}"/>
|
and in seam-gen\view\editproperty.xhtml.ftl:
| <ui:define name="label">${componentProperty.name}</ui:define>
|
For the first case, I could see seam-gen automatically declare some constants for common labels like "Save", "Delete", "Cancel", etc. Let's say they were called, "Seam.Edit.Save", then the template could embed a messages lookup:value="#{messages['Seam.Edit.Save']}"
For the second case, it is a little more complicated because the template needs to have a messages lookup and we need to augment the messages.properties file... The first part is easy enough, but the messages.properties file looks like a constant artifact in seam-gen.
Adding a message bundle lookup for field labels would help in renaming the fields -- I only need to tweak the message bundle instead of editing 3 xhtml files for each business domain object.
But before I dig any further, it looks like someone has beat me to this issue and logged an issue already:
http://jira.jboss.org/jira/browse/JBSEAM-1206
Any plans for getting this in the 1.3 beta?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051162#4051162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051162
18Â years, 10Â months
[JBoss jBPM] - Problem in getting proper workflow transitions:
by maxp
Hi everyone,
I am a new user to jbpm and i am stuck in getting a problem resolved. I would appreciate any help on the same.
I basically wanted to a process to wait at a task-node for user input and then move to next state on signal.
So I created a process definition which has the following states
1.) start
2) task-node1
3) task-node2
4) task-node3
5)end
Now if i execute the following code in a servlet
ProcessInstance processInstance1 = new ProcessInstance(processDefinition2);
Token token2 = processInstance1.getRootToken();
print(token2.getNode().getName());
token2.signal();
print(token2.getNode().getName());
token2.signal();
print(token2.getNode().getName());
token2.signal();
print(token2.getNode().getName());
token2.signal();
It prints, start, task-node1, task-node2, task-node3
But say
after
Token token2 = processInstance1.getRootToken();
print(token2.getNode().getName());
token2.signal();
print(token2.getNode().getName());
i save the process instance, with the token
now i again reload the process insatnce with its id in a seperate servlet and execute the following code
print(token2.getNode().getName());
Token token2 = processInstance1.getRootToken();
print(token2.getNode().getName());
i get
task-node1
end
shouldn't the state be changed to task-node2 ????
Anyone faced similar problem. If you would like me to try something , do let me know.
- Max
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051161#4051161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051161
18Â years, 10Â months
[JBoss Seam] - Re: How to use @Startup annotation?
by surajmundadaï¼ yahoo.com
Thanks for the reply.
Here is the code.
|
| @Startup
| @Scope(ScopeType.APPLICATION)
| @Name("populateCommercialStripsListener")
| public class PopulateCommercialStripsListener
| {
|
| private Logger logger = Logger.getLogger(PopulateCommercialStripsListener.class);
| private LoggingHelper helper = LoggingHelper.getInstance();
|
| private StripTypePE stripTypePE;
|
| @Create
| public void populateCommercialStrips()
| {
| try
| {
| // Initialize different modules we reuse from ATB new application.
| QatbApplicationControl.initQATBComponents();
|
| // Get the complete list of commercial strips - It returns a map containing the strip names as keys and strip code as values.
| // We have chosen to put the strip names as keys because the calling program will get the strip description from its name.
| Map listOfStrips = QATBCommercialStripsManager.getInstance().getListOfStripNames();
| Iterator iteratorOnStripNames = listOfStrips.keySet().iterator();
|
| stripTypePE = new StripTypePE(MiscellaneousConstants.COMMERCIAL_STRIP_TYPE,
| MiscellaneousConstants.COMMERCIAL_STRIP_TYPE_NAME,
| MiscellaneousConstants.COMMERCIAL_STRIP_TYPE_DESCRIPTION);
|
|
| // Display the composition for the strips stored in the database
| Long id = MiscellaneousConstants.COMMERCIAL_STRIP_INITIAL_PK;
|
| StripDS stripDSImpl = (StripDS)Component.getInstance("stripDSImpl",true);
|
| while (iteratorOnStripNames.hasNext())
| {
| String stripName = (String) iteratorOnStripNames.next();
| String stripCode = (String) listOfStrips.get(stripName);
| ATBStripDescription strip = QATBCommercialStripsManager.getInstance().getCommercialStrip(stripCode);
|
| if(stripDSImpl.getStripPE(id) == null)
| {
| StripPE objStripPE = createCommercialStrip(strip,id);
|
| if(objStripPE != null)
| {
| populateStripInfo(strip,id,objStripPE);
| }
| }
|
| id++;
| }
| }
| catch ()
| {
| ........
| }
| }
|
|
StripTypePE is an EJB3 enitity with Session scope.
stripDSImpl is DAO with Session scope.
|
| @Stateless
| @Name("stripDSImpl")
| @Scope(SESSION)
| public class StripDSImpl implements StripDS
| {
| ........
| ........
| }
|
|
| @Entity
| @Table(name = "STRIP_TYPE", uniqueConstraints =
| { @UniqueConstraint(columnNames ={ "NAME" }) })
| @Name("stripTypePE")
| @Scope(SESSION)
| public class StripTypePE implements Serializable
| {
| ........
| ........
| }
|
is the Session scope of these two classes the root of the problem of "No session context active"?
Regards,
Suraj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051160#4051160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051160
18Â years, 10Â months
[Beginners Corner] - How to add init param of handler
by warmpoty
I use the way to add handler in a Endpoint configuration templates,a configuration basically includes a list of JAXRPC handlers that are registered with a webservice endpoint upon deployment. (which is mentioned in http://labs.jboss.com/jbossws/user-guide/en/html/endpoints.html)
But I fail to find a way add a init parameter of handler in this Endpoint configuration templates,I also failed to find the XSD file that declared in the templates,the XSD file name is http://www.jboss.com/xml/jbossws-config_1_0.xsd.
I don't know if it is available to add init param in Endpoint configuration templates.
the whole file content is :
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: standard-jbossws-endpoint-config.xml 283 2006-05-05 23:08:11Z jason.greene(a)jboss.com $ -->
<jbossws-config xmlns="urn:jboss:jbossws-config:5.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="urn:jboss:jbossws-config:5.0 http://www.jboss.com/xml/jbossws-config_1_0.xsd">
<endpoint-config>
<config-name>Standard Endpoint</config-name>
<pre-handler-chain>
<handler-chain-name>PreHandlerChain</handler-chain-name>
<j2ee:handler-name>ConfigAutoGeneratorHandler</j2ee:handler-name>
<j2ee:handler-class>com.ibm.management.soa.agent.generic.ConfigAutoGeneratorHandler</j2ee:handler-class>
<j2ee:handler-name>KD4Handler</j2ee:handler-name>
<j2ee:handler-class>com.ibm.management.soa.agent.generic.GenericServerHandler</j2ee:handler-class>
<init-param>
<param-name>servername</param-name>
<param-value>jbossServerInTemplate</param-value>
</init-param>
</pre-handler-chain>
</endpoint-config>
<endpoint-config>
<config-name>Standard Secure Endpoint</config-name>
<pre-handler-chain>
<handler-chain-name>PreHandlerChain</handler-chain-name>
<j2ee:handler-name>WSSecurityHandlerInbound</j2ee:handler-name>
<j2ee:handler-class>org.jboss.ws.wsse.WSSecurityHandlerInbound</j2ee:handler-class>
<j2ee:handler-name>ConfigAutoGeneratorHandler</j2ee:handler-name>
<j2ee:handler-class>com.ibm.management.soa.agent.generic.ConfigAutoGeneratorHandler</j2ee:handler-class>
<j2ee:handler-name>KD4Handler</j2ee:handler-name>
<j2ee:handler-class>com.ibm.management.soa.agent.generic.GenericServerHandler</j2ee:handler-class>
<init-param>
<param-name>servername</param-name>
<param-value>jbossServerInTemplate</param-value>
</init-param>
</pre-handler-chain>
</endpoint-config>
</jbossws-config>
So please help , Thanks a lot
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051158#4051158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051158
18Â years, 10Â months
[EJB 3.0] - Primary key generator best practices? (Postgres specific)
by asack
Guys, we are using postgres 8.1.3 for our application and running into a lot of problems - mainly dealing with primary key management. I have tracked down one issue in that our current configuration does not use the autovacuum stuff in postgres to cleanup the database over a lot of transactions.
But the other issue which is semi related is that EJB3/Hibernate is not dealing with the primary keys correctly? We have instances where EJB3/Hibernate tries to insert a new entity over an already existing primary key? i.e. EJB3/Hibernate does not get the next key properly. All of our tables are using AUTO for primary key generation.
Question, should we be specifing our own generator function? Should we be using @SequenceGenerator annotatoin instead of just relying on AUTO?
(on a side note, how do I specify a generic generator function across multiple tables using annotations?)
Any advice would come much appreciated!
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051157#4051157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051157
18Â years, 10Â months
[JBoss Seam] - DRY Edit pages
by awhitford
Consider the following seam-gen generated snippet from an Edit.xhtml:
| <h:inputText id="code"
| disabled="#{countryHome.managed}"
| required="true"
| size="2"
| maxlength="2"
| value="#{countryHome.instance.code}">
| <a:support event="onblur" reRender="codeDecoration"/>
| </h:inputText>
|
I like how seam will impose my Entity bean restrictions at the UI level, so that my @NotNull constraint is translated into a required="true", and my @Length(max=2) constraint is translated into a maxlength="2". But I'm concerned that this is repeating oneself -- especially when a change is made. If a constraint is changed on the @Entity bean, I need to update the Edit page in addition to the database... Why can't the Edit page be driven by the meta-data of the Entity bean at run-time? I would like the framework to interrogate the Entity bean's meta data for required and maxlength if they are not specified.
(If this is a conscious decision based on the poor performance of reflection, then I understand. Too bad the xhtml couldn't be enriched from meta data at build time.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051155#4051155
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051155
18Â years, 10Â months